Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

hglib: add csinfo's functions for getting tag info

Ready for using on the Log column of the main repo view.

Changeset 8b73e12c54fe

Parent c7208cbd9034

by George Marrows

Changes to 2 files · Browse files at 8b73e12c54fe Showing diff from parent c7208cbd9034 Diff from another changeset...

 
280
281
282
283
284
285
286
 
287
288
289
290
291
292
293
294
295
 
296
297
298
 
280
281
282
 
 
 
 
283
284
 
 
 
 
 
 
 
 
285
286
287
288
@@ -280,19 +280,9 @@
  return value   return None   elif item == 'rawtags': - value = [hglib.toutf(tag) for tag in ctx.tags()] - if len(value) == 0: - return None - return value + return hglib.getrawctxtags(ctx)   elif item == 'tags': - value = self.get_data('rawtags', *args) - if value: - htlist = hglib.gethidetags(ctx._repo.ui) - tags = [tag for tag in value if tag not in htlist] - if len(tags) == 0: - return None - return tags - return None + return hglib.getctxtags(ctx)   elif item == 'transplant':   extra = ctx.extra()   try:
 
172
173
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
176
177
 
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
@@ -172,6 +172,26 @@
  filtered.append(tag)   return filtered   +def getrawctxtags(changectx): + '''Returns the tags for changectx, converted to UTF-8 but + unfiltered for hidden tags''' + value = [toutf(tag) for tag in changectx.tags()] + if len(value) == 0: + return None + return value + +def getctxtags(changectx): + '''Returns all unhidden tags for changectx, converted to UTF-8''' + value = getrawctxtags(changectx) + if value: + htlist = gethidetags(changectx._repo.ui) + tags = [tag for tag in value if tag not in htlist] + if len(tags) == 0: + return None + return tags + return None + +  def diffexpand(line):   'Expand tabs in a line of diff/patch text'   if _tabwidth is None: