# HG changeset patch # User Martin von Zweigbergk # Date 2019-02-23 17:15:36 # Node ID 8843bc1fc14d89884b16495d546f18e0b91f0fa0 # Parent c3a249c2b6b30446dd13c9fe2891b658dfc38100 absorb: migrate to new method for getting copy info Differential Revision: https://phab.mercurial-scm.org/D6018 diff --git a/hgext/absorb.py b/hgext/absorb.py --- a/hgext/absorb.py +++ b/hgext/absorb.py @@ -191,9 +191,9 @@ def getfilestack(stack, path, seenfctxs= 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 @@ class overlaystore(patch.filestore): 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