equal
deleted
inserted
replaced
146 |
146 |
147 e = opts.get('extrafn') # internal, used by e.g. hgsubversion |
147 e = opts.get('extrafn') # internal, used by e.g. hgsubversion |
148 self.extrafns = [_savegraft] |
148 self.extrafns = [_savegraft] |
149 if e: |
149 if e: |
150 self.extrafns = [e] |
150 self.extrafns = [e] |
|
151 self.extrafn = None |
151 |
152 |
152 self.keepf = opts.get('keep', False) |
153 self.keepf = opts.get('keep', False) |
153 self.keepbranchesf = opts.get('keepbranches', False) |
154 self.keepbranchesf = opts.get('keepbranches', False) |
154 # keepopen is not meant for use on the command line, but by |
155 # keepopen is not meant for use on the command line, but by |
155 # other extensions |
156 # other extensions |
496 rbsrt.currentbookmarks = repo._bookmarks.copy() |
497 rbsrt.currentbookmarks = repo._bookmarks.copy() |
497 rbsrt.activebookmark = rbsrt.activebookmark or repo._activebookmark |
498 rbsrt.activebookmark = rbsrt.activebookmark or repo._activebookmark |
498 if rbsrt.activebookmark: |
499 if rbsrt.activebookmark: |
499 bookmarks.deactivate(repo) |
500 bookmarks.deactivate(repo) |
500 |
501 |
501 extrafn = _makeextrafn(rbsrt.extrafns) |
502 rbsrt.extrafn = _makeextrafn(rbsrt.extrafns) |
502 |
503 |
503 rbsrt.sortedstate = sorted(rbsrt.state) |
504 rbsrt.sortedstate = sorted(rbsrt.state) |
504 total = len(rbsrt.sortedstate) |
505 total = len(rbsrt.sortedstate) |
505 pos = 0 |
506 pos = 0 |
506 for rev in rbsrt.sortedstate: |
507 for rev in rbsrt.sortedstate: |
540 ui.setconfig('ui', 'forcemerge', '', 'rebase') |
541 ui.setconfig('ui', 'forcemerge', '', 'rebase') |
541 if not rbsrt.collapsef: |
542 if not rbsrt.collapsef: |
542 merging = p2 != nullrev |
543 merging = p2 != nullrev |
543 editform = cmdutil.mergeeditform(merging, 'rebase') |
544 editform = cmdutil.mergeeditform(merging, 'rebase') |
544 editor = cmdutil.getcommiteditor(editform=editform, **opts) |
545 editor = cmdutil.getcommiteditor(editform=editform, **opts) |
545 newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn, |
546 newnode = concludenode(repo, rev, p1, p2, |
|
547 extrafn=rbsrt.extrafn, |
546 editor=editor, |
548 editor=editor, |
547 keepbranches=rbsrt.keepbranchesf, |
549 keepbranches=rbsrt.keepbranchesf, |
548 date=rbsrt.date) |
550 date=rbsrt.date) |
549 else: |
551 else: |
550 # Skip commit if we are collapsing |
552 # Skip commit if we are collapsing |
601 editopt = True |
603 editopt = True |
602 editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
604 editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
603 revtoreuse = rbsrt.sortedstate[-1] |
605 revtoreuse = rbsrt.sortedstate[-1] |
604 newnode = concludenode(repo, revtoreuse, p1, rbsrt.external, |
606 newnode = concludenode(repo, revtoreuse, p1, rbsrt.external, |
605 commitmsg=commitmsg, |
607 commitmsg=commitmsg, |
606 extrafn=extrafn, editor=editor, |
608 extrafn=rbsrt.extrafn, editor=editor, |
607 keepbranches=rbsrt.keepbranchesf, |
609 keepbranches=rbsrt.keepbranchesf, |
608 date=rbsrt.date) |
610 date=rbsrt.date) |
609 if newnode is None: |
611 if newnode is None: |
610 newrev = rbsrt.target |
612 newrev = rbsrt.target |
611 else: |
613 else: |