changeset 26549:1a680ccdb09a

extract: assign message only once This return is shared between the two cases. We can move it earlier.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 06 Oct 2015 02:04:46 -0700
parents 25a58881efdd
children 72782f60dbc9
files mercurial/patch.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Tue Oct 06 02:04:06 2015 -0700
+++ b/mercurial/patch.py	Tue Oct 06 02:04:46 2015 -0700
@@ -262,10 +262,10 @@
 
     if subject and not message.startswith(subject):
         message = '%s\n%s' % (subject, message)
+    data['message'] = message
     tmpfp.close()
     if not diffs_seen:
         os.unlink(tmpname)
-        data['message'] = message
         data['user'] = user
         data['date'] = date
         data['branch'] = branch
@@ -278,7 +278,6 @@
             p2 = parents.pop(0)
 
     data['filename'] = tmpname
-    data['message'] = message
     data['user'] = user
     data['date'] = date
     data['branch'] = branch