hgext/rebase.py
changeset 44092 833210fbd900
parent 44090 2f0a44c69e07
child 44094 521b4e3a42d7
--- a/hgext/rebase.py	Fri Dec 27 15:14:19 2019 -0800
+++ b/hgext/rebase.py	Fri Dec 27 13:47:59 2019 -0800
@@ -1497,16 +1497,13 @@
         labels=[b'dest', b'source'],
         wc=wctx,
     )
-    destctx = repo[dest]
     if collapse:
-        copies.graftcopies(repo, wctx, ctx, destctx)
+        copies.graftcopies(wctx, ctx, repo[dest])
     else:
         # If we're not using --collapse, we need to
         # duplicate copies between the revision we're
-        # rebasing and its first parent, but *not*
-        # duplicate any copies that have already been
-        # performed in the destination.
-        copies.graftcopies(repo, wctx, ctx, ctx.p1(), skip=destctx)
+        # rebasing and its first parent.
+        copies.graftcopies(wctx, ctx, ctx.p1())
     return stats