[PATCH 1 of 2] patch: reverse _inlinediff output for consistency

matthieu.laneuville at octobus.net matthieu.laneuville at octobus.net
Fri Dec 8 04:42:11 EST 2017


# HG changeset patch
# User Matthieu Laneuville <matthieu.laneuville at octobus.net>
# Date 1512719238 -32400
#      Fri Dec 08 16:47:18 2017 +0900
# Node ID 8e3ebafd54d664a1f3ce2032b20cff92b5b399fb
# Parent  483b5dd0f1aa412e9611ab694279c9d3735fee99
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8e3ebafd54d6
# EXP-Topic inline-diff
patch: reverse _inlinediff output for consistency

diff -r 483b5dd0f1aa -r 8e3ebafd54d6 mercurial/patch.py
--- a/mercurial/patch.py	Wed Dec 06 23:33:01 2017 +0100
+++ b/mercurial/patch.py	Fri Dec 08 16:47:18 2017 +0900
@@ -2515,7 +2515,7 @@ def difflabel(func, *args, **kw):
                                 yield (token, 'diff.tab')
                             else:
                                 if i in matches:
-                                    for l, t in _inlinediff(
+                                    for t, l in _inlinediff(
                                                   lines[i].rstrip(),
                                                   lines[matches[i]].rstrip(),
                                                   label):
@@ -2587,10 +2587,10 @@ def _inlinediff(s1, s2, operation):
             token += part[2:]
             continue
         else:
-            buff.append((label, token))
+            buff.append((token, label))
             label = l
             token = part[2:]
-    buff.append((label, token))
+    buff.append((token, label))
 
     return buff
 


More information about the Mercurial-devel mailing list