Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/localrepo.py @ 3496: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 +++ b/mercurial/localrepo.py @@ -247,15 +247,12 @@ class localrepository(repo.repository): 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