ui: use labels when outputting tags
authorMarc Simpson <marc@0branch.com>
Sat, 20 Aug 2011 21:47:10 +0100
changeset 15047 ef43610a4cce
parent 15046 c019df62de45
child 15048 2f0a3977c939
ui: use labels when outputting tags
mercurial/commands.py
--- a/mercurial/commands.py	Thu Aug 18 17:24:04 2011 -0500
+++ b/mercurial/commands.py	Sat Aug 20 21:47:10 2011 +0100
@@ -5010,19 +5010,22 @@
 
     for t, n in reversed(repo.tagslist()):
         if ui.quiet:
-            ui.write("%s\n" % t)
+            ui.write("%s\n" % t, label='tags.normal')
             continue
 
         hn = hexfunc(n)
         r = "%5d:%s" % (repo.changelog.rev(n), hn)
+        rev = ui.label(r, 'log.changeset')
         spaces = " " * (30 - encoding.colwidth(t))
 
+        tag = ui.label(t, 'tags.normal')
         if ui.verbose:
             if repo.tagtype(t) == 'local':
                 tagtype = " local"
+                tag = ui.label(t, 'tags.local')
             else:
                 tagtype = ""
-        ui.write("%s%s %s%s\n" % (t, spaces, r, tagtype))
+        ui.write("%s%s %s%s\n" % (tag, spaces, rev, tagtype))
 
 @command('tip',
     [('p', 'patch', None, _('show patch')),