Patchwork [2,of,2] remove: add progress support

login
register
mail settings
Submitter timeless@mozdev.org
Date March 17, 2016, 9:22 p.m.
Message ID <489f506d99baa13c9318.1458249734@waste.org>
Download mbox | patch
Permalink /patch/13928/
State Superseded
Headers show

Comments

timeless@mozdev.org - March 17, 2016, 9:22 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1458248602 0
#      Thu Mar 17 21:03:22 2016 +0000
# Node ID 489f506d99baa13c93182120f16e208bd024266c
# Parent  5c624c08cd0ecdb725a407f4ad87c538a955fb56
remove: add progress support
Anton Shestakov - March 18, 2016, 4:44 a.m.
18.03.2016, 05:22, "timeless" <timeless@mozdev.org>:

> + ui.progress(_('deleting'), count, total=total, unit=_('subrepo'))

Please put unit in plural form here and below, i.e. 'subrepos', 'files'. This way it's going to be consistent with other progress units, and look better in places like "1/3 files".
Pierre-Yves David - March 18, 2016, 7:09 a.m.
On 03/17/2016 09:44 PM, Anton Shestakov wrote:
> 18.03.2016, 05:22, "timeless" <timeless@mozdev.org>:
>
>> + ui.progress(_('deleting'), count, total=total, unit=_('subrepo'))
>
> Please put unit in plural form here and below, i.e. 'subrepos', 'files'. This way it's going to be consistent with other progress units, and look better in places like "1/3 files".

There is an effort for building a record of all this guideline. Can you 
update the page with this?

https://www.mercurial-scm.org/wiki/UIGuideline
Anton Shestakov - March 18, 2016, 1:19 p.m.
18.03.2016, 15:09, "Pierre-Yves David" <pierre-yves.david@ens-lyon.org>:
> On 03/17/2016 09:44 PM, Anton Shestakov wrote:
>>  18.03.2016, 05:22, "timeless" <timeless@mozdev.org>:
>>
>>>  + ui.progress(_('deleting'), count, total=total, unit=_('subrepo'))
>>
>>  Please put unit in plural form here and below, i.e. 'subrepos', 'files'. This way it's going to be consistent with other progress units, and look better in places like "1/3 files".
>
> There is an effort for building a record of all this guideline. Can you
> update the page with this?
>
> https://www.mercurial-scm.org/wiki/UIGuideline

OK, done.
timeless - March 18, 2016, 2:43 p.m.
Is it possible to add a test or an assert for this?

On Fri, Mar 18, 2016 at 12:44 AM, Anton Shestakov <engored@ya.ru> wrote:
> 18.03.2016, 05:22, "timeless" <timeless@mozdev.org>:
>
>> + ui.progress(_('deleting'), count, total=total, unit=_('subrepo'))
>
> Please put unit in plural form here and below, i.e. 'subrepos', 'files'. This way it's going to be consistent with other progress units, and look better in places like "1/3 files".
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2407,7 +2407,10 @@ 
     else:
         warn = False
 
-    for subpath in sorted(wctx.substate):
+    subs = sorted(wctx.substate)
+    total = len(subs)
+    count = 0
+    for subpath in subs:
         def matchessubrepo(matcher, subpath):
             if matcher.exact(subpath):
                 return True
@@ -2416,7 +2419,10 @@ 
                     return True
             return False
 
+        count += 1
         if subrepos or matchessubrepo(m, subpath):
+            ui.progress(_('deleting'), count, total=total, unit=_('subrepo'))
+
             sub = wctx.sub(subpath)
             try:
                 submatch = matchmod.subdirmatcher(subpath, m)
@@ -2426,16 +2432,22 @@ 
             except error.LookupError:
                 warnings.append(_("skipping missing subrepository: %s\n")
                                % join(subpath))
+    ui.progress(_('deleting'), None)
 
     # warn about failure to delete explicit files/dirs
     deleteddirs = util.dirs(deleted)
-    for f in m.files():
+    files = m.files()
+    total = len(files)
+    count = 0
+    for f in files:
         def insubrepo():
             for subpath in wctx.substate:
                 if f.startswith(subpath):
                     return True
             return False
 
