Skip to content

Commit

Permalink
Add support for .hg_archival to detect_vcs
Browse files Browse the repository at this point in the history
This allows vcs_tag() to work on a mercurial archived tarball so programs can
display the revision at runtime.
  • Loading branch information
grimmy committed Jan 31, 2025
1 parent b825fae commit a4fd5c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mesonbuild/utils/universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,14 @@ def detect_vcs(source_dir: T.Union[str, Path]) -> T.Optional[VcsData]:
rev_regex = '(.*)',
dep= '.hg/dirstate',
),
VcsData(
name = 'mercurial',
cmd = 'cat',
repo_dir = '.',
get_rev = ['cat', '.hg_archival.txt'],
rev_regex = 'node: (.*)\n',
dep = '.hg_archival.txt',
),
VcsData(
name = 'subversion',
cmd = 'svn',
Expand Down

0 comments on commit a4fd5c9

Please sign in to comment.