mercurial/commands.py
changeset 21413 edc55317de90
parent 21412 6f6ccb0bb6af
child 21414 37a302f0e297
equal deleted inserted replaced
21412:6f6ccb0bb6af 21413:edc55317de90
   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"))