changeset 39126:3ff9d2ec6d88

add: add a label for messages about added files Keeping consistency between addremove and add seems a good idea.
author Boris Feld <boris.feld@octobus.net>
date Tue, 14 Aug 2018 11:15:05 +0200
parents ad88726d6982
children 1320df0dcaae
files mercurial/cmdutil.py tests/test-add.t
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Jul 25 17:11:52 2018 +0200
+++ b/mercurial/cmdutil.py	Tue Aug 14 11:15:05 2018 +0200
@@ -2031,7 +2031,8 @@
                 cca(f)
             names.append(f)
             if ui.verbose or not exact:
-                ui.status(_('adding %s\n') % match.rel(f))
+                ui.status(_('adding %s\n') % match.rel(f),
+                          label='addremove.added')
 
     for subpath in sorted(wctx.substate):
         sub = wctx.sub(subpath)
--- a/tests/test-add.t	Wed Jul 25 17:11:52 2018 +0200
+++ b/tests/test-add.t	Tue Aug 14 11:15:05 2018 +0200
@@ -12,6 +12,9 @@
   $ hg forget a
   $ hg add
   adding a
+  $ hg forget a
+  $ hg add --color debug
+  [addremove.added ui.status|adding a]
   $ hg st
   A a
   $ mkdir dir