##// END OF EJS Templates
rebase: inline _makextrafn() now that we have only one caller...
Martin von Zweigbergk -
r37055:bd0086bd default
parent child Browse files
Show More
@@ -87,17 +87,6 b' def _savegraft(ctx, extra):'
87 def _savebranch(ctx, extra):
87 def _savebranch(ctx, extra):
88 extra['branch'] = ctx.branch()
88 extra['branch'] = ctx.branch()
89
89
90 def _makeextrafn(copiers):
91 """make an extrafn out of the given copy-functions.
92
93 A copy function takes a context and an extra dict, and mutates the
94 extra dict as needed based on the given context.
95 """
96 def extrafn(ctx, extra):
97 for c in copiers:
98 c(ctx, extra)
99 return extrafn
100
101 def _destrebase(repo, sourceset, destspace=None):
90 def _destrebase(repo, sourceset, destspace=None):
102 """small wrapper around destmerge to pass the right extra args
91 """small wrapper around destmerge to pass the right extra args
103
92
@@ -457,10 +446,9 b' class rebaseruntime(object):'
457 ctx = repo[rev]
446 ctx = repo[rev]
458 if commitmsg is None:
447 if commitmsg is None:
459 commitmsg = ctx.description()
448 commitmsg = ctx.description()
460 extrafn = _makeextrafn(self.extrafns)
461 extra = {'rebase_source': ctx.hex()}
449 extra = {'rebase_source': ctx.hex()}
462 if extrafn:
450 for c in self.extrafns:
463 extrafn(ctx, extra)
451 c(ctx, extra)
464 if self.inmemory:
452 if self.inmemory:
465 newnode = concludememorynode(repo, ctx, p1, p2,
453 newnode = concludememorynode(repo, ctx, p1, p2,
466 wctx=self.wctx,
454 wctx=self.wctx,
General Comments 0
You need to be logged in to leave comments. Login now