# HG changeset patch # User timeless # Date 1450985144 0 # Node ID d46db4390715cb430c00d916b6c9eab2cddb23e4 # Parent b3376fba4ab91c8fd6c02c3424d785b466f50836 resolve: suggest the next action Expose afterresolvedstates to allow graft and similar to suggest a message when resolving results in no unresolved files. If there isn't a matching state in afterresolvedstates, then if verbose, suggest commiting. diff -r b3376fba4ab9 -r d46db4390715 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Mon Jan 04 21:52:44 2016 -0800 +++ b/mercurial/cmdutil.py Thu Dec 24 19:25:44 2015 +0000 @@ -3363,6 +3363,17 @@ if clearable and repo.vfs.exists(f): util.unlink(repo.join(f)) +afterresolvedstates = [ + ] + +def checkafterresolved(repo): + contmsg = _("continue: %s\n") + for f, msg in afterresolvedstates: + if repo.vfs.exists(f): + repo.ui.warn(contmsg % msg) + return + repo.ui.note(contmsg % _("hg commit")) + class dirstateguard(object): '''Restore dirstate at unexpected failure. diff -r b3376fba4ab9 -r d46db4390715 mercurial/commands.py --- a/mercurial/commands.py Mon Jan 04 21:52:44 2016 -0800 +++ b/mercurial/commands.py Thu Dec 24 19:25:44 2015 +0000 @@ -6003,6 +6003,7 @@ driverresolvedf = list(ms.driverresolved()) if not unresolvedf and not driverresolvedf: ui.status(_('(no more unresolved files)\n')) + cmdutil.checkafterresolved(repo) elif not unresolvedf: ui.status(_('(no more unresolved files -- ' 'run "hg resolve --all" to conclude)\n')) diff -r b3376fba4ab9 -r d46db4390715 tests/test-backout.t --- a/tests/test-backout.t Mon Jan 04 21:52:44 2016 -0800 +++ b/tests/test-backout.t Thu Dec 24 19:25:44 2015 +0000 @@ -714,6 +714,7 @@ my foo@b71750c4b0fd+ other foo@a30dd8addae3 ancestor foo@913609522437 premerge successful (no more unresolved files) + continue: hg commit $ hg status M foo ? foo.orig