# HG changeset patch # User Sean Farley # Date 2013-08-14 18:10:27 # Node ID c1ceec0c8cb438297ccee3043f07c696791ef4ef # Parent 4b93e19cd6e6d4128124daca990e6562883d40b3 patch: use ctx.node() instead of bare node variable Future patches will allow patch.diff to take a basectx so node1 (and node2) could make hexfunc error out. Instead, we'll call the node function on the context object directly. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1622,7 +1622,7 @@ def diff(repo, node1=None, node2=None, m 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: