comparison 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
comparison
equal deleted inserted replaced
3495:23ede9e7ad4d 3496:baa271270829
245 # taking precedence 245 # taking precedence
246 heads = self.heads() 246 heads = self.heads()
247 heads.reverse() 247 heads.reverse()
248 fl = self.file(".hgtags") 248 fl = self.file(".hgtags")
249 for node in heads: 249 for node in heads:
250 change = self.changelog.read(node) 250 f = self.filectx('.hgtags', node)
251 rev = self.changelog.rev(node) 251 if not f: continue
252 fn, ff = self.manifest.find(change[0], '.hgtags')
253 if fn is None: continue
254 count = 0 252 count = 0
255 for l in fl.read(fn).splitlines(): 253 for l in f.data().splitlines():
256 count += 1 254 count += 1
257 parsetag(l, _(".hgtags (rev %d:%s), line %d") % 255 parsetag(l, _("%s, line %d") % (str(f), count))
258 (rev, short(node), count))
259 try: 256 try:
260 f = self.opener("localtags") 257 f = self.opener("localtags")
261 count = 0 258 count = 0
262 for l in f: 259 for l in f:
263 count += 1 260 count += 1