Mercurial > hg-stable
changeset 21833:c1ceec0c8cb4
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.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Aug 2013 13:10:27 -0500 |
parents | 4b93e19cd6e6 |
children | e4d35aa9056c |
files | mercurial/patch.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Wed Jul 02 00:01:13 2014 -0500 +++ b/mercurial/patch.py Wed Aug 14 13:10:27 2013 -0500 @@ -1622,7 +1622,7 @@ 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: