mercurial/patch.py
changeset 16828 8abee656e14c
parent 16803 107a3270a24a
parent 16813 6d42c797ca6e
child 16834 cafd8a8fb713
equal deleted inserted replaced
16825:b6ef1395d77f 16828:8abee656e14c
  1343                 rejects += 1
  1343                 rejects += 1
  1344                 continue
  1344                 continue
  1345         elif state == 'git':
  1345         elif state == 'git':
  1346             for gp in values:
  1346             for gp in values:
  1347                 path = pstrip(gp.oldpath)
  1347                 path = pstrip(gp.oldpath)
  1348                 data, mode = backend.getfile(path)
  1348                 try:
  1349                 store.setfile(path, data, mode)
  1349                     data, mode = backend.getfile(path)
       
  1350                 except IOError, e:
       
  1351                     if e.errno != errno.ENOENT:
       
  1352                         raise
       
  1353                     # The error ignored here will trigger a getfile()
       
  1354                     # error in a place more appropriate for error
       
  1355                     # handling, and will not interrupt the patching
       
  1356                     # process.
       
  1357                 else:
       
  1358                     store.setfile(path, data, mode)
  1350         else:
  1359         else:
  1351             raise util.Abort(_('unsupported parser state: %s') % state)
  1360             raise util.Abort(_('unsupported parser state: %s') % state)
  1352 
  1361 
  1353     if current_file:
  1362     if current_file:
  1354         rejects += current_file.close()
  1363         rejects += current_file.close()