486 repo.dirstate.setbranch(branch) |
486 repo.dirstate.setbranch(branch) |
487 cmdutil.revert(ui, repo, rctx, repo.dirstate.parents()) |
487 cmdutil.revert(ui, repo, rctx, repo.dirstate.parents()) |
488 |
488 |
489 |
489 |
490 def commitfunc(ui, repo, message, match, opts): |
490 def commitfunc(ui, repo, message, match, opts): |
491 e = cmdutil.commiteditor |
491 e = cmdutil.getcommiteditor() |
492 if not message: |
492 if not message: |
493 # we don't translate commit messages |
493 # we don't translate commit messages |
494 message = "Backed out changeset %s" % short(node) |
494 message = "Backed out changeset %s" % short(node) |
495 e = cmdutil.commitforceeditor |
495 e = cmdutil.getcommiteditor(edit=True) |
496 return repo.commit(message, opts.get('user'), opts.get('date'), |
496 return repo.commit(message, opts.get('user'), opts.get('date'), |
497 match, editor=e) |
497 match, editor=e) |
498 newnode = cmdutil.commit(ui, repo, commitfunc, [], opts) |
498 newnode = cmdutil.commit(ui, repo, commitfunc, [], opts) |
499 if not newnode: |
499 if not newnode: |
500 ui.status(_("nothing changed\n")) |
500 ui.status(_("nothing changed\n")) |