Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 16828:8abee656e14c
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 01 Jun 2012 15:14:29 -0500 |
parents | 107a3270a24a 6d42c797ca6e |
children | cafd8a8fb713 |
comparison
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() |