# HG changeset patch # User Bryan O'Sullivan # Date 2012-08-15 23:31:25 # Node ID 0cec762790ed34c469ce67b8ca8223545c57e148 # Parent 4cbb1137941d8d97a59efdf0acd47419f07969d3 store: only one kind of OSError means "nonexistent entry" diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -7,7 +7,7 @@ from i18n import _ import osutil, scmutil, util -import os, stat +import os, stat, errno _sha = util.sha1 @@ -403,7 +403,9 @@ class fncachestore(basicstore): try: yield f, ef, self.getsize(ef) existing.append(f) - except OSError: + except OSError, err: + if err.errno != errno.ENOENT: + raise # nonexistent entry rewrite = True if rewrite: