remove: add a label for messages about removed files
authorBoris Feld <boris.feld@octobus.net>
Tue, 14 Aug 2018 11:39:48 +0200
changeset 39127 1320df0dcaae
parent 39126 3ff9d2ec6d88
child 39128 ddc1da134772
remove: add a label for messages about removed files Keeping consistency between addremove and remove seems a good idea.
mercurial/cmdutil.py
tests/test-remove.t
--- a/mercurial/cmdutil.py	Tue Aug 14 11:15:05 2018 +0200
+++ b/mercurial/cmdutil.py	Tue Aug 14 11:39:48 2018 +0200
@@ -2130,7 +2130,8 @@
 
     for f in forget:
         if ui.verbose or not match.exact(f) or interactive:
-            ui.status(_('removing %s\n') % match.rel(f))
+            ui.status(_('removing %s\n') % match.rel(f),
+                      label='addremove.removed')
 
     if not dryrun:
         rejected = wctx.forget(forget, prefix)
@@ -2263,7 +2264,8 @@
     for f in list:
         if ui.verbose or not m.exact(f):
             progress.increment()
-            ui.status(_('removing %s\n') % m.rel(f))
+            ui.status(_('removing %s\n') % m.rel(f),
+                      label='addremove.removed')
     progress.complete()
 
     if not dryrun:
--- a/tests/test-remove.t	Tue Aug 14 11:15:05 2018 +0200
+++ b/tests/test-remove.t	Tue Aug 14 11:39:48 2018 +0200
@@ -520,6 +520,14 @@
   deleting [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   removing a
+  $ hg remove a -nv --color debug
+  \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)
+  [addremove.removed ui.status|removing a]
   $ hg diff
 
   $ cat >> .hg/hgrc <<EOF