# HG changeset patch # User Matt Harbison # Date 1499575996 14400 # Node ID e48fb90f80c899b7cfd0e960518bbb115e3598dd # Parent 66fe60d5f291f9eebda5de9a8c648242ad6ca92c 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. diff -r 66fe60d5f291 -r e48fb90f80c8 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Jul 09 00:23:03 2017 -0400 +++ b/mercurial/cmdutil.py Sun Jul 09 00:53:16 2017 -0400 @@ -3547,10 +3547,7 @@ for f, msg in afterresolvedstates: if repo.vfs.exists(f): return contmsg % msg, True - workingctx = repo[None] - dirty = any(repo.status()) or any(workingctx.sub(s).dirty() - for s in workingctx.substate) - if dirty: + if repo[None].dirty(missing=True, merge=False, branch=False): return contmsg % _("hg commit"), False return None, None