Mercurial > hg-stable
changeset 15799:e43c140eb08f stable
dirstate: propagate IOError other than ENOENT when reading branch
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 06 Jan 2012 07:37:59 +0100 |
parents | e6c44dbe902f |
children | e4fc0f0b4f7e |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Fri Jan 06 15:05:51 2012 +0100 +++ b/mercurial/dirstate.py Fri Jan 06 07:37:59 2012 +0100 @@ -4,6 +4,7 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +import errno from node import nullid from i18n import _ @@ -80,7 +81,9 @@ def _branch(self): try: return self._opener.read("branch").strip() or "default" - except IOError: + except IOError, inst: + if inst.errno != errno.ENOENT: + raise return "default" @propertycache