absorb: migrate to new method for getting copy info
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 23 Feb 2019 09:15:36 -0800
changeset 41778 8843bc1fc14d
parent 41777 c3a249c2b6b3
child 41779 6ed520c3e932
absorb: migrate to new method for getting copy info Differential Revision: https://phab.mercurial-scm.org/D6018
hgext/absorb.py
--- a/hgext/absorb.py	Mon Feb 11 15:28:04 2019 -0800
+++ b/hgext/absorb.py	Sat Feb 23 09:15:36 2019 -0800
@@ -191,9 +191,9 @@
             pctx = None # do not add another immutable fctx
             break
         fctxmap[ctx] = fctx # only for mutable fctxs
-        renamed = fctx.renamed()
-        if renamed:
-            path = renamed[0] # follow rename
+        copy = fctx.copysource()
+        if copy:
+            path = copy # follow rename
             if path in ctx: # but do not follow copy
                 pctx = ctx.p1()
                 break
@@ -232,8 +232,8 @@
         else:
             content = fctx.data()
         mode = (fctx.islink(), fctx.isexec())
-        renamed = fctx.renamed() # False or (path, node)
-        return content, mode, (renamed and renamed[0])
+        copy = fctx.copysource()
+        return content, mode, copy
 
 def overlaycontext(memworkingcopy, ctx, parents=None, extra=None):
     """({path: content}, ctx, (p1node, p2node)?, {}?) -> memctx