Mercurial > hg
changeset 24005:2c166f6b5d10
trydiff: inline indexmeta()
The function is trivial and is only called in one place.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 16 Jan 2015 15:40:59 -0800 |
parents | 8a5267cd5286 |
children | 42fa7eeb858e |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Jan 23 14:09:49 2015 -0800 +++ b/mercurial/patch.py Fri Jan 16 15:40:59 2015 -0800 @@ -1739,9 +1739,6 @@ def trydiff(repo, revs, ctx1, ctx2, modified, added, removed, copy, getfilectx, opts, losedatafn, prefix): - def addindexmeta(meta, index1, index2): - meta.append('index %s..%s\n' % (index1, index2)) - def gitindex(text): if not text: text = "" @@ -1869,7 +1866,8 @@ if binarydiff and not opts.nobinary: text = mdiff.b85diff(content1, content2) if text and opts.git: - addindexmeta(header, gitindex(content1), gitindex(content2)) + header.append('index %s..%s\n' % + (gitindex(content1), gitindex(content2))) else: text = mdiff.unidiff(content1, date1, content2, date2,