[PATCH stable] convert: convert real global tags only - not local tags
Mads Kiilerich
mads at kiilerich.com
Wed May 14 06:50:03 CDT 2014
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1400068180 -7200
# Wed May 14 13:49:40 2014 +0200
# Node ID 6878d40f8a2153885374ba636a3b183a5a369d36
# Parent 62a2749895e4151f766a4243fa870b1ddd7386d0
convert: convert real global tags only - not local tags
diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -394,7 +394,8 @@ class mercurial_source(converter_source)
sortkey=ctx.rev())
def gettags(self):
- tags = [t for t in self.repo.tagslist() if t[0] != 'tip']
+ tags = [t for t in self.repo.tagslist()
+ if t[0] != 'tip' and self.repo.tagtype(t[0]) == 'global']
return dict([(name, hex(node)) for name, node in tags
if self.keep(node)])
diff --git a/tests/test-convert-hg-sink.t b/tests/test-convert-hg-sink.t
--- a/tests/test-convert-hg-sink.t
+++ b/tests/test-convert-hg-sink.t
@@ -16,8 +16,10 @@
$ echo file > foo/file
$ hg ci -qAm 'add foo/file'
$ hg tag some-tag
+ $ hg tag -l local-tag
$ hg log
changeset: 3:593cbf6fb2b4
+ tag: local-tag
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
More information about the Mercurial-devel
mailing list