* vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 3 Jul 2012 07:42:31 +0000 (09:42 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 3 Jul 2012 07:42:31 +0000 (09:42 +0200)
files on the same host.

lisp/ChangeLog
lisp/vc/ediff-diff.el

index 6a9e648..ff526af 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-03  Michael Albinus  <michael.albinus@gmx.de>
+
+       * vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote
+       files on the same host.
+
 2012-07-03  Andreas Schwab  <schwab@linux-m68k.org>
 
        * help-fns.el (describe-function-1): Only call
index 6d67356..31a5436 100644 (file)
@@ -1407,9 +1407,14 @@ arguments to `skip-chars-forward'."
   (if (and (not (file-directory-p f1))
            (not (file-directory-p f2)))
       (let ((res
-            (apply 'call-process ediff-cmp-program nil nil nil
-                   (append ediff-cmp-options (list (expand-file-name f1)
-                                                   (expand-file-name f2))))
+            ;; 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)))
     ))