patch: rename "header" variable into "hdr" in diff()
authorDenis Laxalde <denis.laxalde@logilab.fr>
Tue, 26 Sep 2017 18:17:47 +0200
changeset 34561 fe6125ebdf91
parent 34560 1248aa48cac9
child 34562 c2d2e18f9700
patch: rename "header" variable into "hdr" in diff() The "header" variable was hiding the eponymous class, hence preventing its usage.
mercurial/patch.py
--- a/mercurial/patch.py	Thu Oct 05 08:03:57 2017 -0700
+++ b/mercurial/patch.py	Tue Sep 26 18:17:47 2017 +0200
@@ -2316,13 +2316,13 @@
 
     copy, if not empty, should contain mappings {dst@y: src@x} of copy
     information.'''
-    for header, hunks in diffhunks(repo, node1=node1, node2=node2, match=match,
-                                   changes=changes, opts=opts,
-                                   losedatafn=losedatafn, prefix=prefix,
-                                   relroot=relroot, copy=copy):
+    for hdr, hunks in diffhunks(repo, node1=node1, node2=node2, match=match,
+                                changes=changes, opts=opts,
+                                losedatafn=losedatafn, prefix=prefix,
+                                relroot=relroot, copy=copy):
         text = ''.join(sum((list(hlines) for hrange, hlines in hunks), []))
-        if header and (text or len(header) > 1):
-            yield '\n'.join(header) + '\n'
+        if hdr and (text or len(hdr) > 1):
+            yield '\n'.join(hdr) + '\n'
         if text:
             yield text