Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 38182:79c54e7c0c52 stable
rebase: prioritize indicating an interrupted rebase over update (issue5838)
This should also cover the transplant extension, and any other non clearable
states.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 02 Jun 2018 13:44:44 -0400 |
parents | 32a75a8a5b0f |
children | ead71b15efd5 |
comparison
equal
deleted
inserted
replaced
38181:712d6f535fc9 | 38182:79c54e7c0c52 |
---|---|
3206 def checkunfinished(repo, commit=False): | 3206 def checkunfinished(repo, commit=False): |
3207 '''Look for an unfinished multistep operation, like graft, and abort | 3207 '''Look for an unfinished multistep operation, like graft, and abort |
3208 if found. It's probably good to check this right before | 3208 if found. It's probably good to check this right before |
3209 bailifchanged(). | 3209 bailifchanged(). |
3210 ''' | 3210 ''' |
3211 # Check for non-clearable states first, so things like rebase will take | |
3212 # precedence over update. | |
3211 for f, clearable, allowcommit, msg, hint in unfinishedstates: | 3213 for f, clearable, allowcommit, msg, hint in unfinishedstates: |
3212 if commit and allowcommit: | 3214 if clearable or (commit and allowcommit): |
3215 continue | |
3216 if repo.vfs.exists(f): | |
3217 raise error.Abort(msg, hint=hint) | |
3218 | |
3219 for f, clearable, allowcommit, msg, hint in unfinishedstates: | |
3220 if not clearable or (commit and allowcommit): | |
3213 continue | 3221 continue |
3214 if repo.vfs.exists(f): | 3222 if repo.vfs.exists(f): |
3215 raise error.Abort(msg, hint=hint) | 3223 raise error.Abort(msg, hint=hint) |
3216 | 3224 |
3217 def clearunfinished(repo): | 3225 def clearunfinished(repo): |