comparison mercurial/cmdutil.py @ 33362:e48fb90f80c8

cmdutil: simplify the dirty check in howtocontinue() This is equivalent to the previous code. But it seems to me that if the user is going to be prompted that a commit is needed, missing files should be ignored, but branch and merge changes shouldn't be.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 09 Jul 2017 00:53:16 -0400
parents 20f533a92eda
children 8056481caa81
comparison
equal deleted inserted replaced
33361:66fe60d5f291 33362:e48fb90f80c8
3545 ''' 3545 '''
3546 contmsg = _("continue: %s") 3546 contmsg = _("continue: %s")
3547 for f, msg in afterresolvedstates: 3547 for f, msg in afterresolvedstates:
3548 if repo.vfs.exists(f): 3548 if repo.vfs.exists(f):
3549 return contmsg % msg, True 3549 return contmsg % msg, True
3550 workingctx = repo[None] 3550 if repo[None].dirty(missing=True, merge=False, branch=False):
3551 dirty = any(repo.status()) or any(workingctx.sub(s).dirty()
3552 for s in workingctx.substate)
3553 if dirty:
3554 return contmsg % _("hg commit"), False 3551 return contmsg % _("hg commit"), False
3555 return None, None 3552 return None, None
3556 3553
3557 def checkafterresolved(repo): 3554 def checkafterresolved(repo):
3558 '''Inform the user about the next action after completing hg resolve 3555 '''Inform the user about the next action after completing hg resolve