mercurial/cmdutil.py
changeset 38239 ead71b15efd5
parent 38219 51e420a7a41a
parent 38182 79c54e7c0c52
child 38278 0c7970d4e6b4
equal deleted inserted replaced
38238:2b8c8b8d1a06 38239:ead71b15efd5
  3185 def checkunfinished(repo, commit=False):
  3185 def checkunfinished(repo, commit=False):
  3186     '''Look for an unfinished multistep operation, like graft, and abort
  3186     '''Look for an unfinished multistep operation, like graft, and abort
  3187     if found. It's probably good to check this right before
  3187     if found. It's probably good to check this right before
  3188     bailifchanged().
  3188     bailifchanged().
  3189     '''
  3189     '''
       
  3190     # Check for non-clearable states first, so things like rebase will take
       
  3191     # precedence over update.
  3190     for f, clearable, allowcommit, msg, hint in unfinishedstates:
  3192     for f, clearable, allowcommit, msg, hint in unfinishedstates:
  3191         if commit and allowcommit:
  3193         if clearable or (commit and allowcommit):
       
  3194             continue
       
  3195         if repo.vfs.exists(f):
       
  3196             raise error.Abort(msg, hint=hint)
       
  3197 
       
  3198     for f, clearable, allowcommit, msg, hint in unfinishedstates:
       
  3199         if not clearable or (commit and allowcommit):
  3192             continue
  3200             continue
  3193         if repo.vfs.exists(f):
  3201         if repo.vfs.exists(f):
  3194             raise error.Abort(msg, hint=hint)
  3202             raise error.Abort(msg, hint=hint)
  3195 
  3203 
  3196 def clearunfinished(repo):
  3204 def clearunfinished(repo):