equal
deleted
inserted
replaced
787 revert(ui, repo, **revert_opts) |
787 revert(ui, repo, **revert_opts) |
788 commit_opts = opts.copy() |
788 commit_opts = opts.copy() |
789 commit_opts['addremove'] = False |
789 commit_opts['addremove'] = False |
790 if not commit_opts['message'] and not commit_opts['logfile']: |
790 if not commit_opts['message'] and not commit_opts['logfile']: |
791 commit_opts['message'] = _("Backed out changeset %s") % (hex(node)) |
791 commit_opts['message'] = _("Backed out changeset %s") % (hex(node)) |
792 commit_opts['force_editor'] = True; |
792 commit_opts['force_editor'] = True |
793 commit(ui, repo, **commit_opts) |
793 commit(ui, repo, **commit_opts) |
794 def nice(node): |
794 def nice(node): |
795 return '%d:%s' % (repo.changelog.rev(node), short(node)) |
795 return '%d:%s' % (repo.changelog.rev(node), short(node)) |
796 ui.status(_('changeset %s backs out changeset %s\n') % |
796 ui.status(_('changeset %s backs out changeset %s\n') % |
797 (nice(repo.changelog.tip()), nice(node))) |
797 (nice(repo.changelog.tip()), nice(node))) |
986 repo.changes(files=fns, match=match)) |
986 repo.changes(files=fns, match=match)) |
987 files = modified + added + removed |
987 files = modified + added + removed |
988 else: |
988 else: |
989 files = [] |
989 files = [] |
990 try: |
990 try: |
991 try: |
|
992 force_editor = opts['force_editor'] |
|
993 except KeyError: |
|
994 force_editor = False |
|
995 repo.commit(files, message, opts['user'], opts['date'], match, |
991 repo.commit(files, message, opts['user'], opts['date'], match, |
996 force_editor=force_editor) |
992 force_editor=opts.get('force_editor')) |
997 except ValueError, inst: |
993 except ValueError, inst: |
998 raise util.Abort(str(inst)) |
994 raise util.Abort(str(inst)) |
999 |
995 |
1000 def docopy(ui, repo, pats, opts, wlock): |
996 def docopy(ui, repo, pats, opts, wlock): |
1001 # called with the repo lock held |
997 # called with the repo lock held |