##// END OF EJS Templates
rebase: look up commit message to reuse outside of conclude[memory]node()...
Martin von Zweigbergk -
r37053:b7f5d03e default
parent child Browse files
Show More
@@ -455,6 +455,8 b' class rebaseruntime(object):'
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 ctx = repo[rev]
458 if commitmsg is None:
459 commitmsg = ctx.description()
458 if self.inmemory:
460 if self.inmemory:
459 newnode = concludememorynode(repo, ctx, p1, p2,
461 newnode = concludememorynode(repo, ctx, p1, p2,
460 wctx=self.wctx,
462 wctx=self.wctx,
@@ -1030,12 +1032,10 b' def externalparent(repo, state, destance'
1030 ', '.join("%d" % p for p in sorted(parents))))
1032 ', '.join("%d" % p for p in sorted(parents))))
1031
1033
1032 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extrafn, keepbranches,
1034 def concludememorynode(repo, ctx, p1, p2, wctx, editor, extrafn, keepbranches,
1033 date, commitmsg=None):
1035 date, commitmsg):
1034 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1036 '''Commit the memory changes with parents p1 and p2. Reuse commit info from
1035 ctx but also store useful information in extra.
1037 ctx but also store useful information in extra.
1036 Return node of committed revision.'''
1038 Return node of committed revision.'''
1037 if commitmsg is None:
1038 commitmsg = ctx.description()
1039 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1039 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1040 extra = {'rebase_source': ctx.hex()}
1040 extra = {'rebase_source': ctx.hex()}
1041 if extrafn:
1041 if extrafn:
@@ -1066,7 +1066,7 b' def concludememorynode(repo, ctx, p1, p2'
1066 return commitres
1066 return commitres
1067
1067
1068 def concludenode(repo, ctx, p1, p2, editor, extrafn, keepbranches, date,
1068 def concludenode(repo, ctx, p1, p2, editor, extrafn, keepbranches, date,
1069 commitmsg=None):
1069 commitmsg):
1070 '''Commit the wd changes with parents p1 and p2. Reuse commit info from ctx
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.'''
@@ -1075,8 +1075,6 b' def concludenode(repo, ctx, 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 if commitmsg is None:
1079 commitmsg = ctx.description()
1080 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1078 keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
1081 extra = {'rebase_source': ctx.hex()}
1079 extra = {'rebase_source': ctx.hex()}
1082 if extrafn:
1080 if extrafn:
General Comments 0
You need to be logged in to leave comments. Login now