Mercurial > emacs
comparison lisp/ediff-ptch.el @ 33393:a0ee9eabfff3
(ediff-dispatch-file-patching-job): Check
ediff-patch-map non-nil.
(ediff-fixup-patch-map, ediff-fixup-patch-map)
(ediff-fixup-patch-map, ediff-patch-file-internal): Put temp
buffer into fundamental mode.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 10 Nov 2000 22:36:02 +0000 |
parents | 3ec5a485d0ab |
children | fdb5d08ced13 |
comparison
equal
deleted
inserted
replaced
33392:25fb6fc4f66b | 33393:a0ee9eabfff3 |
---|---|
285 (string-match "^/null/" (cdr (car triple)))) | 285 (string-match "^/null/" (cdr (car triple)))) |
286 ;; couldn't strip base-dir1 and base-dir2 | 286 ;; couldn't strip base-dir1 and base-dir2 |
287 ;; hence, something wrong | 287 ;; hence, something wrong |
288 (progn | 288 (progn |
289 (with-output-to-temp-buffer ediff-msg-buffer | 289 (with-output-to-temp-buffer ediff-msg-buffer |
290 (ediff-with-current-buffer standard-output | |
291 (fundamental-mode)) | |
290 (princ | 292 (princ |
291 (format " | 293 (format " |
292 The patch file contains a context diff for | 294 The patch file contains a context diff for |
293 %s | 295 %s |
294 %s | 296 %s |
340 ((and f1-exists f2-exists | 342 ((and f1-exists f2-exists |
341 (string= file1 file2)) | 343 (string= file1 file2)) |
342 (setcar triple file1)) | 344 (setcar triple file1)) |
343 ((and f1-exists f2-exists) | 345 ((and f1-exists f2-exists) |
344 (with-output-to-temp-buffer ediff-msg-buffer | 346 (with-output-to-temp-buffer ediff-msg-buffer |
347 (ediff-with-current-buffer standard-output | |
348 (fundamental-mode)) | |
345 (princ (format " | 349 (princ (format " |
346 Ediff has inferred that | 350 Ediff has inferred that |
347 %s | 351 %s |
348 %s | 352 %s |
349 are two possible targets for applying the patch. | 353 are two possible targets for applying the patch. |
359 file2 file1))) | 363 file2 file1))) |
360 (f2-exists (setcar triple file2)) | 364 (f2-exists (setcar triple file2)) |
361 (f1-exists (setcar triple file1)) | 365 (f1-exists (setcar triple file1)) |
362 (t | 366 (t |
363 (with-output-to-temp-buffer ediff-msg-buffer | 367 (with-output-to-temp-buffer ediff-msg-buffer |
368 (ediff-with-current-buffer standard-output | |
369 (fundamental-mode)) | |
364 (princ "\nEdiff has inferred that") | 370 (princ "\nEdiff has inferred that") |
365 (if (string= file1 file2) | 371 (if (string= file1 file2) |
366 (princ (format " | 372 (princ (format " |
367 %s | 373 %s |
368 is the target for this patch. However, this file does not exist." | 374 is the target for this patch. However, this file does not exist." |
480 ;; relativize names in the patch with respect to source-file | 486 ;; relativize names in the patch with respect to source-file |
481 (ediff-fixup-patch-map filename) | 487 (ediff-fixup-patch-map filename) |
482 (if (< (length ediff-patch-map) 2) | 488 (if (< (length ediff-patch-map) 2) |
483 (ediff-patch-file-internal | 489 (ediff-patch-file-internal |
484 patch-buf | 490 patch-buf |
485 (if (and (not (string-match "^/dev/null" (car (car ediff-patch-map)))) | 491 (if (and ediff-patch-map |
492 (not (string-match "^/dev/null" (car (car ediff-patch-map)))) | |
486 (> (length (car (car ediff-patch-map))) 1)) | 493 (> (length (car (car ediff-patch-map))) 1)) |
487 (car (car ediff-patch-map)) | 494 (car (car ediff-patch-map)) |
488 filename) | 495 filename) |
489 startup-hooks) | 496 startup-hooks) |
490 (ediff-multi-patch-internal patch-buf startup-hooks)) | 497 (ediff-multi-patch-internal patch-buf startup-hooks)) |
626 (or (and (ediff-patch-return-code-ok patch-return-code) | 633 (or (and (ediff-patch-return-code-ok patch-return-code) |
627 (file-exists-p | 634 (file-exists-p |
628 (concat true-source-filename ediff-backup-extension))) | 635 (concat true-source-filename ediff-backup-extension))) |
629 (progn | 636 (progn |
630 (with-output-to-temp-buffer ediff-msg-buffer | 637 (with-output-to-temp-buffer ediff-msg-buffer |
638 (ediff-with-current-buffer standard-output | |
639 (fundamental-mode)) | |
631 (princ (format | 640 (princ (format |
632 "Patch program has failed due to a bad patch file, | 641 "Patch program has failed due to a bad patch file, |
633 it couldn't apply all hunks, OR | 642 it couldn't apply all hunks, OR |
634 it couldn't create the backup for the file being patched. | 643 it couldn't create the backup for the file being patched. |
635 | 644 |
644 In particular, check the documentation for `ediff-backup-specs'. | 653 In particular, check the documentation for `ediff-backup-specs'. |
645 | 654 |
646 In any of the above cases, Ediff doesn't compare files automatically. | 655 In any of the above cases, Ediff doesn't compare files automatically. |
647 However, if the patch was applied partially and the backup file was created, | 656 However, if the patch was applied partially and the backup file was created, |
648 you can still examine the changes via M-x ediff-files" | 657 you can still examine the changes via M-x ediff-files" |
649 ediff-patch-program | 658 ediff-patch-program |
650 ediff-patch-program | 659 ediff-patch-program |
651 ediff-patch-options | 660 ediff-patch-options |
652 ediff-backup-extension | 661 ediff-backup-extension |
653 ediff-backup-specs | 662 ediff-backup-specs |
654 ))) | 663 ))) |
655 (beep 1) | 664 (beep 1) |
656 (if (setq aux-wind (get-buffer-window ediff-msg-buffer)) | 665 (if (setq aux-wind (get-buffer-window ediff-msg-buffer)) |
657 (progn | 666 (progn |
658 (select-window aux-wind) | 667 (select-window aux-wind) |
659 (goto-char (point-max)))) | 668 (goto-char (point-max)))) |