changeset 24125:18af6ebd4001

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".
author Yuya Nishihara <yuya@tcha.org>
date Wed, 11 Feb 2015 13:47:43 +0900
parents 042d95beeee8
children b4d21bbc2589
files mercurial/commands.py tests/test-resolve.t
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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