hgext/rebase.py
branchstable
changeset 19848 577f4c562d52
parent 19642 14ec82594f47
child 19849 e7fa36d2ad3a
equal deleted inserted replaced
19847:45c3086880c7 19848:577f4c562d52
   157                 raise util.Abort(
   157                 raise util.Abort(
   158                     _('abort and continue do not allow specifying revisions'))
   158                     _('abort and continue do not allow specifying revisions'))
   159             if opts.get('tool', False):
   159             if opts.get('tool', False):
   160                 ui.warn(_('tool option will be ignored\n'))
   160                 ui.warn(_('tool option will be ignored\n'))
   161 
   161 
   162             (originalwd, target, state, skipped, collapsef, keepf,
   162             try:
   163                 keepbranchesf, external, activebookmark) = restorestatus(repo)
   163                 (originalwd, target, state, skipped, collapsef, keepf,
       
   164                  keepbranchesf, external, activebookmark) = restorestatus(repo)
       
   165             except error.RepoLookupError:
       
   166                 if abortf:
       
   167                     clearstatus(repo)
       
   168                     repo.ui.warn(_('rebase aborted (no revision is removed,'
       
   169                                    ' only broken state is cleared)\n'))
       
   170                     return 0
       
   171                 else:
       
   172                     msg = _('cannot continue inconsistent rebase')
       
   173                     hint = _('use "hg rebase --abort" to clear borken state')
       
   174                     raise util.Abort(msg, hint=hint)
   164             if abortf:
   175             if abortf:
   165                 return abort(repo, originalwd, target, state)
   176                 return abort(repo, originalwd, target, state)
   166         else:
   177         else:
   167             if srcf and basef:
   178             if srcf and basef:
   168                 raise util.Abort(_('cannot specify both a '
   179                 raise util.Abort(_('cannot specify both a '