changeset 38570:2523c0200df4

diff: use `context.diff` to produce diff We want to make sure `context.diff` if full featured. Using it in the main diff code path is a good way to do so. The end goal is to be able to easily compute diff between in-memory context.
author Boris Feld <boris.feld@octobus.net>
date Wed, 23 May 2018 15:31:44 +0200
parents 62249cfe02d2
children 30a027c0e327
files mercurial/logcmdutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/logcmdutil.py	Sat Jun 23 15:03:05 2018 +0200
+++ b/mercurial/logcmdutil.py	Wed May 23 15:31:44 2018 +0200
@@ -76,9 +76,9 @@
         if not ui.plain():
             width = ui.termwidth()
 
-    chunks = patch.diff(repo, node1, node2, match, changes, opts=diffopts,
-                        prefix=prefix, relroot=relroot,
-                        hunksfilterfn=hunksfilterfn)
+    chunks = repo[node2].diff(repo[node1], match, changes, opts=diffopts,
+                              prefix=prefix, relroot=relroot,
+                              hunksfilterfn=hunksfilterfn)
 
     if fp is not None or ui.canwritewithoutlabels():
         out = fp or ui