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
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -97,9 +97,12 @@ class ui:
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