Changeset 8b73e12c54fe…
Parent c7208cbd9034…
by
Changes to 2 files · Browse files at 8b73e12c54fe Showing diff from parent c7208cbd9034 Diff from another changeset...
@@ -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,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:
|
Loading...