Mercurial > hg
comparison hgext/convert/hg.py @ 25305:884ef09cf658 stable
convert: properly pass null ids through .hgtags (issue4678)
Mercurial uses tags of null to mark deletions, but convert was
silently discarding these because it had no mapping for them. Thus, it
was resurrecting deleted tags.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 27 May 2015 14:28:29 -0500 |
parents | 216fa1ba9993 |
children | daf9f7ee2a5c |
comparison
equal
deleted
inserted
replaced
25294:b1b89a0a606d | 25305:884ef09cf658 |
---|---|
126 s = line.split(' ', 1) | 126 s = line.split(' ', 1) |
127 if len(s) != 2: | 127 if len(s) != 2: |
128 continue | 128 continue |
129 revid = revmap.get(source.lookuprev(s[0])) | 129 revid = revmap.get(source.lookuprev(s[0])) |
130 if not revid: | 130 if not revid: |
131 continue | 131 if s[0] == hex(nullid): |
132 revid = s[0] | |
133 else: | |
134 continue | |
132 fp.write('%s %s\n' % (revid, s[1])) | 135 fp.write('%s %s\n' % (revid, s[1])) |
133 return fp.getvalue() | 136 return fp.getvalue() |
134 | 137 |
135 def putcommit(self, files, copies, parents, commit, source, revmap, full, | 138 def putcommit(self, files, copies, parents, commit, source, revmap, full, |
136 cleanp2): | 139 cleanp2): |