# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1254431927 -7200
# Node ID 17f0f59cc4d7373c1d12fe4102074242c3d0b1b4
# Parent  a2dd1d3959eb1197eb91b47e5c7dbf50a48ede87
logview: introduce [tortoisehg] "hidetags" config option

Example use case: Specify

  [tortoisehg]
  hidetags=qbase qparent qtip

in mercurial.ini to suppress those standard mq tags.

The logviewer must be restarted when changing that setting.

diff --git a/tortoisehg/hgtk/logview/treemodel.py 
b/tortoisehg/hgtk/logview/treemodel.py
--- a/tortoisehg/hgtk/logview/treemodel.py
+++ b/tortoisehg/hgtk/logview/treemodel.py
@@ -52,6 +52,8 @@ class TreeModel(gtk.GenericTreeModel):
         self.branchtags = repo.branchtags()
         self.origtip = origtip
         self.bundleview = bview
+        self.hidetags = self.repo.ui.config(
+            'tortoisehg', 'hidetags', '').split()
 
     def refresh(self):
         repo = self.repo
@@ -153,8 +155,9 @@ class TreeModel(gtk.GenericTreeModel):
             taglist = hglib.toutf(', '.join(tags))
             tstr = ''
             for tag in tags:
-                tstr += '<span color="%s" background="%s"> %s </span> ' % \
-                        ('black', '#ffffaa', tag)
+                if tag not in self.hidetags:
+                    tstr += '<span color="%s" background="%s"> %s </span> ' % \
+                            ('black', '#ffffaa', tag)
 
             branch = ctx.branch()
             bstr = ''

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to