##// END OF EJS Templates
rebase: pass in entire "overrides" dict to conclude[memory]node()...
Martin von Zweigbergk -
r37057:7616073a default
parent child Browse files
Show More
@@ -450,13 +450,17 b' class rebaseruntime(object):'
450 for c in self.extrafns:
450 for c in self.extrafns:
451 c(ctx, extra)
451 c(ctx, extra)
452 keepbranch = self.keepbranchesf and repo[p1].branch() != ctx.branch()
452 keepbranch = self.keepbranchesf and repo[p1].branch() != ctx.branch()
453 destphase = max(ctx.phase(), phases.draft)
454 overrides = {('phases', 'new-commit'): destphase}
455 if keepbranch:
456 overrides[('ui', 'allowemptycommit')] = True
453 if self.inmemory:
457 if self.inmemory:
454 newnode = concludememorynode(repo, ctx, p1, p2,
458 newnode = concludememorynode(repo, ctx, p1, p2,
455 wctx=self.wctx,
459 wctx=self.wctx,
456 extra=extra,
460 extra=extra,
457 commitmsg=commitmsg,
461 commitmsg=commitmsg,
458 editor=editor,
462 editor=editor,
459 keepbranch=keepbranch,
463 overrides=overrides,
460 date=self.date)
464 date=self.date)
461 mergemod.mergestate.clean(repo)
465 mergemod.mergestate.clean(repo)
462 else:
466 else:
@@ -464,7 +468,7 b' class rebaseruntime(object):'
464 extra=extra,
468 extra=extra,
465 commitmsg=commitmsg,
469 commitmsg=commitmsg,
466 editor=editor,
470 editor=editor,
467 keepbranch=keepbranch,
471 overrides=overrides,
468 date=self.date)
472 date=self.date)
469
473
470 if newnode is None:
474 if newnode is None:
@@ -1024,15 +1028,11 b' def externalparent(repo, state, destance'
1024 (max(destancestors),
1028 (max(destancestors),
1025 ', '.join("%d" % p for p in sorted(parents))))
1029 ', '.join("%d" % p for p in sorted(parents))))
1026
1030
1027 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, keepbranch,
1031 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, overrides, date,
1028 date, commitmsg):
1032 commitmsg):
1029 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1033 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1030 ctx.
1034 ctx.
1031 Return node of committed revision.'''
1035 Return node of committed revision.'''
1032 destphase = max(ctx.phase(), phases.draft)
1033 overrides = {('phases', 'new-commit'): destphase}
1034 if keepbranch:
1035 overrides[('ui', 'allowemptycommit')] = True
1036 with repo.ui.configoverride(overrides, 'rebase'):
1036 with repo.ui.configoverride(overrides, 'rebase'):
1037 # Replicates the empty check in ``repo.commit``.
1037 # Replicates the empty check in ``repo.commit``.
1038 if wctx.isempty() and not repo.ui.configbool('ui', 'allowemptycommit'):
1038 if wctx.isempty() and not repo.ui.configbool('ui', 'allowemptycommit'):
@@ -1053,7 +1053,7 b' def concludememorynode(repo, ctx, p1, p2'
1053 wctx.clean() # Might be reused
1053 wctx.clean() # Might be reused
1054 return commitres
1054 return commitres
1055
1055
1056 def concludenode(repo, ctx, p1, p2, editor, extra, keepbranch, date,
1056 def concludenode(repo, ctx, p1, p2, editor, extra, overrides, date,
1057 commitmsg):
1057 commitmsg):
1058 '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx.
1058 '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx.
1059 Return node of committed revision.'''
1059 Return node of committed revision.'''
@@ -1063,10 +1063,6 b' def concludenode(repo, ctx, p1, p2, edit'
1063 with dsguard:
1063 with dsguard:
1064 repo.setparents(repo[p1].node(), repo[p2].node())
1064 repo.setparents(repo[p1].node(), repo[p2].node())
1065
1065
1066 destphase = max(ctx.phase(), phases.draft)
1067 overrides = {('phases', 'new-commit'): destphase}
1068 if keepbranch:
1069 overrides[('ui', 'allowemptycommit')] = True
1070 with repo.ui.configoverride(overrides, 'rebase'):
1066 with repo.ui.configoverride(overrides, 'rebase'):
1071 # Commit might fail if unresolved files exist
1067 # Commit might fail if unresolved files exist
1072 if date is None:
1068 if date is None:
General Comments 0
You need to be logged in to leave comments. Login now