##// END OF EJS Templates
patch: dot not ignore hunk of files marked as 'deleted'...
Patrick Mezard -
r14535:e597ef52 default
parent child Browse files
Show More
@@ -1237,12 +1237,12 b' def _applydiff(ui, fp, patcher, backend,'
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)
@@ -442,4 +442,27 b' Copy and changes with existing destinati'
442 [255]
442 [255]
443 $ cat b
443 $ cat b
444 b
444 b
445
446 $ ln -s b linkb
447 $ hg add linkb
448 $ hg ci -m addlinkb
449 $ hg import --no-commit - <<EOF
450 > diff --git a/linkb b/linkb
451 > deleted file mode 120000
452 > --- a/linkb
453 > +++ /dev/null
454 > @@ -1,1 +0,0 @@
455 > -badhunk
456 > \ No newline at end of file
457 > EOF
458 applying patch from stdin
459 patching file linkb
460 Hunk #1 FAILED at 0
461 1 out of 1 hunks FAILED -- saving rejects to file linkb.rej
462 abort: patch failed to apply
463 [255]
464 $ hg st
465 ? b.rej
466 ? linkb.rej
467
445 $ cd ..
468 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now