Mercurial > hg
diff hgext/convert/hg.py @ 19457:948df0f10ec1
convert: fix bad conversion of copies when hg.startrev is specified
The 'copynode' was looked up in self.keep as if it was a changeset node. It is
however a filelog node, and self.keep would thus fail if it actually looked at
its parameter ... which it only did if a startrev was specified.
Instead we now don't check the copy node - we don't have to. It must have been
copied from one of the parents, and we already check whether one of the parents
have the copy source.
We could perhaps use linkrev to see if the corresponding changeset was
converted ... but that would sometimes be wrong.
The existing test of this was wrong - now it is better, but it seems like it
exposes a 'log' issue.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 19 Jul 2013 01:40:57 +0200 |
parents | 58e782f076e7 |
children | 9057855d8749 |
line wrap: on
line diff
--- a/hgext/convert/hg.py Fri Jul 19 01:18:15 2013 +0200 +++ b/hgext/convert/hg.py Fri Jul 19 01:40:57 2013 +0200 @@ -316,8 +316,8 @@ if name in self.ignored: continue try: - copysource, copynode = ctx.filectx(name).renamed() - if copysource in self.ignored or not self.keep(copynode): + copysource, _copynode = ctx.filectx(name).renamed() + if copysource in self.ignored: continue # Ignore copy sources not in parent revisions found = False