mercurial/store.py
branchstable
changeset 17374 0cec762790ed
parent 17373 4cbb1137941d
child 17555 57eba8158736
equal deleted inserted replaced
17373:4cbb1137941d 17374:0cec762790ed
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 from i18n import _
     8 from i18n import _
     9 import osutil, scmutil, util
     9 import osutil, scmutil, util
    10 import os, stat
    10 import os, stat, errno
    11 
    11 
    12 _sha = util.sha1
    12 _sha = util.sha1
    13 
    13 
    14 # This avoids a collision between a file named foo and a dir named
    14 # This avoids a collision between a file named foo and a dir named
    15 # foo.i or foo.d
    15 # foo.i or foo.d
   401         for f in sorted(self.fncache):
   401         for f in sorted(self.fncache):
   402             ef = self.encode(f)
   402             ef = self.encode(f)
   403             try:
   403             try:
   404                 yield f, ef, self.getsize(ef)
   404                 yield f, ef, self.getsize(ef)
   405                 existing.append(f)
   405                 existing.append(f)
   406             except OSError:
   406             except OSError, err:
       
   407                 if err.errno != errno.ENOENT:
       
   408                     raise
   407                 # nonexistent entry
   409                 # nonexistent entry
   408                 rewrite = True
   410                 rewrite = True
   409         if rewrite:
   411         if rewrite:
   410             # rewrite fncache to remove nonexistent entries
   412             # rewrite fncache to remove nonexistent entries
   411             # (may be caused by rollback / strip)
   413             # (may be caused by rollback / strip)