+        count += 1
+        ui.progress(_('deleting'), count, total=total, unit=_('file'))
         isdir = f in deleteddirs or wctx.hasdir(f)
         if f in repo.dirstate or isdir or f == '.' or insubrepo():
             continue
@@ -2449,28 +2461,49 @@ 
                         % m.rel(f))
         # missing files will generate a warning elsewhere
         ret = 1
+    ui.progress(_('deleting'), None)
 
     if force:
         list = modified + deleted + clean + added
     elif after:
         list = deleted
-        for f in modified + added + clean:
-            warnings.append(_('not removing %s: file still exists\n') % m.rel(f))
+        remaining = modified + added + clean
+        total = len(remaining)
+        count = 0
+        for f in remaining:
+            count += 1
+            ui.progress(_('skipping'), count, total=total, unit=_('file'))
+            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)
+        count = 0
         for f in modified:
+            count += 1
+            ui.progress(_('skipping'), count, total=total, unit=_('file'))
             warnings.append(_('not removing %s: file is modified (use -f'
                       ' to force removal)\n') % m.rel(f))
             ret = 1
         for f in added:
+            count += 1
+            ui.progress(_('skipping'), count, total=total, unit=_('file'))
             warnings.append(_('not removing %s: file has been marked for add'
                       ' (use forget to undo)\n') % m.rel(f))
             ret = 1
-
-    for f in sorted(list):
+        ui.progress(_('skipping'), None)
+
+    list = sorted(list)
+    total = len(list)
+    count = 0
+    for f in list:
+        count += 1
         if ui.verbose or not m.exact(f):
+            ui.progress(_('deleting'), count, total=total, unit=_('file'))
             ui.status(_('removing %s\n') % m.rel(f))
+    ui.progress(_('deleting'), None)
 
     with repo.wlock():
         if not after:
diff --git a/tests/test-remove.t b/tests/test-remove.t
--- a/tests/test-remove.t
+++ b/tests/test-remove.t
@@ -7,6 +7,18 @@ 
   >     hg up -C
   > }
 
+  $ cat >> $HGRCPATH <<EOF
+  > [progress]
+  > disable=False
+  > assume-tty = 1
+  > delay = 0
+  > # set changedelay really large so we don't see nested topics
+  > changedelay = 30000
+  > format = topic bar number
+  > refresh = 0
+  > width = 60
+  > EOF
+
   $ hg init a
   $ cd a
   $ echo a > foo
@@ -14,6 +26,9 @@ 
 file not managed
 
   $ remove foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing foo: file is untracked
   exit code: 1
   ? foo
@@ -29,42 +44,72 @@ 
   $ echo b > bar
   $ hg add bar
   $ remove bar
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing bar: file has been marked for add (use forget to undo)
   exit code: 1
   A bar
   ./bar
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 01 state clean, options none
 
   $ remove foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
   ? bar
   ./bar
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 02 state modified, options none
 
   $ echo b >> foo
   $ remove foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing foo: file is modified (use -f to force removal)
   exit code: 1
   M foo
   ? bar
   ./bar
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 03 state missing, options none
 
   $ rm foo
   $ remove foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
   ? bar
   ./bar
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 10 state added, options -f
@@ -72,6 +117,9 @@ 
   $ echo b > bar
   $ hg add bar
   $ remove -f bar
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   ? bar
   ./bar
@@ -82,24 +130,42 @@ 
 11 state clean, options -f
 
   $ remove -f foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 12 state modified, options -f
 
   $ echo b >> foo
   $ remove -f foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 13 state missing, options -f
 
   $ rm foo
   $ remove -f foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 20 state added, options -A
@@ -107,16 +173,31 @@ 
   $ echo b > bar
   $ hg add bar
   $ remove -A bar
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing bar: file still exists
   exit code: 1
   A bar
   ./bar
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 21 state clean, options -A
 
   $ remove -A foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing foo: file still exists
   exit code: 1
   ? bar
