Mercurial > hg-stable
changeset 17374:0cec762790ed stable
store: only one kind of OSError means "nonexistent entry"
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Wed, 15 Aug 2012 16:31:25 -0700 |
parents | 4cbb1137941d |
children | 499e284f3f32 b05e517c2236 cb12d3ce5607 |
files | mercurial/store.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/store.py Wed Aug 15 16:30:32 2012 -0700 +++ b/mercurial/store.py Wed Aug 15 16:31:25 2012 -0700 @@ -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 @@ 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: