changeset 662:b55a78595ef6

Pass username to hgeditor, remove temporary file # HG changeset patch # User Radoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl> # Node ID 5c5d1484b51a53918575a199ab8985160f0ce2d7 # Parent 8c89408a7154d2da94766e957a088407fd0fef93 Pass username to hgeditor, remove temporary file
author Radoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl>
date Sun, 10 Jul 2005 16:00:17 -0800
parents 148f642d1f8e
children 562404de61fb
files mercurial/ui.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Sun Jul 10 15:59:26 2005 -0800
+++ b/mercurial/ui.py	Sun Jul 10 16:00:17 2005 -0800
@@ -97,9 +97,12 @@
                   os.environ.get("HGEDITOR") or
                   os.environ.get("EDITOR", "vi"))
 
+        os.environ["HGUSER"] = self.username()
         util.system("%s %s" % (editor, name), errprefix = "edit failed")
 
         t = open(name).read()
         t = re.sub("(?m)^HG:.*\n", "", t)
 
+        os.unlink(name)
+
         return t