70 cache = context.resource(mapping, 'cache') |
73 cache = context.resource(mapping, 'cache') |
71 |
74 |
72 cachename = 'latesttags' |
75 cachename = 'latesttags' |
73 if pattern is not None: |
76 if pattern is not None: |
74 cachename += '-' + pattern |
77 cachename += '-' + pattern |
75 match = util.stringmatcher(pattern)[2] |
78 match = stringutil.stringmatcher(pattern)[2] |
76 else: |
79 else: |
77 match = util.always |
80 match = util.always |
78 |
81 |
79 if cachename not in cache: |
82 if cachename not in cache: |
80 # Cache mapping from rev to a tuple with tag date, tag |
83 # Cache mapping from rev to a tuple with tag date, tag |
305 extras = util.sortdict((k, extras[k]) for k in sorted(extras)) |
308 extras = util.sortdict((k, extras[k]) for k in sorted(extras)) |
306 makemap = lambda k: {'key': k, 'value': extras[k]} |
309 makemap = lambda k: {'key': k, 'value': extras[k]} |
307 c = [makemap(k) for k in extras] |
310 c = [makemap(k) for k in extras] |
308 f = _showcompatlist(context, mapping, 'extra', c, plural='extras') |
311 f = _showcompatlist(context, mapping, 'extra', c, plural='extras') |
309 return _hybrid(f, extras, makemap, |
312 return _hybrid(f, extras, makemap, |
310 lambda k: '%s=%s' % (k, util.escapestr(extras[k]))) |
313 lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k]))) |
311 |
314 |
312 def _showfilesbystat(context, mapping, name, index): |
315 def _showfilesbystat(context, mapping, name, index): |
313 repo = context.resource(mapping, 'repo') |
316 repo = context.resource(mapping, 'repo') |
314 ctx = context.resource(mapping, 'ctx') |
317 ctx = context.resource(mapping, 'ctx') |
315 revcache = context.resource(mapping, 'revcache') |
318 revcache = context.resource(mapping, 'revcache') |