@@ -128,22 +209,37 @@ 
 
   $ echo b >> foo
   $ remove -A foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing foo: file still exists
   exit code: 1
   M foo
   ? bar
   ./bar
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 23 state missing, options -A
 
   $ rm foo
   $ remove -A foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
   ? bar
   ./bar
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 30 state added, options -Af
@@ -151,6 +247,9 @@ 
   $ echo b > bar
   $ hg add bar
   $ remove -Af bar
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   ? bar
   ./bar
@@ -161,26 +260,44 @@ 
 31 state clean, options -Af
 
   $ remove -Af foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 32 state modified, options -Af
 
   $ echo b >> foo
   $ remove -Af foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 33 state missing, options -Af
 
   $ rm foo
   $ remove -Af foo
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   exit code: 0
   R foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 test some directory stuff
@@ -196,42 +313,95 @@ 
 
   $ rm test/bar
   $ remove test
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [=====================>                      ] 1/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing test/bar (glob)
   removing test/foo (glob)
   exit code: 0
   R test/bar
   R test/foo
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 dir, options -f
 
   $ rm test/bar
   $ remove -f test
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [=====================>                      ] 1/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing test/bar (glob)
   removing test/foo (glob)
   exit code: 0
   R test/bar
   R test/foo
   ./foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 dir, options -A
 
   $ rm test/bar
   $ remove -A test
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  skipping [===========================================>] 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)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing test/bar (glob)
   not removing test/foo: file still exists (glob)
   exit code: 1
   R test/bar
   ./foo
   ./test/foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 dir, options -Af
 
   $ rm test/bar
   $ remove -Af test
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [=====================>                      ] 1/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing test/bar (glob)
   removing test/foo (glob)
   exit code: 0
@@ -239,6 +409,9 @@ 
   R test/foo
   ./foo
   ./test/foo
+  \r (no-eol) (esc)
+  updating [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 test remove dropping empty trees (issue1861)
@@ -250,6 +423,14 @@ 
   adding issue1861/b/c/y
   adding issue1861/x
   $ hg rm issue1861/b
+  \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)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing issue1861/b/c/y (glob)
   $ hg ci -m remove
   $ ls issue1861
@@ -270,11 +451,22 @@ 
   $ mkdir d1
   $ echo a > d1/a
   $ hg rm --after d1
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   not removing d1: no tracked files
   [1]
   $ hg add d1/a
   $ rm d1/a
   $ 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)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing d1/a (glob)
 #if windows
   $ hg rm --after nosuch
@@ -283,5 +475,8 @@ 
 #else
   $ hg rm --after nosuch
   nosuch: No such file or directory
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   [1]
 #endif
diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -2,6 +2,15 @@ 
   > [extdiff]
   > # for portability:
   > pdiff = sh "$RUNTESTDIR/pdiff"
+  > [progress]
+  > disable=False
+  > assume-tty = 1
+  > delay = 0
+  > # set changedelay really large so we don't see nested topics
+  > changedelay = 30000
+  > format = topic bar number
+  > refresh = 0
+  > width = 60
   > EOF
 
 Preparing the subrepository 'sub2'
@@ -18,6 +27,17 @@ 
   $ echo sub1 > sub1/sub1
   $ echo "sub2 = ../sub2" > sub1/.hgsub
   $ hg clone sub2 sub1/sub2
+  \r (no-eol) (esc)
+  linking [ <=>                                           ] 1\r (no-eol) (esc)
+  linking [  <=>                                          ] 2\r (no-eol) (esc)
+  linking [   <=>                                         ] 3\r (no-eol) (esc)
+  linking [    <=>                                        ] 4\r (no-eol) (esc)
+  linking [     <=>                                       ] 5\r (no-eol) (esc)
+  linking [      <=>                                      ] 6\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg add -R sub1
@@ -31,6 +51,20 @@ 
   $ echo main > main/main
   $ echo "sub1 = ../sub1" > main/.hgsub
   $ hg clone sub1 main/sub1
