Mercurial > public > mercurial-scm > hg-stable
diff hgext/remotenames.py @ 36927:32f9b7e3f056
templater: move hybrid class and functions to templateutil module
And make _hybrid and _mappable classes public. _showlist() is still marked
as private since it's weird and third-party codes shouldn't depend on it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 08 Mar 2018 23:15:09 +0900 |
parents | 121a20e5da56 |
children | b710fdebd0db |
line wrap: on
line diff
--- a/hgext/remotenames.py Thu Mar 08 23:10:46 2018 +0900 +++ b/hgext/remotenames.py Thu Mar 08 23:15:09 2018 +0900 @@ -35,7 +35,7 @@ registrar, revsetlang, smartset, - templatekw, + templateutil, ) # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for @@ -237,8 +237,8 @@ if 'remotebranches' in repo.names: remotenames += repo.names['remotebranches'].names(repo, ctx.node()) - return templatekw.compatlist(context, mapping, 'remotename', remotenames, - plural='remotenames') + return templateutil.compatlist(context, mapping, 'remotename', remotenames, + plural='remotenames') @templatekeyword('remotebookmarks', requires={'repo', 'ctx', 'templ'}) def remotebookmarkskw(context, mapping): @@ -250,8 +250,8 @@ if 'remotebookmarks' in repo.names: remotebmarks = repo.names['remotebookmarks'].names(repo, ctx.node()) - return templatekw.compatlist(context, mapping, 'remotebookmark', - remotebmarks, plural='remotebookmarks') + return templateutil.compatlist(context, mapping, 'remotebookmark', + remotebmarks, plural='remotebookmarks') @templatekeyword('remotebranches', requires={'repo', 'ctx', 'templ'}) def remotebrancheskw(context, mapping): @@ -263,8 +263,8 @@ if 'remotebranches' in repo.names: remotebranches = repo.names['remotebranches'].names(repo, ctx.node()) - return templatekw.compatlist(context, mapping, 'remotebranch', - remotebranches, plural='remotebranches') + return templateutil.compatlist(context, mapping, 'remotebranch', + remotebranches, plural='remotebranches') def _revsetutil(repo, subset, x, rtypes): """utility function to return a set of revs based on the rtypes"""