resolve: silence warning of unknown pats for -l/--list (BC)
authorYuya Nishihara <yuya@tcha.org>
Wed, 11 Feb 2015 13:47:43 +0900
changeset 24125 18af6ebd4001
parent 24124 042d95beeee8
child 24126 b4d21bbc2589
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".
mercurial/commands.py
tests/test-resolve.t
--- a/mercurial/commands.py	Mon Feb 09 11:02:45 2015 -0800
+++ b/mercurial/commands.py	Wed Feb 11 13:47:43 2015 +0900
@@ -5328,7 +5328,7 @@
 
         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:
--- a/tests/test-resolve.t	Mon Feb 09 11:02:45 2015 -0800
+++ b/tests/test-resolve.t	Wed Feb 11 13:47:43 2015 +0900
@@ -43,10 +43,11 @@
   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