+  \r (no-eol) (esc)
+  linking [ <=>                                           ] 1\r (no-eol) (esc)
+  linking [  <=>                                          ] 2\r (no-eol) (esc)
+  linking [   <=>                                         ] 3\r (no-eol) (esc)
+  linking [    <=>                                        ] 4\r (no-eol) (esc)
+  linking [     <=>                                       ] 5\r (no-eol) (esc)
+  linking [      <=>                                      ] 6\r (no-eol) (esc)
+  linking [       <=>                                     ] 7\r (no-eol) (esc)
+  linking [        <=>                                    ] 8\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   updating to branch default
   cloning subrepo sub2 from $TESTTMP/sub2
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -42,10 +76,28 @@ 
 Cleaning both repositories, just as a clone -U
 
   $ hg up -C -R sub2 null
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg up -C -R sub1 null
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
   $ hg up -C -R main null
+  \r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   0 files updated, 0 files merged, 3 files removed, 0 files unresolved
   $ rm -rf main/sub1
   $ rm -rf sub1/sub2
@@ -53,6 +105,21 @@ 
 Clone main
 
   $ hg --config extensions.largefiles= clone main cloned
+  \r (no-eol) (esc)
+  linking [ <=>                                           ] 1\r (no-eol) (esc)
+  linking [  <=>                                          ] 2\r (no-eol) (esc)
+  linking [   <=>                                         ] 3\r (no-eol) (esc)
+  linking [    <=>                                        ] 4\r (no-eol) (esc)
+  linking [     <=>                                       ] 5\r (no-eol) (esc)
+  linking [      <=>                                      ] 6\r (no-eol) (esc)
+  linking [       <=>                                     ] 7\r (no-eol) (esc)
+  linking [        <=>                                    ] 8\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+  updating [===========================================>] 3/3\r (no-eol) (esc)
+  updating [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   updating to branch default
   cloning subrepo sub1 from $TESTTMP/sub1
   cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
@@ -137,6 +204,18 @@ 
 .. but first take a detour through some deep removal testing
 
   $ hg remove -S -I 're:.*.txt' .
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [=====================>                      ] 1/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  deleting [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   removing sub1/sub2/folder/test.txt (glob)
   removing sub1/sub2/test.txt (glob)
   $ hg status -S
@@ -144,9 +223,37 @@ 
   R sub1/sub2/test.txt
   $ hg update -Cq
   $ hg remove -I 're:.*.txt' sub1
+  \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)
   $ hg status -S
   $ hg remove sub1/sub2/folder/test.txt
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\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)
+  \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)
   $ hg remove sub1/.hgsubstate
+  \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)
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ mv sub1/.hgsub sub1/x.hgsub
   $ hg status -S
   warning: subrepo spec file 'sub1/.hgsub' not found
@@ -165,6 +272,9 @@ 
   $ cd foo
   $ touch bar/abc
   $ hg addremove -S ..
+  \r (no-eol) (esc)
+  searching for exact renames [                         ] 0/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   adding ../sub1/sub2/folder/test.txt (glob)
   removing ../sub1/sub2/test.txt (glob)
   adding ../sub1/foo (glob)
@@ -177,7 +287,28 @@ 
 
 Archive wdir() with subrepos
   $ hg rm main
+  \r (no-eol) (esc)
+  deleting [===========================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ hg archive -S -r 'wdir()' ../wdir
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/4\r (no-eol) (esc)
+  archiving (sub1) [========>                           ] 1/4\r (no-eol) (esc)
+  archiving (sub1) [=================>                  ] 2/4\r (no-eol) (esc)
+  archiving (sub1) [==========================>         ] 3/4\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============>                ] 1/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
   Only in ../wdir: .hg_archival.txt
 
@@ -205,6 +336,23 @@ 
   $ rm sub1/sub1
   $ rm -r ../wdir
   $ hg archive -v -S -r 'wdir()' ../wdir
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/3\r (no-eol) (esc)
+  archiving (sub1) [===========>                        ] 1/3\r (no-eol) (esc)
+  archiving (sub1) [=======================>            ] 2/3\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============>                ] 1/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ find ../wdir -type f | sort
   ../wdir/.hg_archival.txt
   ../wdir/.hgsub
