Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

csinfo: respect 'hidetags' option

To ignore 'hidetags' option, you can use 'rawtags' item.

Changeset 8271b27fea38

Parent 9813a9a72489

by Yuki KODAMA

Changes to one file · Browse files at 8271b27fea38 Showing diff from parent 9813a9a72489 Diff from another changeset...

 
114
115
116
117
 
118
119
120
 
153
154
155
156
 
157
158
159
160
 
 
 
 
 
 
 
 
 
161
162
163
 
187
188
189
190
 
191
192
193
 
114
115
116
 
117
118
119
120
 
153
154
155
 
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
 
196
197
198
 
199
200
201
202
@@ -114,7 +114,7 @@
  LABELS = {'rev': _('rev:'), 'revnum': _('rev:'), 'revid': _('rev:'),   'summary': _('summary:'), 'user': _('user:'),   'date': _('date:'), 'branch': _('branch:'), 'tags': _('tags:'), - 'rawbranch': _('branch:')} + 'rawbranch': _('branch:'), 'rawtags': _('tags:')}     def __init__(self):   pass @@ -153,11 +153,20 @@
  for b in dblist.split(',')]:   value = None   return value - elif item == 'tags': + elif item == 'rawtags':   value = [hglib.toutf(tag) for tag in ctx.tags()]   if len(value) == 0:   return None   return value + elif item == 'tags': + value = self.get_data(widget, 'rawtags', rev, custom, repo) + if value: + htags = repo.ui.config('tortoisehg', 'hidetags', '') + htags = [hglib.toutf(b.strip()) for b in htags.split()] + value = [tag for tag in value if tag not in htags] + if len(value) == 0: + value = None + return value   elif item == 'ishead':   return len(ctx.children()) == 0   return default_func(widget, ctx) @@ -187,7 +196,7 @@
  elif item in ('rawbranch', 'branch'):   return gtklib.markup(' %s ' % value, color='black',   background='#aaffaa') - elif item == 'tags': + elif item in ('rawtags', 'tags'):   opts = dict(color='black', background='#ffffaa')   tags = [gtklib.markup(' %s ' % tag, **opts) for tag in value]   return ' '.join(tags)