Skip to content
Snippets Groups Projects
Commit f3c6540f authored by Matt Mackall's avatar Matt Mackall
Browse files

copies: avoid reference to c1/c2 in makectx

parent 30657909
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment