hgext/rebase.py
branchstable
changeset 11843 00f8e7837668
parent 11546 134eb1c97e94
child 11876 1fe94103c6ee
equal deleted inserted replaced
11842:71dab6955be0 11843:00f8e7837668
   108                 raise util.Abort(_('cannot use detach with continue or abort'))
   108                 raise util.Abort(_('cannot use detach with continue or abort'))
   109             if srcf or basef or destf:
   109             if srcf or basef or destf:
   110                 raise util.Abort(
   110                 raise util.Abort(
   111                     _('abort and continue do not allow specifying revisions'))
   111                     _('abort and continue do not allow specifying revisions'))
   112 
   112 
   113             (originalwd, target, state, collapsef, keepf,
   113             (originalwd, target, state, skipped, collapsef, keepf,
   114                                 keepbranchesf, external) = restorestatus(repo)
   114                                 keepbranchesf, external) = restorestatus(repo)
   115             if abortf:
   115             if abortf:
   116                 return abort(repo, originalwd, target, state)
   116                 return abort(repo, originalwd, target, state)
   117         else:
   117         else:
   118             if srcf and basef:
   118             if srcf and basef:
   411             elif i == 5:
   411             elif i == 5:
   412                 keepbranches = bool(int(l))
   412                 keepbranches = bool(int(l))
   413             else:
   413             else:
   414                 oldrev, newrev = l.split(':')
   414                 oldrev, newrev = l.split(':')
   415                 state[repo[oldrev].rev()] = repo[newrev].rev()
   415                 state[repo[oldrev].rev()] = repo[newrev].rev()
       
   416         skipped = set()
       
   417         # recompute the set of skipped revs
       
   418         if not collapse:
       
   419             seen = set([target])
       
   420             for old, new in sorted(state.items()):
       
   421                 if new != nullrev and new in seen:
       
   422                     skipped.add(old)
       
   423                 seen.add(new)
       
   424         repo.ui.debug('computed skipped revs: %s\n' % skipped)
   416         repo.ui.debug('rebase status resumed\n')
   425         repo.ui.debug('rebase status resumed\n')
   417         return originalwd, target, state, collapse, keep, keepbranches, external
   426         return (originalwd, target, state, skipped,
       
   427                 collapse, keep, keepbranches, external)
   418     except IOError, err:
   428     except IOError, err:
   419         if err.errno != errno.ENOENT:
   429         if err.errno != errno.ENOENT:
   420             raise
   430             raise
   421         raise util.Abort(_('no rebase in progress'))
   431         raise util.Abort(_('no rebase in progress'))
   422 
   432