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 Dec 24, 2024
1 parent 0025805 commit e271d3d
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 @@ -772,6 +772,14 @@ def detect_vcs(source_dir: T.Union[str, Path]) -> T.Optional[T.Dict[str, str]]:
'rev_regex': '(.*)',
'dep': '.hg/dirstate'
},
{
'name': 'mercurial',
'cmd': 'cat',
'repo_dir': '.',
'get_rev': 'cat .hg_archival.txt',
'rev_regex': 'node: (.*)\n',
'dep': '.hg_archival.txt'
},
{
'name': 'subversion',
'cmd': 'svn',
Expand Down

0 comments on commit e271d3d

Please sign in to comment.