Comments
Patch
@@ -1542,10 +1542,13 @@
opts = mdiff.defaultopts
if not node1 and not node2:
node1 = repo.dirstate.p1()
+ ctx1 = context.nodeorctx(repo, node1)
+ ctx2 = context.nodeorctx(repo, node2)
+
def lrugetfilectx():
cache = {}
order = util.deque()
def getfilectx(f, ctx):
fctx = ctx.filectx(f, filelog=cache.get(f))
@@ -1558,23 +1561,20 @@
order.append(f)
return fctx
return getfilectx
getfilectx = lrugetfilectx()
- ctx1 = repo[node1]
- ctx2 = repo[node2]
-
if not changes:
changes = repo.status(ctx1, ctx2, match=match)
modified, added, removed = changes[:3]
if not modified and not added and not removed:
return []
revs = None
hexfunc = repo.ui.debugflag and hex or short
- revs = [hexfunc(node) for node in [node1, node2] if node]
+ revs = [hexfunc(node) for node in [ctx1.node(), ctx2.node()] if node]
copy = {}
if opts.git or opts.upgrade:
copy = copies.pathcopies(ctx1, ctx2)