aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2012-07-16 12:19:56 +0200
committerMichael Albinus2012-07-16 12:19:56 +0200
commit01795a1bcf1ff334e4865d50e4dc3aea8c6b6b6e (patch)
treed4e20fe03cbfa40755f3a27927d1f2f707b41ddb
parent6a0dd1d7e075ccb23ed08afafe9b251eacd931bd (diff)
downloademacs-01795a1bcf1ff334e4865d50e4dc3aea8c6b6b6e.tar.gz
emacs-01795a1bcf1ff334e4865d50e4dc3aea8c6b6b6e.zip
* vc/ediff.el (ediff-directories): Add trailing space to prompts.
* vc/ediff-diff.el (ediff-same-file-contents): Handle the case, when F1 and F2 are located on different hosts.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc/ediff-diff.el33
-rw-r--r--lisp/vc/ediff.el12
3 files changed, 34 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7bb09181b96..929c810ed71 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12012-07-16 Michael Albinus <michael.albinus@gmx.de>
2
3 * vc/ediff.el (ediff-directories): Add trailing space to prompts.
4
5 * vc/ediff-diff.el (ediff-same-file-contents): Handle the case,
6 when F1 and F2 are located on different hosts.
7
12012-07-14 Chong Yidong <cyd@gnu.org> 82012-07-14 Chong Yidong <cyd@gnu.org>
2 9
3 * xt-mouse.el: Implement extended mouse coordinates (Bug#10642). 10 * xt-mouse.el: Implement extended mouse coordinates (Bug#10642).
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index 31a5436acd9..5b31e625a00 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -1406,18 +1406,27 @@ arguments to `skip-chars-forward'."
1406 "Return t if files F1 and F2 have identical contents." 1406 "Return t if files F1 and F2 have identical contents."
1407 (if (and (not (file-directory-p f1)) 1407 (if (and (not (file-directory-p f1))
1408 (not (file-directory-p f2))) 1408 (not (file-directory-p f2)))
1409 (let ((res 1409 (if (equal (file-remote-p f1) (file-remote-p f2))
1410 ;; In the remote case, this works only if F1 and F2 are 1410 (let ((res
1411 ;; located on the same remote host. 1411 ;; In the remote case, this works only if F1 and F2 are
1412 (apply 'process-file ediff-cmp-program nil nil nil 1412 ;; located on the same remote host.
1413 (append ediff-cmp-options 1413 (apply 'process-file ediff-cmp-program nil nil nil
1414 (list (or (file-remote-p f1 'localname) 1414 (append ediff-cmp-options
1415 (expand-file-name f1)) 1415 (list (or (file-remote-p f1 'localname)
1416 (or (file-remote-p f2 'localname) 1416 (expand-file-name f1))
1417 (expand-file-name f2))))) 1417 (or (file-remote-p f2 'localname)
1418 )) 1418 (expand-file-name f2)))))
1419 (and (numberp res) (eq res 0))) 1419 ))
1420 )) 1420 (and (numberp res) (eq res 0)))
1421
1422 ;; F1 and F2 are not located on the same host.
1423 (let ((t1 (file-local-copy f1))
1424 (t2 (file-local-copy f2)))
1425 (unwind-protect
1426 (ediff-same-file-contents (or t1 f1) (or t2 f2))
1427 (and t1 (delete-file t1))
1428 (and t2 (delete-file t2))))
1429 )))
1421 1430
1422 1431
1423(defun ediff-same-contents (d1 d2 &optional filter-re) 1432(defun ediff-same-contents (d1 d2 &optional filter-re)
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index a1f3b72942f..9a20afd90cb 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -491,12 +491,12 @@ If this file is a backup, `ediff' it with its original."
491 (setq buf-B-file-name (file-name-nondirectory buf-B-file-name))) 491 (setq buf-B-file-name (file-name-nondirectory buf-B-file-name)))
492 (if (stringp buf-C-file-name) 492 (if (stringp buf-C-file-name)
493 (setq buf-C-file-name (file-name-nondirectory buf-C-file-name))) 493 (setq buf-C-file-name (file-name-nondirectory buf-C-file-name)))
494 494
495 (setq file-A (ediff-make-temp-file buf-A buf-A-file-name) 495 (setq file-A (ediff-make-temp-file buf-A buf-A-file-name)
496 file-B (ediff-make-temp-file buf-B buf-B-file-name)) 496 file-B (ediff-make-temp-file buf-B buf-B-file-name))
497 (if buf-C-is-alive 497 (if buf-C-is-alive
498 (setq file-C (ediff-make-temp-file buf-C buf-C-file-name))) 498 (setq file-C (ediff-make-temp-file buf-C buf-C-file-name)))
499 499
500 (ediff-setup (get-buffer buf-A) file-A 500 (ediff-setup (get-buffer buf-A) file-A
501 (get-buffer buf-B) file-B 501 (get-buffer buf-B) file-B
502 (if buf-C-is-alive (get-buffer buf-C)) 502 (if buf-C-is-alive (get-buffer buf-C))
@@ -542,8 +542,8 @@ expression; only file names that match the regexp are considered."
542 (default-regexp (eval ediff-default-filtering-regexp)) 542 (default-regexp (eval ediff-default-filtering-regexp))
543 f) 543 f)
544 (list (setq f (read-directory-name 544 (list (setq f (read-directory-name
545 "Directory A to compare:" dir-A nil 'must-match)) 545 "Directory A to compare: " dir-A nil 'must-match))
546 (read-directory-name "Directory B to compare:" 546 (read-directory-name "Directory B to compare: "
547 (if ediff-use-last-dir 547 (if ediff-use-last-dir
548 ediff-last-dir-B 548 ediff-last-dir-B
549 (ediff-strip-last-dir f)) 549 (ediff-strip-last-dir f))
@@ -1072,7 +1072,7 @@ lines. For small regions, use `ediff-regions-wordwise'."
1072 (ediff-with-current-buffer buffer-B 1072 (ediff-with-current-buffer buffer-B
1073 (setq beg-B (move-marker (make-marker) beg-B) 1073 (setq beg-B (move-marker (make-marker) beg-B)
1074 end-B (move-marker (make-marker) end-B))) 1074 end-B (move-marker (make-marker) end-B)))
1075 1075
1076 ;; make file-A 1076 ;; make file-A
1077 (if word-mode 1077 (if word-mode
1078 (ediff-wordify beg-A end-A buffer-A tmp-buffer) 1078 (ediff-wordify beg-A end-A buffer-A tmp-buffer)
@@ -1084,7 +1084,7 @@ lines. For small regions, use `ediff-regions-wordwise'."
1084 (ediff-wordify beg-B end-B buffer-B tmp-buffer) 1084 (ediff-wordify beg-B end-B buffer-B tmp-buffer)
1085 (ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer)) 1085 (ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer))
1086 (setq file-B (ediff-make-temp-file tmp-buffer "regB")) 1086 (setq file-B (ediff-make-temp-file tmp-buffer "regB"))
1087 1087
1088 (setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A)) 1088 (setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A))
1089 (setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B)) 1089 (setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B))
1090 (ediff-setup buffer-A file-A 1090 (ediff-setup buffer-A file-A