handle nonexistent .hgtags in raw _tag

This commit is contained in:
Brendan Cully 2007-07-11 00:34:35 -07:00
parent b476b55a4a
commit cd14b55f6f

View File

@ -129,7 +129,10 @@ class localrepository(repo.repository):
if use_dirstate:
self.wfile('.hgtags', 'ab').write(line)
else:
ntags = self.filectx('.hgtags', parent).data()
try:
ntags = self.filectx('.hgtags', parent).data()
except revlog.LookupError:
ntags = ''
self.wfile('.hgtags', 'ab').write(ntags + line)
if use_dirstate and self.dirstate.state('.hgtags') == '?':
self.add(['.hgtags'])