Patchwork D1336: Summary: Removing ui.verbose check in the elif comdition.

login
register
mail settings
Submitter phabricator
Date Nov. 10, 2017, 2:56 p.m.
Message ID <84bc18f05a8b453f788125e671807d8e@localhost.localdomain>
Download mbox | patch
Permalink /patch/25462/
State Not Applicable
Headers show

Comments

phabricator - Nov. 10, 2017, 2:56 p.m.
pavanpc updated this revision to Diff 3391.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1336?vs=3390&id=3391

REVISION DETAIL
  https://phab.mercurial-scm.org/D1336

AFFECTED FILES
  mercurial/cmdutil.py
  tests/test-remove.t

CHANGE DETAILS




To: pavanpc, #hg-reviewers
Cc: mitrandir, mharbison72, mercurial-devel

Patch

diff --git a/tests/test-remove.t b/tests/test-remove.t
--- a/tests/test-remove.t
+++ b/tests/test-remove.t
@@ -168,11 +168,11 @@ 
                                                               \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-20 state added, options -A
+20 state added, options -Av
 
   $ echo b > bar
   $ hg add bar
-  $ remove -A bar
+  $ remove -Av bar
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
@@ -189,9 +189,9 @@ 
                                                               \r (no-eol) (esc)
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-21 state clean, options -A
+21 state clean, options -Av
 
-  $ remove -A foo
+  $ remove -Av foo
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
@@ -205,10 +205,10 @@ 
   ./foo
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-22 state modified, options -A
+22 state modified, options -Av
 
   $ echo b >> foo
-  $ remove -A foo
+  $ remove -Av foo
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
@@ -233,7 +233,7 @@ 
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
-  exit code: 0
+  exit code: 1
   R foo
   ? bar
   ./bar
@@ -357,10 +357,10 @@ 
                                                               \r (no-eol) (esc)
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-dir, options -A
+dir, options -Av
 
   $ rm test/bar
-  $ remove -A test
+  $ remove -Av test
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
@@ -448,14 +448,15 @@ 
   [1]
   $ hg add d1/a
   $ rm d1/a
-  $ hg rm --after d1
+  $ hg rm --after   d1
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
-  removing d1/a (glob)
+  removing d1/a
+  [1]
 
   $ hg rm --after nosuch
   nosuch: * (glob)
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2969,16 +2969,17 @@ 
         list = modified + deleted + clean + added
     elif after:
         list = deleted
-        remaining = modified + added + clean
-        total = len(remaining)
-        count = 0
-        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))
-            ret = 1
-        ui.progress(_('skipping'), None)
+        if ui.verbose:
+            remaining = modified + added + clean
+            total = len(remaining)
+            count = 0
+            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))
+            ui.progress(_('skipping'), None)
+        ret = 1
     else:
         list = deleted + clean
         total = len(modified) + len(added)