extract: move 'branch' assignment where it is parsed
There is one setter and no consumer, we can move it there directly.
--- 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