Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 11047:c7dbd6c4877a
tags: return tags in sorted order
This makes log and summary have less arbitrary tag ordering and also
groups similar tags together, such as the mq tags.
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Mon, 26 Apr 2010 15:58:36 -0400 |
parents | 3213e8947975 |
children | eb23c876c111 |
comparison
equal
deleted
inserted
replaced
11046:6e9b9f6c117c | 11047:c7dbd6c4877a |
---|---|
313 '''return the tags associated with a node''' | 313 '''return the tags associated with a node''' |
314 if not self.nodetagscache: | 314 if not self.nodetagscache: |
315 self.nodetagscache = {} | 315 self.nodetagscache = {} |
316 for t, n in self.tags().iteritems(): | 316 for t, n in self.tags().iteritems(): |
317 self.nodetagscache.setdefault(n, []).append(t) | 317 self.nodetagscache.setdefault(n, []).append(t) |
318 for tags in self.nodetagscache.itervalues(): | |
319 tags.sort() | |
318 return self.nodetagscache.get(node, []) | 320 return self.nodetagscache.get(node, []) |
319 | 321 |
320 def _branchtags(self, partial, lrev): | 322 def _branchtags(self, partial, lrev): |
321 # TODO: rename this function? | 323 # TODO: rename this function? |
322 tiprev = len(self) - 1 | 324 tiprev = len(self) - 1 |