equal
deleted
inserted
replaced
739 raise util.Abort( |
739 raise util.Abort( |
740 _('histedit requires exactly one ancestor revision')) |
740 _('histedit requires exactly one ancestor revision')) |
741 |
741 |
742 |
742 |
743 replacements = [] |
743 replacements = [] |
744 keep = opts.get('keep', False) |
744 state.keep = opts.get('keep', False) |
745 |
745 |
746 # rebuild state |
746 # rebuild state |
747 if goal == 'continue': |
747 if goal == 'continue': |
748 state.read() |
748 state.read() |
749 state = bootstrapcontinue(ui, state, opts) |
749 state = bootstrapcontinue(ui, state, opts) |
808 if len(rr) != 1: |
808 if len(rr) != 1: |
809 raise util.Abort(_('The specified revisions must have ' |
809 raise util.Abort(_('The specified revisions must have ' |
810 'exactly one common root')) |
810 'exactly one common root')) |
811 root = rr[0].node() |
811 root = rr[0].node() |
812 |
812 |
813 revs = between(repo, root, topmost, keep) |
813 revs = between(repo, root, topmost, state.keep) |
814 if not revs: |
814 if not revs: |
815 raise util.Abort(_('%s is not an ancestor of working directory') % |
815 raise util.Abort(_('%s is not an ancestor of working directory') % |
816 node.short(root)) |
816 node.short(root)) |
817 |
817 |
818 ctxs = [repo[r] for r in revs] |
818 ctxs = [repo[r] for r in revs] |
832 |
832 |
833 parentctxnode = repo[root].parents()[0].node() |
833 parentctxnode = repo[root].parents()[0].node() |
834 |
834 |
835 state.parentctxnode = parentctxnode |
835 state.parentctxnode = parentctxnode |
836 state.rules = rules |
836 state.rules = rules |
837 state.keep = keep |
|
838 state.topmost = topmost |
837 state.topmost = topmost |
839 state.replacements = replacements |
838 state.replacements = replacements |
840 |
839 |
841 # Create a backup so we can always abort completely. |
840 # Create a backup so we can always abort completely. |
842 backupfile = None |
841 backupfile = None |
868 if len(succs) > 1: |
867 if len(succs) > 1: |
869 m = 'histedit: %s' |
868 m = 'histedit: %s' |
870 for n in succs[1:]: |
869 for n in succs[1:]: |
871 ui.debug(m % node.short(n)) |
870 ui.debug(m % node.short(n)) |
872 |
871 |
873 if not keep: |
872 if not state.keep: |
874 if mapping: |
873 if mapping: |
875 movebookmarks(ui, repo, mapping, state.topmost, ntm) |
874 movebookmarks(ui, repo, mapping, state.topmost, ntm) |
876 # TODO update mq state |
875 # TODO update mq state |
877 if obsolete.isenabled(repo, obsolete.createmarkersopt): |
876 if obsolete.isenabled(repo, obsolete.createmarkersopt): |
878 markers = [] |
877 markers = [] |