@@ -220,6 +368,24 @@ 
   $ hg update -Cq
   $ rm -r ../wdir
   $ hg archive -S -r 'wdir()' ../wdir
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/3\r (no-eol) (esc)
+  archiving (sub1) [===========>                        ] 1/3\r (no-eol) (esc)
+  archiving (sub1) [=======================>            ] 2/3\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [=========>                     ] 1/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [===================>           ] 2/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ cat ../wdir/.hg_archival.txt
   repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
   node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
@@ -333,6 +499,24 @@ 
   $ hg up -Cq
 
   $ hg --config extensions.largefiles=! archive -S ../archive_all
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/3\r (no-eol) (esc)
+  archiving (sub1) [===========>                        ] 1/3\r (no-eol) (esc)
+  archiving (sub1) [=======================>            ] 2/3\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [=========>                     ] 1/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [===================>           ] 2/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ find ../archive_all | sort
   ../archive_all
   ../archive_all/.hg_archival.txt
@@ -352,6 +536,22 @@ 
 Check that archive -X works in deep subrepos
 
   $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/3\r (no-eol) (esc)
+  archiving (sub1) [===========>                        ] 1/3\r (no-eol) (esc)
+  archiving (sub1) [=======================>            ] 2/3\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/1\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ find ../archive_exclude | sort
   ../archive_exclude
   ../archive_exclude/.hg_archival.txt
@@ -366,6 +566,14 @@ 
   ../archive_exclude/sub1/sub2/sub2
 
   $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
+  \r (no-eol) (esc)
+  archiving (sub1) [ <=>                                  ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============>                ] 1/2\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ find ../archive_include | sort
   ../archive_include
   ../archive_include/sub1
@@ -688,6 +896,10 @@ 
 Test .hgsubstate in the R state
 
   $ hg rm .hgsub .hgsubstate
+  \r (no-eol) (esc)
+  deleting [=====================>                      ] 1/2\r (no-eol) (esc)
+  deleting [===========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ hg ci -m 'trash subrepo tracking'
 
   $ hg log -r "subrepo('re:sub\d+')" --style compact
@@ -726,6 +938,31 @@ 
   $ hg --config extensions.extdiff= pdiff -S
 
   $ hg --config extensions.extdiff= pdiff -r '.^' -S
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/2\r (no-eol) (esc)
+  archiving [====================>                      ] 1/2\r (no-eol) (esc)
+  archiving [==========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [ <=>                                  ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [ <=>                             ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub3) [ <=>                                  ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/2\r (no-eol) (esc)
+  archiving [====================>                      ] 1/2\r (no-eol) (esc)
+  archiving [==========================================>] 2/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [ <=>                                  ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [ <=>                             ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
   --- cloned.*/.hgsub	* (glob)
   +++ cloned/.hgsub	* (glob)
@@ -741,6 +978,45 @@ 
   [1]
 
   $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/1\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/1\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/8\r (no-eol) (esc)
+  archiving [====>                                      ] 1/8\r (no-eol) (esc)
+  archiving [=========>                                 ] 2/8\r (no-eol) (esc)
+  archiving [===============>                           ] 3/8\r (no-eol) (esc)
+  archiving [====================>                      ] 4/8\r (no-eol) (esc)
+  archiving [=========================>                 ] 5/8\r (no-eol) (esc)
+  archiving [===============================>           ] 6/8\r (no-eol) (esc)
+  archiving [====================================>      ] 7/8\r (no-eol) (esc)
+  archiving [==========================================>] 8/8\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1) [                                    ] 0/1\r (no-eol) (esc)
+  archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [=========>                     ] 1/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [===================>           ] 2/3\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub3) [                                    ] 0/1\r (no-eol) (esc)
+  archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
   --- cloned.*/.hglf/b.dat	* (glob)
   +++ cloned.*/.hglf/b.dat	* (glob)
@@ -806,6 +1082,13 @@ 
 
   $ echo mod > sub1/sub2/sub2
   $ hg --config extensions.extdiff= pdiff -S
+  \r (no-eol) (esc)
+  archiving (sub1) [ <=>                                  ] 0\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (sub1/sub2) [                               ] 0/1\r (no-eol) (esc)
+  archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   --- */cloned.*/sub1/sub2/sub2	* (glob)
   +++ */cloned/sub1/sub2/sub2	* (glob)
   @@ -1* +1* @@ (glob)