263 tagtypes = {} |
263 tagtypes = {} |
264 |
264 |
265 tags_.findglobaltags(self.ui, self, alltags, tagtypes) |
265 tags_.findglobaltags(self.ui, self, alltags, tagtypes) |
266 tags_.readlocaltags(self.ui, self, alltags, tagtypes) |
266 tags_.readlocaltags(self.ui, self, alltags, tagtypes) |
267 |
267 |
|
268 # Build the return dicts. Have to re-encode tag names because |
|
269 # the tags module always uses UTF-8 (in order not to lose info |
|
270 # writing to the cache), but the rest of Mercurial wants them in |
|
271 # local encoding. |
268 tags = {} |
272 tags = {} |
269 for (name, (node, hist)) in alltags.iteritems(): |
273 for (name, (node, hist)) in alltags.iteritems(): |
270 if node != nullid: |
274 if node != nullid: |
271 tags[name] = node |
275 tags[encoding.tolocal(name)] = node |
272 tags['tip'] = self.changelog.tip() |
276 tags['tip'] = self.changelog.tip() |
|
277 tagtypes = dict([(encoding.tolocal(name), value) |
|
278 for (name, value) in tagtypes.iteritems()]) |
273 return (tags, tagtypes) |
279 return (tags, tagtypes) |
274 |
280 |
275 def tagtype(self, tagname): |
281 def tagtype(self, tagname): |
276 ''' |
282 ''' |
277 return the type of the given tag. result can be: |
283 return the type of the given tag. result can be: |