##// END OF EJS Templates
rebase: pass in ctx, not rev, to conclude[memory]node()...
Martin von Zweigbergk -
r37052:fbc82a08 default
parent child Browse files
Show More
@@ -454,8 +454,9 b' class rebaseruntime(object):'
454 Reuse commit info from rev but also store useful information in extra.
454 Reuse commit info from rev but also store useful information in extra.
455 Return node of committed revision.'''
455 Return node of committed revision.'''
456 repo = self.repo
456 repo = self.repo
457 ctx = repo[rev]
457 if self.inmemory:
458 if self.inmemory:
458 newnode = concludememorynode(repo, rev, p1, p2,
459 newnode = concludememorynode(repo, ctx, p1, p2,
459 wctx=self.wctx,
460 wctx=self.wctx,
460 extrafn=_makeextrafn(self.extrafns),
461 extrafn=_makeextrafn(self.extrafns),
461 commitmsg=commitmsg,
462 commitmsg=commitmsg,
@@ -464,7 +465,7 b' class rebaseruntime(object):'
464 date=self.date)
465 date=self.date)
465 mergemod.mergestate.clean(repo)
466 mergemod.mergestate.clean(repo)
466 else:
467 else:
467 newnode = concludenode(repo, rev, p1, p2,
468 newnode = concludenode(repo, ctx, p1, p2,
468 extrafn=_makeextrafn(self.extrafns),
469 extrafn=_makeextrafn(self.extrafns),
469 commitmsg=commitmsg,
470 commitmsg=commitmsg,
470 editor=editor,
471 editor=editor,
@@ -1028,12 +1029,11 b' def externalparent(repo, state, destance'
1028 (max(destancestors),
1029 (max(destancestors),
1029 ', '.join("%d" % p for p in sorted(parents))))
1030 ', '.join("%d" % p for p in sorted(parents))))
1030
1031
1031 def concludememorynode(repo, rev, p1, p2, wctx, editor, extrafn, keepbranches,
1032 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extrafn, keepbranches,
1032 date, commitmsg=None):
1033 date, commitmsg=None):
1033 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1034 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1034 rev but also store useful information in extra.
1035 ctx but also store useful information in extra.
1035 Return node of committed revision.'''
1036 Return node of committed revision.'''
1036 ctx = repo[rev]
1037 if commitmsg is None:
1037 if commitmsg is None:
1038 commitmsg = ctx.description()
1038 commitmsg = ctx.description()
1039 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1039 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
@@ -1065,9 +1065,9 b' def concludememorynode(repo, rev, p1, p2'
1065 wctx.clean() # Might be reused
1065 wctx.clean() # Might be reused
1066 return commitres
1066 return commitres
1067
1067
1068 def concludenode(repo, rev, p1, p2, editor, extrafn, keepbranches, date,
1068 def concludenode(repo, ctx, p1, p2, editor, extrafn, keepbranches, date,
1069 commitmsg=None):
1069 commitmsg=None):
1070 '''Commit the wd changes with parents p1 and p2. Reuse commit info from rev
1070 '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx
1071 but also store useful information in extra.
1071 but also store useful information in extra.
1072 Return node of committed revision.'''
1072 Return node of committed revision.'''
1073 dsguard = util.nullcontextmanager()
1073 dsguard = util.nullcontextmanager()
@@ -1075,7 +1075,6 b' def concludenode(repo, rev, p1, p2, edit'
1075 dsguard = dirstateguard.dirstateguard(repo, 'rebase')
1075 dsguard = dirstateguard.dirstateguard(repo, 'rebase')
1076 with dsguard:
1076 with dsguard:
1077 repo.setparents(repo[p1].node(), repo[p2].node())
1077 repo.setparents(repo[p1].node(), repo[p2].node())
1078 ctx = repo[rev]
1079 if commitmsg is None:
1078 if commitmsg is None:
1080 commitmsg = ctx.description()
1079 commitmsg = ctx.description()
1081 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1080 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
General Comments 0
You need to be logged in to leave comments. Login now