Mercurial > hg
changeset 26551:5b8faea8b509
extract: move 'branch' assignment where it is parsed
There is one setter and no consumer, we can move it there directly.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Oct 2015 02:06:36 -0700 |
parents | 72782f60dbc9 |
children | 4caf143313a8 |
files | mercurial/patch.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Tue Oct 06 02:05:56 2015 -0700 +++ b/mercurial/patch.py Tue Oct 06 02:06:36 2015 -0700 @@ -190,7 +190,6 @@ # should try to parse msg['Date'] date = None nodeid = None - branch = None parents = [] if subject: @@ -236,7 +235,7 @@ elif line.startswith("# Date "): date = line[7:] elif line.startswith("# Branch "): - branch = line[9:] + data['branch'] = line[9:] elif line.startswith("# Node ID "): nodeid = line[10:] elif line.startswith("# Parent "): @@ -268,7 +267,6 @@ os.unlink(tmpname) data['user'] = user data['date'] = date - data['branch'] = branch return data if parents: @@ -279,7 +277,6 @@ data['filename'] = tmpname data['user'] = user data['date'] = date - data['branch'] = branch data['nodeid'] = nodeid return data