# HG changeset patch
# User Yuki KODAMA <endflow....@gmail.com>
# Date 1254830545 -32400
# Node ID ae6618e958e364bf3bd721e85582576815f577c1
# Parent  59ee4c36d676b75ffcc5e8abc47c5cbe0eaade77
thgconfig: change to 'comma separated list' for hidetags option

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
@@ -14,6 +14,7 @@
 dialog.  Other portions stolen from graphlog extension.
 '''

+import re
 import gtk
 import gobject
 from mercurial import util, templatefilters
@@ -53,8 +54,15 @@
         self.tagrevs = [repo[r].rev() for t, r in repo.tagslist()]
         self.branchtags = repo.branchtags()
         self.set_author_color()
-        self.hidetags = self.repo.ui.config(
-            'tortoisehg', 'hidetags', '').split()
+        hidetags = self.repo.ui.config('tortoisehg', 'hidetags', '')
+        if hidetags:
+            hidetags = hglib.tounicode(hidetags)
+            pat = r'(?:(?<!\\)(?<=\\\\)|(?<!\\)),'
+            hidetags = [t.strip() for t in re.split(pat, hidetags) if t]
+            hidetags = [t.replace('\\\\', '\\').replace('\\,', ',')
for t in hidetags]
+            self.hidetags = [hglib.toutf(t) for t in hidetags]
+        else:
+            self.hidetags = []

     def refresh(self):
         repo = self.repo
diff --git a/tortoisehg/hgtk/thgconfig.py b/tortoisehg/hgtk/thgconfig.py
--- a/tortoisehg/hgtk/thgconfig.py
+++ b/tortoisehg/hgtk/thgconfig.py
@@ -124,9 +124,10 @@
         ' @ character, and \\n to a linefeed.'
         ' Default: None')),
     (_('Hide Tags'), 'tortoisehg.hidetags', [],
-        _('Space separated list of tags that will not be shown.'
-          ' Useful example: Specify "qbase qparent qtip" to hide the'
-          ' standard tags inserted by the Mercurial Queues Extension.'
+        _('Comma separated list of tags that will not be shown.'
+        ' Commas in the tag name must be escaped using a backslash (\\).'
+        ' Useful example: Specify "qbase,qparent,qtip" to hide the'
+        ' standard tags inserted by the Mercurial Queues Extension.'
         ' Default: None')),
         )

Attachment: thg-kuy_rev4432.patch
Description: Binary data

------------------------------------------------------------------------------
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