Mercurial > evolve
comparison hgext/evolve.py @ 1786:b674277ea4ef stable
uncommit: don't lose copy information of remaining files (issue5403)
As reported in the issue, "hg uncommit" would lose copy information of
the files that remained in the commit. The problem was simply that the
a dict of copies was iterated as "src, dst in copies.items()" where it
should have been "dst, src ...".
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 31 Jan 2017 12:32:45 -0800 |
parents | c3741a5adbb0 |
children | e553fc96447d |
comparison
equal
deleted
inserted
replaced
1784:c3741a5adbb0 | 1786:b674277ea4ef |
---|---|
2685 if not newcontent and files == initialfiles: | 2685 if not newcontent and files == initialfiles: |
2686 return None | 2686 return None |
2687 | 2687 |
2688 # Filter copies | 2688 # Filter copies |
2689 copied = copies.pathcopies(target, ctx) | 2689 copied = copies.pathcopies(target, ctx) |
2690 copied = dict((src, dst) for src, dst in copied.iteritems() | 2690 copied = dict((dst, src) for dst, src in copied.iteritems() |
2691 if dst in files) | 2691 if dst in files) |
2692 def filectxfn(repo, memctx, path, contentctx=ctx, redirect=newcontent): | 2692 def filectxfn(repo, memctx, path, contentctx=ctx, redirect=newcontent): |
2693 if path in redirect: | 2693 if path in redirect: |
2694 return filectxfn(repo, memctx, path, contentctx=target, redirect=()) | 2694 return filectxfn(repo, memctx, path, contentctx=target, redirect=()) |
2695 if path not in contentctx: | 2695 if path not in contentctx: |