Mercurial > hg-stable
changeset 26655:f3c6540f2cd1
copies: avoid reference to c1/c2 in makectx
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 21 Aug 2015 15:12:58 -0500 |
parents | 30657909b2ba |
children | 3e3d783b0d59 |
files | mercurial/copies.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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