[Updated] D8503: diff: avoid going from contexts to nodes and back
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed May 13 00:21:41 UTC 2020
Closed by commit rHG8c0c1161614e: diff: avoid going from contexts to nodes and back (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8503?vs=21340&id=21367
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8503/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8503
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2492,7 +2492,11 @@
node1, node2 = ctx1.node(), ctx2.node()
if reverse:
- node1, node2 = node2, node1
+ ctxleft = ctx2
+ ctxright = ctx1
+ else:
+ ctxleft = ctx1
+ ctxright = ctx2
diffopts = patch.diffallopts(ui, opts)
m = scmutil.match(ctx2, pats, opts)
@@ -2502,8 +2506,8 @@
ui,
repo,
diffopts,
- repo[node1],
- repo[node2],
+ ctxleft,
+ ctxright,
m,
stat=stat,
listsubrepos=opts.get(b'subrepos'),
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200513/c91db67f/attachment-0002.html>
More information about the Mercurial-patches
mailing list