comparison mercurial/patch.py @ 14535:e597ef52a7c2

patch: dot not ignore hunk of files marked as 'deleted' git 'deleted' flag was processed unconditionnally and the file removed even if the related hunk was not matching.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 05 Jun 2011 22:26:01 +0200
parents ecc79816d31e
children 65f4512e40e4
comparison
equal deleted inserted replaced
14534:ecc79816d31e 14535:e597ef52a7c2
1235 if gp: 1235 if gp:
1236 path = pstrip(gp.path) 1236 path = pstrip(gp.path)
1237 if gp.oldpath: 1237 if gp.oldpath:
1238 copysource = pstrip(gp.oldpath) 1238 copysource = pstrip(gp.oldpath)
1239 changed[path] = gp 1239 changed[path] = gp
1240 if gp.op == 'DELETE':
1241 backend.unlink(path)
1242 continue
1243 if gp.op == 'RENAME': 1240 if gp.op == 'RENAME':
1244 backend.unlink(copysource) 1241 backend.unlink(copysource)
1245 if not first_hunk: 1242 if not first_hunk:
1243 if gp.op == 'DELETE':
1244 backend.unlink(path)
1245 continue
1246 data, mode = None, None 1246 data, mode = None, None
1247 if gp.op in ('RENAME', 'COPY'): 1247 if gp.op in ('RENAME', 'COPY'):
1248 data, mode = store.getfile(copysource) 1248 data, mode = store.getfile(copysource)
1249 if gp.mode: 1249 if gp.mode:
1250 mode = gp.mode 1250 mode = gp.mode