# HG changeset patch # User Matt Mackall # Date 1440187978 18000 # Node ID f3c6540f2cd1ddb449bcace79209944181c548c0 # Parent 30657909b2ba0b0f43dea12fc0ef99aa6fb27a60 copies: avoid reference to c1/c2 in makectx diff -r 30657909b2ba -r f3c6540f2cd1 mercurial/copies.py --- a/mercurial/copies.py Mon Oct 12 03:37:09 2015 -0500 +++ b/mercurial/copies.py Fri Aug 21 15:12:58 2015 -0500 @@ -300,6 +300,7 @@ """ rev = ctx.rev() ac = getattr(ctx, '_ancestrycontext', None) + repo = ctx._repo if ac is None: revs = [rev] if rev is None: @@ -308,9 +309,9 @@ ctx._ancestrycontext = ac def makectx(f, n): if len(n) != 20: # in a working context? - if c1.rev() is None: - return c1.filectx(f) - return c2.filectx(f) + if ctx.rev() is None: + return ctx.filectx(f) + return repo[None][f] fctx = repo.filectx(f, fileid=n) # setup only needed for filectx not create from a changectx fctx._ancestrycontext = ac