##// END OF EJS Templates
rebase: move local variables 'date' and 'extrafns' to the RR class...
Kostia Balytskyi -
r29401:87acd047 default
parent child Browse files
Show More
@@ -141,6 +141,12 class rebaseruntime(object):
141 141
142 142 self.collapsef = opts.get('collapse', False)
143 143 self.collapsemsg = cmdutil.logmessage(ui, opts)
144 self.date = opts.get('date', None)
145
146 e = opts.get('extrafn') # internal, used by e.g. hgsubversion
147 self.extrafns = [_savegraft]
148 if e:
149 self.extrafns = [e]
144 150
145 151 @command('rebase',
146 152 [('s', 'source', '',
@@ -269,11 +275,6 def rebase(ui, repo, **opts):
269 275 destspace = opts.get('_destspace')
270 276 contf = opts.get('continue')
271 277 abortf = opts.get('abort')
272 date = opts.get('date', None)
273 e = opts.get('extrafn') # internal, used by e.g. hgsubversion
274 extrafns = [_savegraft]
275 if e:
276 extrafns = [e]
277 278 keepf = opts.get('keep', False)
278 279 keepbranchesf = opts.get('keepbranches', False)
279 280 # keepopen is not meant for use on the command line, but by
@@ -395,7 +396,7 def rebase(ui, repo, **opts):
395 396 # insert _savebranch at the start of extrafns so if
396 397 # there's a user-provided extrafn it can clobber branch if
397 398 # desired
398 extrafns.insert(0, _savebranch)
399 rbsrt.extrafns.insert(0, _savebranch)
399 400 if rbsrt.collapsef:
400 401 branches = set()
401 402 for rev in rbsrt.state:
@@ -415,7 +416,7 def rebase(ui, repo, **opts):
415 416 if rbsrt.activebookmark:
416 417 bookmarks.deactivate(repo)
417 418
418 extrafn = _makeextrafn(extrafns)
419 extrafn = _makeextrafn(rbsrt.extrafns)
419 420
420 421 sortedstate = sorted(rbsrt.state)
421 422 total = len(sortedstate)
@@ -462,7 +463,7 def rebase(ui, repo, **opts):
462 463 newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn,
463 464 editor=editor,
464 465 keepbranches=keepbranchesf,
465 date=date)
466 date=rbsrt.date)
466 467 else:
467 468 # Skip commit if we are collapsing
468 469 repo.dirstate.beginparentchange()
@@ -521,7 +522,7 def rebase(ui, repo, **opts):
521 522 commitmsg=commitmsg,
522 523 extrafn=extrafn, editor=editor,
523 524 keepbranches=keepbranchesf,
524 date=date)
525 date=rbsrt.date)
525 526 if newnode is None:
526 527 newrev = rbsrt.target
527 528 else:
General Comments 0
You need to be logged in to leave comments. Login now