Mercurial > hg
changeset 34561:fe6125ebdf91
patch: rename "header" variable into "hdr" in diff()
The "header" variable was hiding the eponymous class, hence preventing its
usage.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Tue, 26 Sep 2017 18:17:47 +0200 |
parents | 1248aa48cac9 |
children | c2d2e18f9700 |
files | mercurial/patch.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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