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): |