##// END OF EJS Templates
rebase: pass in "keepbranch" to conclude[memory]node()...
Martin von Zweigbergk -
r37056:7db86856 default
parent child Browse files
Show More
@@ -449,13 +449,14 b' class rebaseruntime(object):'
449 extra = {'rebase_source': ctx.hex()}
449 extra = {'rebase_source': ctx.hex()}
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 if self.inmemory:
453 if self.inmemory:
453 newnode = concludememorynode(repo, ctx, p1, p2,
454 newnode = concludememorynode(repo, ctx, p1, p2,
454 wctx=self.wctx,
455 wctx=self.wctx,
455 extra=extra,
456 extra=extra,
456 commitmsg=commitmsg,
457 commitmsg=commitmsg,
457 editor=editor,
458 editor=editor,
458 keepbranches=self.keepbranchesf,
459 keepbranch=keepbranch,
459 date=self.date)
460 date=self.date)
460 mergemod.mergestate.clean(repo)
461 mergemod.mergestate.clean(repo)
461 else:
462 else:
@@ -463,7 +464,7 b' class rebaseruntime(object):'
463 extra=extra,
464 extra=extra,
464 commitmsg=commitmsg,
465 commitmsg=commitmsg,
465 editor=editor,
466 editor=editor,
466 keepbranches=self.keepbranchesf,
467 keepbranch=keepbranch,
467 date=self.date)
468 date=self.date)
468
469
469 if newnode is None:
470 if newnode is None:
@@ -1023,13 +1024,11 b' def externalparent(repo, state, destance'
1023 (max(destancestors),
1024 (max(destancestors),
1024 ', '.join("%d" % p for p in sorted(parents))))
1025 ', '.join("%d" % p for p in sorted(parents))))
1025
1026
1026 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, keepbranches,
1027 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extra, keepbranch,
1027 date, commitmsg):
1028 date, commitmsg):
1028 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1029 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1029 ctx.
1030 ctx.
1030 Return node of committed revision.'''
1031 Return node of committed revision.'''
1031 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1032
1033 destphase = max(ctx.phase(), phases.draft)
1032 destphase = max(ctx.phase(), phases.draft)
1034 overrides = {('phases', 'new-commit'): destphase}
1033 overrides = {('phases', 'new-commit'): destphase}
1035 if keepbranch:
1034 if keepbranch:
@@ -1054,7 +1053,7 b' def concludememorynode(repo, ctx, p1, p2'
1054 wctx.clean() # Might be reused
1053 wctx.clean() # Might be reused
1055 return commitres
1054 return commitres
1056
1055
1057 def concludenode(repo, ctx, p1, p2, editor, extra, keepbranches, date,
1056 def concludenode(repo, ctx, p1, p2, editor, extra, keepbranch, date,
1058 commitmsg):
1057 commitmsg):
1059 '''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.
1060 Return node of committed revision.'''
1059 Return node of committed revision.'''
@@ -1063,7 +1062,6 b' def concludenode(repo, ctx, p1, p2, edit'
1063 dsguard = dirstateguard.dirstateguard(repo, 'rebase')
1062 dsguard = dirstateguard.dirstateguard(repo, 'rebase')
1064 with dsguard:
1063 with dsguard:
1065 repo.setparents(repo[p1].node(), repo[p2].node())
1064 repo.setparents(repo[p1].node(), repo[p2].node())
1066 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1067
1065
1068 destphase = max(ctx.phase(), phases.draft)
1066 destphase = max(ctx.phase(), phases.draft)
1069 overrides = {('phases', 'new-commit'): destphase}
1067 overrides = {('phases', 'new-commit'): destphase}
General Comments 0
You need to be logged in to leave comments. Login now