diff mercurial/cmdutil.py @ 35144:7a58608281dd

remove: print message for each file in verbose mode only while using `-A` (BC) hg rm -A option prints the message of every file in the repo. This is not very user friendly for a big repository with thousands of files. So enabling this feature only when run in --verbose mode (hg rm -Av) Differential Revision: https://phab.mercurial-scm.org/D1336
author pavanpc@fb.com
date Fri, 17 Nov 2017 22:52:40 +0000
parents b22a0d9e0a83
children 3da4bd50103d
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Nov 03 17:19:56 2017 -0400
+++ b/mercurial/cmdutil.py	Fri Nov 17 22:52:40 2017 +0000
@@ -2982,8 +2982,9 @@
         for f in remaining:
             count += 1
             ui.progress(_('skipping'), count, total=total, unit=_('files'))
-            warnings.append(_('not removing %s: file still exists\n')
-                    % m.rel(f))
+            if ui.verbose or (f in files):
+                warnings.append(_('not removing %s: file still exists\n')
+                                % m.rel(f))
             ret = 1
         ui.progress(_('skipping'), None)
     else: