comparison mercurial/cmdutil.py @ 38239:ead71b15efd5

merge with stable
author Augie Fackler <augie@google.com>
date Wed, 06 Jun 2018 13:31:24 -0400
parents 51e420a7a41a 79c54e7c0c52
children 0c7970d4e6b4
comparison
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):