Show More
@@ -454,13 +454,13 class rebaseruntime(object): | |||||
454 | overrides = {('phases', 'new-commit'): destphase} |
|
454 | overrides = {('phases', 'new-commit'): destphase} | |
455 | if keepbranch: |
|
455 | if keepbranch: | |
456 | overrides[('ui', 'allowemptycommit')] = True |
|
456 | overrides[('ui', 'allowemptycommit')] = True | |
|
457 | with repo.ui.configoverride(overrides, 'rebase'): | |||
457 | if self.inmemory: |
|
458 | if self.inmemory: | |
458 | newnode = concludememorynode(repo, ctx, p1, p2, |
|
459 | newnode = concludememorynode(repo, ctx, p1, p2, | |
459 | wctx=self.wctx, |
|
460 | wctx=self.wctx, | |
460 | extra=extra, |
|
461 | extra=extra, | |
461 | commitmsg=commitmsg, |
|
462 | commitmsg=commitmsg, | |
462 | editor=editor, |
|
463 | editor=editor, | |
463 | overrides=overrides, |
|
|||
464 | date=self.date) |
|
464 | date=self.date) | |
465 | mergemod.mergestate.clean(repo) |
|
465 | mergemod.mergestate.clean(repo) | |
466 | else: |
|
466 | else: | |
@@ -468,7 +468,6 class rebaseruntime(object): | |||||
468 | extra=extra, |
|
468 | extra=extra, | |
469 | commitmsg=commitmsg, |
|
469 | commitmsg=commitmsg, | |
470 | editor=editor, |
|
470 | editor=editor, | |
471 | overrides=overrides, |
|
|||
472 | date=self.date) |
|
471 | date=self.date) | |
473 |
|
472 | |||
474 | if newnode is None: |
|
473 | if newnode is None: | |
@@ -1028,12 +1027,10 def externalparent(repo, state, destance | |||||
1028 | (max(destancestors), |
|
1027 | (max(destancestors), | |
1029 | ', '.join("%d" % p for p in sorted(parents)))) |
|
1028 | ', '.join("%d" % p for p in sorted(parents)))) | |
1030 |
|
1029 | |||
1031 |
def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, |
|
1030 | def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, date, commitmsg): | |
1032 | commitmsg): |
|
|||
1033 | '''Commit the memory changes with parents p1 and p2. Reuse commit info from |
|
1031 | '''Commit the memory changes with parents p1 and p2. Reuse commit info from | |
1034 | ctx. |
|
1032 | ctx. | |
1035 | Return node of committed revision.''' |
|
1033 | Return node of committed revision.''' | |
1036 | with repo.ui.configoverride(overrides, 'rebase'): |
|
|||
1037 |
|
|
1034 | # Replicates the empty check in ``repo.commit``. | |
1038 |
|
|
1035 | if wctx.isempty() and not repo.ui.configbool('ui', 'allowemptycommit'): | |
1039 |
|
|
1036 | return None | |
@@ -1053,8 +1050,7 def concludememorynode(repo, ctx, p1, p2 | |||||
1053 |
|
|
1050 | wctx.clean() # Might be reused | |
1054 |
|
|
1051 | return commitres | |
1055 |
|
1052 | |||
1056 |
def concludenode(repo, ctx, p1, p2, editor, extra, |
|
1053 | def concludenode(repo, ctx, p1, p2, editor, extra, date, commitmsg): | |
1057 | commitmsg): |
|
|||
1058 | '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx. |
|
1054 | '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx. | |
1059 | Return node of committed revision.''' |
|
1055 | Return node of committed revision.''' | |
1060 | dsguard = util.nullcontextmanager() |
|
1056 | dsguard = util.nullcontextmanager() | |
@@ -1063,7 +1059,6 def concludenode(repo, ctx, p1, p2, edit | |||||
1063 | with dsguard: |
|
1059 | with dsguard: | |
1064 | repo.setparents(repo[p1].node(), repo[p2].node()) |
|
1060 | repo.setparents(repo[p1].node(), repo[p2].node()) | |
1065 |
|
1061 | |||
1066 | with repo.ui.configoverride(overrides, 'rebase'): |
|
|||
1067 |
|
|
1062 | # Commit might fail if unresolved files exist | |
1068 |
|
|
1063 | if date is None: | |
1069 |
|
|
1064 | date = ctx.date() |
General Comments 0
You need to be logged in to leave comments.
Login now