Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 14646:001788ef4bbb
localrepo: don't attempt to open .hgtags twice if the error isn't ENOENT
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 15 Jun 2011 23:15:04 +0300 |
parents | 68a43fdd7d80 |
children | fdcf6f09b68d |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Jun 16 01:58:00 2011 +0200 +++ b/mercurial/localrepo.py Wed Jun 15 23:15:04 2011 +0300 @@ -272,7 +272,9 @@ try: fp = self.wfile('.hgtags', 'rb+') - except IOError: + except IOError, e: + if e.errno != errno.ENOENT: + raise fp = self.wfile('.hgtags', 'ab') else: prevtags = fp.read()