# HG changeset patch # User Matthieu Laneuville # Date 2017-12-08 07:47:18 # Node ID 10cce12fdcd3d816c6c7b8275f182f318dfa10bd # Parent d13526333835c6c539c346075354e78aa8132678 patch: reverse _inlinediff output for consistency diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -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