D1336: Summary: Removing ui.verbose check in the elif comdition.
pavanpc (Pavan Kumar PC)
phabricator at mercurial-scm.org
Fri Nov 10 03:52:40 EST 2017
pavanpc updated this revision to Diff 3390.
pavanpc edited the test plan for this revision.
pavanpc retitled this revision from "HG: hg rm -A option prints the message of every file in the repo" to "Summary: Removing ui.verbose check in the elif comdition.".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1336?vs=3333&id=3390
REVISION DETAIL
https://phab.mercurial-scm.org/D1336
AFFECTED FILES
mercurial/cmdutil.py
tests/test-remove.t
CHANGE DETAILS
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)
@@ -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)
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))
+ ret = 1
+ ui.progress(_('skipping'), None)
else:
list = deleted + clean
total = len(modified) + len(added)
To: pavanpc, #hg-reviewers
Cc: mitrandir, mharbison72, mercurial-devel
More information about the Mercurial-devel
mailing list