##// END OF EJS Templates
backout: accept '--edit' like other commands creating new changeset...
FUJIWARA Katsunori -
r21712:51035af2 default
parent child Browse files
Show More
@@ -386,6 +386,7 b' def archive(ui, repo, dest, **opts):'
386 ('', 'parent', '',
386 ('', 'parent', '',
387 _('parent to choose when backing out merge (DEPRECATED)'), _('REV')),
387 _('parent to choose when backing out merge (DEPRECATED)'), _('REV')),
388 ('r', 'rev', '', _('revision to backout'), _('REV')),
388 ('r', 'rev', '', _('revision to backout'), _('REV')),
389 ('e', 'edit', False, _('invoke editor on commit messages')),
389 ] + mergetoolopts + walkopts + commitopts + commitopts2,
390 ] + mergetoolopts + walkopts + commitopts + commitopts2,
390 _('[OPTION]... [-r] REV'))
391 _('[OPTION]... [-r] REV'))
391 def backout(ui, repo, node=None, rev=None, **opts):
392 def backout(ui, repo, node=None, rev=None, **opts):
@@ -488,7 +489,7 b' def backout(ui, repo, node=None, rev=Non'
488
489
489
490
490 def commitfunc(ui, repo, message, match, opts):
491 def commitfunc(ui, repo, message, match, opts):
491 e = cmdutil.getcommiteditor()
492 e = cmdutil.getcommiteditor(**opts)
492 if not message:
493 if not message:
493 # we don't translate commit messages
494 # we don't translate commit messages
494 message = "Backed out changeset %s" % short(node)
495 message = "Backed out changeset %s" % short(node)
@@ -355,9 +355,21 b' without --merge'
355 update: (current)
355 update: (current)
356
356
357 with --merge
357 with --merge
358 (this also tests that editor is invoked if '--edit' is specified
359 explicitly regardless of '--message')
360
358 $ hg update -qC
361 $ hg update -qC
359 $ hg backout --merge -d '3 0' -r 1 -m 'backout on branch1' --tool=true
362 $ HGEDITOR=cat hg backout --merge -d '3 0' -r 1 -m 'backout on branch1' --tool=true --edit
360 removing file1
363 removing file1
364 backout on branch1
365
366
367 HG: Enter commit message. Lines beginning with 'HG:' are removed.
368 HG: Leave message empty to abort commit.
369 HG: --
370 HG: user: test
371 HG: branch 'branch2'
372 HG: removed file1
361 created new head
373 created new head
362 changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3
374 changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3
363 merging with changeset 3:d4e8f6db59fb
375 merging with changeset 3:d4e8f6db59fb
@@ -215,7 +215,7 b' Show all commands + options'
215 update: clean, check, date, rev, tool
215 update: clean, check, date, rev, tool
216 addremove: similarity, include, exclude, dry-run
216 addremove: similarity, include, exclude, dry-run
217 archive: no-decode, prefix, rev, type, subrepos, include, exclude
217 archive: no-decode, prefix, rev, type, subrepos, include, exclude
218 backout: merge, parent, rev, tool, include, exclude, message, logfile, date, user
218 backout: merge, parent, rev, edit, tool, include, exclude, message, logfile, date, user
219 bisect: reset, good, bad, skip, extend, command, noupdate
219 bisect: reset, good, bad, skip, extend, command, noupdate
220 bookmarks: force, rev, delete, rename, inactive
220 bookmarks: force, rev, delete, rename, inactive
221 branch: force, clean
221 branch: force, clean
General Comments 0
You need to be logged in to leave comments. Login now