emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109102: * vc/ediff.el (ediff-directo


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109102: * vc/ediff.el (ediff-directories): Add trailing space to prompts.
Date: Mon, 16 Jul 2012 12:19:56 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109102
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2012-07-16 12:19:56 +0200
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/vc/ediff-diff.el
  lisp/vc/ediff.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-14 15:40:12 +0000
+++ b/lisp/ChangeLog    2012-07-16 10:19:56 +0000
@@ -1,3 +1,10 @@
+2012-07-16  Michael Albinus  <address@hidden>
+
+       * 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.
+
 2012-07-14  Chong Yidong  <address@hidden>
 
        * xt-mouse.el: Implement extended mouse coordinates (Bug#10642).

=== modified file 'lisp/vc/ediff-diff.el'
--- a/lisp/vc/ediff-diff.el     2012-07-03 07:42:31 +0000
+++ b/lisp/vc/ediff-diff.el     2012-07-16 10:19:56 +0000
@@ -1406,18 +1406,27 @@
   "Return t if files F1 and F2 have identical contents."
   (if (and (not (file-directory-p f1))
            (not (file-directory-p f2)))
-      (let ((res
-            ;; In the remote case, this works only if F1 and F2 are
-            ;; located on the same remote host.
-            (apply 'process-file ediff-cmp-program nil nil nil
-                   (append ediff-cmp-options
-                           (list (or (file-remote-p f1 'localname)
-                                     (expand-file-name f1))
-                                 (or (file-remote-p f2 'localname)
-                                     (expand-file-name f2)))))
-            ))
-       (and (numberp res) (eq res 0)))
-    ))
+      (if (equal (file-remote-p f1) (file-remote-p f2))
+         (let ((res
+                ;; In the remote case, this works only if F1 and F2 are
+                ;; located on the same remote host.
+                (apply 'process-file ediff-cmp-program nil nil nil
+                       (append ediff-cmp-options
+                               (list (or (file-remote-p f1 'localname)
+                                         (expand-file-name f1))
+                                     (or (file-remote-p f2 'localname)
+                                         (expand-file-name f2)))))
+                ))
+           (and (numberp res) (eq res 0)))
+
+       ;; F1 and F2 are not located on the same host.
+       (let ((t1 (file-local-copy f1))
+             (t2 (file-local-copy f2)))
+         (unwind-protect
+             (ediff-same-file-contents (or t1 f1) (or t2 f2))
+           (and t1 (delete-file t1))
+           (and t2 (delete-file t2))))
+    )))
 
 
 (defun ediff-same-contents (d1 d2 &optional filter-re)

=== modified file 'lisp/vc/ediff.el'
--- a/lisp/vc/ediff.el  2012-07-13 07:06:09 +0000
+++ b/lisp/vc/ediff.el  2012-07-16 10:19:56 +0000
@@ -491,12 +491,12 @@
              (setq buf-B-file-name (file-name-nondirectory buf-B-file-name)))
          (if (stringp buf-C-file-name)
              (setq buf-C-file-name (file-name-nondirectory buf-C-file-name)))
-         
+
          (setq file-A (ediff-make-temp-file buf-A buf-A-file-name)
                file-B (ediff-make-temp-file buf-B buf-B-file-name))
          (if buf-C-is-alive
              (setq file-C (ediff-make-temp-file buf-C buf-C-file-name)))
-         
+
          (ediff-setup (get-buffer buf-A) file-A
                       (get-buffer buf-B) file-B
                       (if buf-C-is-alive (get-buffer buf-C))
@@ -542,8 +542,8 @@
         (default-regexp (eval ediff-default-filtering-regexp))
         f)
      (list (setq f (read-directory-name
-                   "Directory A to compare:" dir-A nil 'must-match))
-          (read-directory-name "Directory B to compare:"
+                   "Directory A to compare: " dir-A nil 'must-match))
+          (read-directory-name "Directory B to compare: "
                           (if ediff-use-last-dir
                               ediff-last-dir-B
                             (ediff-strip-last-dir f))
@@ -1072,7 +1072,7 @@
          (ediff-with-current-buffer buffer-B
            (setq beg-B (move-marker (make-marker) beg-B)
                  end-B (move-marker (make-marker) end-B)))
-         
+
          ;; make file-A
          (if word-mode
              (ediff-wordify beg-A end-A buffer-A tmp-buffer)
@@ -1084,7 +1084,7 @@
              (ediff-wordify beg-B end-B buffer-B tmp-buffer)
            (ediff-copy-to-buffer beg-B end-B buffer-B tmp-buffer))
          (setq file-B (ediff-make-temp-file tmp-buffer "regB"))
-         
+
          (setq overl-A (ediff-make-bullet-proof-overlay beg-A end-A buffer-A))
          (setq overl-B (ediff-make-bullet-proof-overlay beg-B end-B buffer-B))
          (ediff-setup buffer-A file-A


reply via email to

[Prev in Thread] Current Thread [Next in Thread]