mercurial/localrepo.py
changeset 2267 d812d91c5a84
parent 2259 181b0643ffb1
child 2269 8cb77698f5fd
--- a/mercurial/localrepo.py	Thu May 11 09:01:32 2006 -0700
+++ b/mercurial/localrepo.py	Thu May 11 14:32:09 2006 -0700
@@ -446,7 +446,8 @@
             self.dirstate.setparents(n, nullid)
 
     def commit(self, files=None, text="", user=None, date=None,
-               match=util.always, force=False, lock=None, wlock=None):
+               match=util.always, force=False, lock=None, wlock=None,
+               force_editor=False):
         commit = []
         remove = []
         changed = []
@@ -535,8 +536,11 @@
         new.sort()
 
         user = user or self.ui.username()
-        if not text:
-            edittext = [""]
+        if not text or force_editor:
+            edittext = []
+            if text:
+                edittext.append(text)
+            edittext.append("")
             if p2 != nullid:
                 edittext.append("HG: branch merge")
             edittext.extend(["HG: changed %s" % f for f in changed])