##// END OF EJS Templates
addremove: add "ui." prefix to message color keys...
Yuya Nishihara -
r40403:824b687f default
parent child Browse files
Show More
@@ -2058,7 +2058,7 b' def add(ui, repo, match, prefix, explici'
2058 names.append(f)
2058 names.append(f)
2059 if ui.verbose or not exact:
2059 if ui.verbose or not exact:
2060 ui.status(_('adding %s\n') % match.rel(f),
2060 ui.status(_('adding %s\n') % match.rel(f),
2061 label='addremove.added')
2061 label='ui.addremove.added')
2062
2062
2063 for subpath in sorted(wctx.substate):
2063 for subpath in sorted(wctx.substate):
2064 sub = wctx.sub(subpath)
2064 sub = wctx.sub(subpath)
@@ -2157,7 +2157,7 b' def forget(ui, repo, match, prefix, expl'
2157 for f in forget:
2157 for f in forget:
2158 if ui.verbose or not match.exact(f) or interactive:
2158 if ui.verbose or not match.exact(f) or interactive:
2159 ui.status(_('removing %s\n') % match.rel(f),
2159 ui.status(_('removing %s\n') % match.rel(f),
2160 label='addremove.removed')
2160 label='ui.addremove.removed')
2161
2161
2162 if not dryrun:
2162 if not dryrun:
2163 rejected = wctx.forget(forget, prefix)
2163 rejected = wctx.forget(forget, prefix)
@@ -2291,7 +2291,7 b' def remove(ui, repo, m, prefix, after, f'
2291 if ui.verbose or not m.exact(f):
2291 if ui.verbose or not m.exact(f):
2292 progress.increment()
2292 progress.increment()
2293 ui.status(_('removing %s\n') % m.rel(f),
2293 ui.status(_('removing %s\n') % m.rel(f),
2294 label='addremove.removed')
2294 label='ui.addremove.removed')
2295 progress.complete()
2295 progress.complete()
2296
2296
2297 if not dryrun:
2297 if not dryrun:
@@ -83,8 +83,6 b' except ImportError:'
83 'grep.filename': 'magenta',
83 'grep.filename': 'magenta',
84 'grep.user': 'magenta',
84 'grep.user': 'magenta',
85 'grep.date': 'magenta',
85 'grep.date': 'magenta',
86 'addremove.added': 'green',
87 'addremove.removed': 'red',
88 'bookmarks.active': 'green',
86 'bookmarks.active': 'green',
89 'branches.active': 'none',
87 'branches.active': 'none',
90 'branches.closed': 'black bold',
88 'branches.closed': 'black bold',
@@ -119,6 +117,8 b' except ImportError:'
119 'formatvariant.config.default': 'green',
117 'formatvariant.config.default': 'green',
120 'formatvariant.default': '',
118 'formatvariant.default': '',
121 'histedit.remaining': 'red bold',
119 'histedit.remaining': 'red bold',
120 'ui.addremove.added': 'green',
121 'ui.addremove.removed': 'red',
122 'ui.error': 'red',
122 'ui.error': 'red',
123 'ui.prompt': 'yellow',
123 'ui.prompt': 'yellow',
124 'log.changeset': 'yellow',
124 'log.changeset': 'yellow',
@@ -1043,10 +1043,10 b' def addremove(repo, matcher, prefix, opt'
1043 if repo.ui.verbose or not m.exact(abs):
1043 if repo.ui.verbose or not m.exact(abs):
1044 if abs in unknownset:
1044 if abs in unknownset:
1045 status = _('adding %s\n') % m.uipath(abs)
1045 status = _('adding %s\n') % m.uipath(abs)
1046 label = 'addremove.added'
1046 label = 'ui.addremove.added'
1047 else:
1047 else:
1048 status = _('removing %s\n') % m.uipath(abs)
1048 status = _('removing %s\n') % m.uipath(abs)
1049 label = 'addremove.removed'
1049 label = 'ui.addremove.removed'
1050 repo.ui.status(status, label=label)
1050 repo.ui.status(status, label=label)
1051
1051
1052 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1052 renames = _findrenames(repo, m, added + unknown, removed + deleted,
@@ -14,7 +14,7 b''
14 adding a
14 adding a
15 $ hg forget a
15 $ hg forget a
16 $ hg add --color debug
16 $ hg add --color debug
17 [addremove.added ui.status|adding a]
17 [ui.addremove.added ui.status|adding a]
18 $ hg st
18 $ hg st
19 A a
19 A a
20 $ mkdir dir
20 $ mkdir dir
@@ -70,10 +70,10 b''
70 adding d
70 adding d
71 recording removal of a as rename to b (100% similar)
71 recording removal of a as rename to b (100% similar)
72 $ hg addremove -ns 50 --color debug
72 $ hg addremove -ns 50 --color debug
73 [addremove.removed ui.status|removing a]
73 [ui.addremove.removed ui.status|removing a]
74 [addremove.added ui.status|adding b]
74 [ui.addremove.added ui.status|adding b]
75 [addremove.removed ui.status|removing c]
75 [ui.addremove.removed ui.status|removing c]
76 [addremove.added ui.status|adding d]
76 [ui.addremove.added ui.status|adding d]
77 [ ui.status|recording removal of a as rename to b (100% similar)]
77 [ ui.status|recording removal of a as rename to b (100% similar)]
78 $ hg addremove -s 50
78 $ hg addremove -s 50
79 removing a
79 removing a
@@ -527,7 +527,7 b' test dry-run for remove'
527 \r (no-eol) (esc)
527 \r (no-eol) (esc)
528 deleting [===========================================>] 1/1\r (no-eol) (esc)
528 deleting [===========================================>] 1/1\r (no-eol) (esc)
529 \r (no-eol) (esc)
529 \r (no-eol) (esc)
530 [addremove.removed ui.status|removing a]
530 [ui.addremove.removed ui.status|removing a]
531 $ hg diff
531 $ hg diff
532
532
533 $ cat >> .hg/hgrc <<EOF
533 $ cat >> .hg/hgrc <<EOF
General Comments 0
You need to be logged in to leave comments. Login now