changeset 15419:ccb7de21625a

phases: handle errors other than ENOENT appropriately
author Matt Mackall <mpm@selenic.com>
date Sun, 06 Nov 2011 11:57:24 -0600
parents cf729af26963
children e80d0d3198f0
files mercurial/phases.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Fri Nov 04 00:16:24 2011 +0100
+++ b/mercurial/phases.py	Sun Nov 06 11:57:24 2011 -0600
@@ -7,6 +7,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, bin, hex
 
 allphases = range(2)
@@ -24,8 +25,9 @@
                 roots[int(phase)].add(bin(nh))
         finally:
             f.close()
-    except IOError:
-        pass # default value are enough
+    except IOError, inst:
+        if inst.errno != errno.ENOENT:
+            raise
     return roots
 
 def writeroots(repo):