Pass username to hgeditor, remove temporary file
authorRadoslaw "AstralStorm" Szkodzinski <astralstorm@gorzow.mm.pl>
Sun, 10 Jul 2005 16:00:17 -0800
changeset 662 b55a78595ef6
parent 661 148f642d1f8e
child 663 562404de61fb
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
mercurial/ui.py
--- 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