[PATCH 1 of 5] copies: avoid reference to c1/c2 in makectx
Matt Mackall
mpm at selenic.com
Tue Oct 13 22:35:57 UTC 2015
# HG changeset patch
# User Matt Mackall <mpm at selenic.com>
# Date 1440187978 18000
# Fri Aug 21 15:12:58 2015 -0500
# Node ID c56dab0f705a26a447902b6edf14609a35fb4bec
# Parent efd57cd6fd1d5eb76102fabfc45676873bbba29d
copies: avoid reference to c1/c2 in makectx
diff -r efd57cd6fd1d -r c56dab0f705a mercurial/copies.py
--- a/mercurial/copies.py Fri Sep 25 12:39:23 2015 -0700
+++ 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
More information about the Mercurial-devel
mailing list