Skip to content
Snippets Groups Projects
Commit 6b8daeea638a authored by Mads Kiilerich's avatar Mads Kiilerich
Browse files

convert: mercurial source: convert global tags only - not local tags

Mercurial tags can be local (tag -l, stored in .hg/localtags) or global (normal
tags, tracked in .hgtags) ... or extensions can add other kind of tags.

Convert would take all tags (except "tip"), not just the ones from .hgtags, and
put them into .hgtags.

Instead, convert only the global tags that come from .hgtags.
parent 798c81e32b5e
No related branches found
No related tags found
No related merge requests found
......@@ -394,7 +394,9 @@
sortkey=ctx.rev())
def gettags(self):
tags = [t for t in self.repo.tagslist() if t[0] != 'tip']
# This will get written to .hgtags, filter non global tags out.
tags = [t for t in self.repo.tagslist()
if self.repo.tagtype(t[0]) == 'global']
return dict([(name, hex(node)) for name, node in tags
if self.keep(node)])
......
......@@ -16,5 +16,6 @@
$ echo file > foo/file
$ hg ci -qAm 'add foo/file'
$ hg tag some-tag
$ hg tag -l local-tag
$ hg log
changeset: 3:593cbf6fb2b4
......@@ -19,5 +20,6 @@
$ hg log
changeset: 3:593cbf6fb2b4
tag: local-tag
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment