[PATCH] templatekw: allow tagtypes other than global in getlatesttags
Augie Fackler
raf at durin42.com
Wed Jan 1 23:21:09 UTC 2014
On Mon, Dec 23, 2013 at 02:15:14PM +0100, Andrew Shadura wrote:
> # HG changeset patch
> # User Andrew Shadura <andrew at shadura.me>
> # Date 1387804471 -3600
> # Mon Dec 23 14:14:31 2013 +0100
> # Node ID 9d828248ba21fc13ed6c4cc343761dd0966087ad
> # Parent 4274eda143cb1025be1130ffdaaf62370a2a6961
> templatekw: allow tagtypes other than global in getlatesttags
Seems reasonable to me. Does anyone else have feelings on this patch?
>
> 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,7 @@ 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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list