# HG changeset patch # User Patrick Mezard # Date 2010-02-13 01:06:13 # Node ID 1c50a954a5244a8da8d6d2311dd12d6a5f6df357 # Parent 400ffd5f2f14d9cf04f92b52aafb684f6b6e36c0 # Parent e553a425751d1c2fdd77180c6b197048852a5692 Merge with crew-stable diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -899,8 +899,12 @@ class localrepository(repo.repository): new[f] = self._filecommit(fctx, m1, m2, linkrev, trp, changed) m1.set(f, fctx.flags()) - except (OSError, IOError): - if error: + except OSError, inst: + self.ui.warn(_("trouble committing %s!\n") % f) + raise + except IOError, inst: + errcode = getattr(inst, 'errno', errno.ENOENT) + if error or errcode and errcode != errno.ENOENT: self.ui.warn(_("trouble committing %s!\n") % f) raise else: