hgext/rebase.py
changeset 33333 8bfd10e4c55a
parent 33332 3b7cb3d17137
child 33569 d341677d667d
equal deleted inserted replaced
33332:3b7cb3d17137 33333:8bfd10e4c55a
  1292 
  1292 
  1293     If `collapsedas` is not None, the rebase was a collapse whose result if the
  1293     If `collapsedas` is not None, the rebase was a collapse whose result if the
  1294     `collapsedas` node."""
  1294     `collapsedas` node."""
  1295     tonode = repo.changelog.node
  1295     tonode = repo.changelog.node
  1296     mapping = {}
  1296     mapping = {}
  1297     if True:
  1297     for rev, newrev in sorted(state.items()):
  1298         for rev, newrev in sorted(state.items()):
  1298         if newrev >= 0 and newrev != rev:
  1299             if newrev >= 0 and newrev != rev:
  1299             if rev in skipped:
  1300                 if rev in skipped:
  1300                 succs = ()
  1301                     succs = ()
  1301             elif collapsedas is not None:
  1302                 elif collapsedas is not None:
  1302                 succs = (collapsedas,)
  1303                     succs = (collapsedas,)
  1303             else:
  1304                 else:
  1304                 succs = (tonode(newrev),)
  1305                     succs = (tonode(newrev),)
  1305             mapping[tonode(rev)] = succs
  1306                 mapping[tonode(rev)] = succs
  1306     scmutil.cleanupnodes(repo, mapping, 'rebase')
  1307         scmutil.cleanupnodes(repo, mapping, 'rebase')
       
  1308 
  1307 
  1309 def pullrebase(orig, ui, repo, *args, **opts):
  1308 def pullrebase(orig, ui, repo, *args, **opts):
  1310     'Call rebase after pull if the latter has been invoked with --rebase'
  1309     'Call rebase after pull if the latter has been invoked with --rebase'
  1311     ret = None
  1310     ret = None
  1312     if opts.get('rebase'):
  1311     if opts.get('rebase'):