Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 3455:baa271270829
Use file contexts in tags code
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 18 Oct 2006 14:14:59 -0500 |
parents | dba3cadef789 |
children | 3464f5e77f34 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Oct 18 14:06:48 2006 -0500 +++ b/mercurial/localrepo.py Wed Oct 18 14:14:59 2006 -0500 @@ -247,15 +247,12 @@ heads.reverse() fl = self.file(".hgtags") for node in heads: - change = self.changelog.read(node) - rev = self.changelog.rev(node) - fn, ff = self.manifest.find(change[0], '.hgtags') - if fn is None: continue + f = self.filectx('.hgtags', node) + if not f: continue count = 0 - for l in fl.read(fn).splitlines(): + for l in f.data().splitlines(): count += 1 - parsetag(l, _(".hgtags (rev %d:%s), line %d") % - (rev, short(node), count)) + parsetag(l, _("%s, line %d") % (str(f), count)) try: f = self.opener("localtags") count = 0