changeset 1353:a0c68981a5f4

Fix misleading abort message when permissions are bad.
author Eric Hopper <hopper@omnifarious.org>
date Tue, 27 Sep 2005 14:58:28 -0700
parents bf6c91cb816f
children 8cf364c65425
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Sep 27 14:53:11 2005 -0700
+++ b/mercurial/localrepo.py	Tue Sep 27 14:58:28 2005 -0700
@@ -9,7 +9,7 @@
 import filelog, manifest, changelog, dirstate, repo
 from node import *
 from demandload import *
-demandload(globals(), "re lock transaction tempfile stat mdiff")
+demandload(globals(), "re lock transaction tempfile stat mdiff errno")
 
 class localrepository:
     def __init__(self, ui, path=None, create=0):
@@ -1221,7 +1221,9 @@
             t = self.file(f).read(get[f])
             try:
                 self.wwrite(f, t)
-            except IOError:
+            except IOError, e:
+                if e.errno != errno.ENOENT:
+                    raise
                 os.makedirs(os.path.dirname(self.wjoin(f)))
                 self.wwrite(f, t)
             util.set_exec(self.wjoin(f), mf2[f])