changeset 8409:e84a8482c6f2

editor: move HG: filtering from ui to commiteditor
author Matt Mackall <mpm@selenic.com>
date Thu, 14 May 2009 13:21:17 -0500
parents 72538f1909ec
children 1d11d985c179
files mercurial/cmdutil.py mercurial/ui.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu May 14 13:20:40 2009 -0500
+++ b/mercurial/cmdutil.py	Thu May 14 13:21:17 2009 -0500
@@ -7,7 +7,7 @@
 
 from node import hex, nullid, nullrev, short
 from i18n import _
-import os, sys, bisect, stat, errno
+import os, sys, bisect, stat, errno, re
 import mdiff, bdiff, util, templater, patch, error, encoding
 import match as _match
 
@@ -1252,6 +1252,7 @@
     olddir = os.getcwd()
     os.chdir(repo.root)
     text = repo.ui.edit("\n".join(edittext), ctx.user())
+    text = re.sub("(?m)^HG:.*\n", "", text)
     os.chdir(olddir)
 
     if not text.strip():
--- a/mercurial/ui.py	Thu May 14 13:20:40 2009 -0500
+++ b/mercurial/ui.py	Thu May 14 13:21:17 2009 -0500
@@ -324,7 +324,6 @@
             f = open(name)
             t = f.read()
             f.close()
-            t = re.sub("(?m)^HG:.*\n", "", t)
         finally:
             os.unlink(name)