Submitter | Andrew Shadura |
---|---|
Date | Dec. 23, 2013, 1:15 p.m. |
Message ID | <9d828248ba21fc13ed6c.1387804514@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/3229/ |
State | Accepted |
Commit | 0c22257388d6fc0f326236e09956da16931834c0 |
Headers | show |
Comments
On Mon, Dec 23, 2013 at 02:15:14PM +0100, Andrew Shadura wrote: > # HG changeset patch > # User Andrew Shadura <andrew@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@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
On Mon, 2013-12-23 at 14:15 +0100, Andrew Shadura wrote: > # HG changeset patch > # User Andrew Shadura <andrew@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 > > hg-git uses tagtype 'git', for example, so it's better > to check for tagtype != 'local', not strictly for 'global' Queued for default, thanks. Check-code sends its regards: mercurial/templatekw.py:120: > tags = [t for t in ctx.tags() if (repo.tagtype(t) and repo.tagtype(t) != 'local')] line too long
Patch
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