Mercurial > hg-stable
changeset 26550:72782f60dbc9
extract: directly assign parent to data dictionary
The temporary variables are not adding anything.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Oct 2015 02:05:56 -0700 |
parents | 1a680ccdb09a |
children | 5b8faea8b509 |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Tue Oct 06 02:04:46 2015 -0700 +++ b/mercurial/patch.py Tue Oct 06 02:05:56 2015 -0700 @@ -271,19 +271,16 @@ data['branch'] = branch return data - p1 = p2 = None if parents: - p1 = parents.pop(0) + data['p1'] = parents.pop(0) if parents: - p2 = parents.pop(0) + data['p2'] = parents.pop(0) data['filename'] = tmpname data['user'] = user data['date'] = date data['branch'] = branch data['nodeid'] = nodeid - data['p1'] = p1 - data['p2'] = p2 return data class patchmeta(object):