# HG changeset patch # User Yuya Nishihara # Date 2015-02-11 04:47:43 # Node ID 18af6ebd400151e8dadf394bc2623d01fa310cf0 # Parent 042d95beeee83c79b1cfebbfd4f3293f10e4e53b resolve: silence warning of unknown pats for -l/--list (BC) It was introduced at 232de244ab6f to warn that "hg resolve" did nothing meaningful. The warning seems not good for "hg resolve -l" because it is rather like "hg status" or "hg files". diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5328,7 +5328,7 @@ def resolve(ui, repo, *pats, **opts): ms.commit() - if not didwork and pats: + if not didwork and pats and not show: ui.warn(_("arguments do not match paths that need resolving\n")) finally: diff --git a/tests/test-resolve.t b/tests/test-resolve.t --- a/tests/test-resolve.t +++ b/tests/test-resolve.t @@ -43,10 +43,11 @@ resolve -l should contain unresolved ent U file1 U file2 -resolving an unknown path should emit a warning +resolving an unknown path should emit a warning, but not for -l $ hg resolve -m does-not-exist arguments do not match paths that need resolving + $ hg resolve -l does-not-exist resolve the failure