##// 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 b' class rebaseruntime(object):'
141
141
142 self.collapsef = opts.get('collapse', False)
142 self.collapsef = opts.get('collapse', False)
143 self.collapsemsg = cmdutil.logmessage(ui, opts)
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 @command('rebase',
151 @command('rebase',
146 [('s', 'source', '',
152 [('s', 'source', '',
@@ -269,11 +275,6 b' def rebase(ui, repo, **opts):'
269 destspace = opts.get('_destspace')
275 destspace = opts.get('_destspace')
270 contf = opts.get('continue')
276 contf = opts.get('continue')
271 abortf = opts.get('abort')
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 keepf = opts.get('keep', False)
278 keepf = opts.get('keep', False)
278 keepbranchesf = opts.get('keepbranches', False)
279 keepbranchesf = opts.get('keepbranches', False)
279 # keepopen is not meant for use on the command line, but by
280 # keepopen is not meant for use on the command line, but by
@@ -395,7 +396,7 b' def rebase(ui, repo, **opts):'
395 # insert _savebranch at the start of extrafns so if
396 # insert _savebranch at the start of extrafns so if
396 # there's a user-provided extrafn it can clobber branch if
397 # there's a user-provided extrafn it can clobber branch if
397 # desired
398 # desired
398 extrafns.insert(0, _savebranch)
399 rbsrt.extrafns.insert(0, _savebranch)
399 if rbsrt.collapsef:
400 if rbsrt.collapsef:
400 branches = set()
401 branches = set()
401 for rev in rbsrt.state:
402 for rev in rbsrt.state:
@@ -415,7 +416,7 b' def rebase(ui, repo, **opts):'
415 if rbsrt.activebookmark:
416 if rbsrt.activebookmark:
416 bookmarks.deactivate(repo)
417 bookmarks.deactivate(repo)
417
418
418 extrafn = _makeextrafn(extrafns)
419 extrafn = _makeextrafn(rbsrt.extrafns)
419
420
420 sortedstate = sorted(rbsrt.state)
421 sortedstate = sorted(rbsrt.state)
421 total = len(sortedstate)
422 total = len(sortedstate)
@@ -462,7 +463,7 b' def rebase(ui, repo, **opts):'
462 newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn,
463 newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn,
463 editor=editor,
464 editor=editor,
464 keepbranches=keepbranchesf,
465 keepbranches=keepbranchesf,
465 date=date)
466 date=rbsrt.date)
466 else:
467 else:
467 # Skip commit if we are collapsing
468 # Skip commit if we are collapsing
468 repo.dirstate.beginparentchange()
469 repo.dirstate.beginparentchange()
@@ -521,7 +522,7 b' def rebase(ui, repo, **opts):'
521 commitmsg=commitmsg,
522 commitmsg=commitmsg,
522 extrafn=extrafn, editor=editor,
523 extrafn=extrafn, editor=editor,
523 keepbranches=keepbranchesf,
524 keepbranches=keepbranchesf,
524 date=date)
525 date=rbsrt.date)
525 if newnode is None:
526 if newnode is None:
526 newrev = rbsrt.target
527 newrev = rbsrt.target
527 else:
528 else:
General Comments 0
You need to be logged in to leave comments. Login now