##// END OF EJS Templates
phases: handle errors other than ENOENT appropriately
Matt Mackall -
r15419:ccb7de21 default
parent child Browse files
Show More
@@ -7,6 +7,7 b''
7 # This software may be used and distributed according to the terms of the
7 # This software may be used and distributed according to the terms of the
8 # GNU General Public License version 2 or any later version.
8 # GNU General Public License version 2 or any later version.
9
9
10 import errno
10 from node import nullid, bin, hex
11 from node import nullid, bin, hex
11
12
12 allphases = range(2)
13 allphases = range(2)
@@ -24,8 +25,9 b' def readroots(repo):'
24 roots[int(phase)].add(bin(nh))
25 roots[int(phase)].add(bin(nh))
25 finally:
26 finally:
26 f.close()
27 f.close()
27 except IOError:
28 except IOError, inst:
28 pass # default value are enough
29 if inst.errno != errno.ENOENT:
30 raise
29 return roots
31 return roots
30
32
31 def writeroots(repo):
33 def writeroots(repo):
General Comments 0
You need to be logged in to leave comments. Login now