mercurial/ui.py
changeset 20605 a8aa699a812a
parent 20603 cc76c619bed6
child 20606 be140ebd506b
--- a/mercurial/ui.py	Thu Feb 06 10:15:20 2014 +0400
+++ b/mercurial/ui.py	Thu Feb 06 12:21:20 2014 +0400
@@ -722,10 +722,16 @@
             f.write(text)
             f.close()
 
+            environ = {'HGUSER': user}
+            for label in ('source', 'rebase_source'):
+                if label in extra:
+                    environ.update({'HGREVISION': extra[label]})
+                    break
+
             editor = self.geteditor()
 
             util.system("%s \"%s\"" % (editor, name),
-                        environ={'HGUSER': user},
+                        environ=environ,
                         onerr=util.Abort, errprefix=_("edit failed"),
                         out=self.fout)