merge with crew.
--- a/mercurial/commands.py Thu May 11 10:14:48 2006 -0700
+++ b/mercurial/commands.py Thu May 11 14:46:24 2006 -0700
@@ -789,6 +789,7 @@
commit_opts['addremove'] = False
if not commit_opts['message'] and not commit_opts['logfile']:
commit_opts['message'] = _("Backed out changeset %s") % (hex(node))
+ commit_opts['force_editor'] = True
commit(ui, repo, **commit_opts)
def nice(node):
return '%d:%s' % (repo.changelog.rev(node), short(node))
@@ -987,7 +988,8 @@
else:
files = []
try:
- repo.commit(files, message, opts['user'], opts['date'], match)
+ repo.commit(files, message, opts['user'], opts['date'], match,
+ force_editor=opts.get('force_editor'))
except ValueError, inst:
raise util.Abort(str(inst))
--- a/mercurial/localrepo.py Thu May 11 10:14:48 2006 -0700
+++ b/mercurial/localrepo.py Thu May 11 14:46:24 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])
--- a/tests/test-backout.out Thu May 11 10:14:48 2006 -0700
+++ b/tests/test-backout.out Thu May 11 14:46:24 2006 -0700
@@ -1,19 +1,19 @@
# basic operation
adding a
-changeset 2:b38a34ddfd9f backs out changeset 1:a820f4f40a57
+changeset 2:c86754337410 backs out changeset 1:a820f4f40a57
a
# file that was removed is recreated
adding a
adding a
-changeset 2:44cd84c7349a backs out changeset 1:76862dcce372
+changeset 2:d2d961bd79f2 backs out changeset 1:76862dcce372
content
# backout of backout is as if nothing happened
removing a
-changeset 3:0dd8a0ed5e99 backs out changeset 2:44cd84c7349a
+changeset 3:8a7eeb5ab5ce backs out changeset 2:d2d961bd79f2
cat: a: No such file or directory
# backout with merge
adding a
-changeset 3:6c77ecc28460 backs out changeset 1:314f55b1bf23
+changeset 3:3c9e845b409c backs out changeset 1:314f55b1bf23
merging with changeset 2:b66ea5b77abb
merging a
0 files updated, 1 files merged, 0 files removed, 0 files unresolved