# HG changeset patch # User Andrew Shadura # Date 2013-12-23 13:14:31 # Node ID 0c22257388d6fc0f326236e09956da16931834c0 # Parent 33394f2e331ea46d2eaa149a3f7a35f050281976 templatekw: allow tagtypes other than global in getlatesttags hg-git uses tagtype 'git', for example, so it's better to check for tagtype != 'local', not strictly for 'global' diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -117,7 +117,8 @@ def getlatesttags(repo, ctx, cache): if rev in latesttags: continue ctx = repo[rev] - tags = [t for t in ctx.tags() if repo.tagtype(t) == 'global'] + tags = [t for t in ctx.tags() + if (repo.tagtype(t) and repo.tagtype(t) != 'local')] if tags: latesttags[rev] = ctx.date()[0], 0, ':'.join(sorted(tags)) continue