all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#37777: Allow vc-sccs-diff to work with TRAMP
@ 2019-10-16 17:59 Peter Oliver
  2019-10-17  2:43 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Oliver @ 2019-10-16 17:59 UTC (permalink / raw
  To: 37777

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

At present vc-sccs-diff doesn’t work with TRAMP, because it tries to run a remote diff process against a local temporary file.  The attached patch fixes this.

-- 
Peter Oliver

[-- Attachment #2: Type: text/plain, Size: 1261 bytes --]

From 6d06a53ec3cf363eda487be6c74519c029f62bf7 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Wed, 16 Oct 2019 18:58:11 +0100
Subject: [PATCH] Allow vc-sccs-diff to work with TRAMP

If the diff command is to be run remotely, then the temporary files it's acting on must be remote too.
---
 lisp/vc/vc-sccs.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 805e738f7a..b59d8178fe 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -347,7 +347,7 @@ Remaining arguments are ignored."
       (message "Running %s in foreground..." fake-command))
     (if oldproc (delete-process oldproc))
     (dolist (file files)
-      (let ((oldfile (make-temp-file "vc-sccs"))
+      (let ((oldfile (make-nearby-temp-file "vc-sccs"))
 	    newfile)
 	(unwind-protect
 	    (progn
@@ -364,7 +364,7 @@ Remaining arguments are ignored."
 		     (this-status
 		      (apply 'process-file "diff" nil t nil
 			     (append (vc-switches 'SCCS 'diff)
-				     (list oldfile
+				     (list (file-local-name oldfile)
 					   (or newfile
 					       (file-relative-name file)))))))
 		(or (integerp this-status) (setq status 'error))
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#37777: Allow vc-sccs-diff to work with TRAMP
  2019-10-16 17:59 bug#37777: Allow vc-sccs-diff to work with TRAMP Peter Oliver
@ 2019-10-17  2:43 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-17  2:43 UTC (permalink / raw
  To: Peter Oliver; +Cc: 37777

Peter Oliver <p.d.oliver@mavit.org.uk> writes:

> At present vc-sccs-diff doesn’t work with TRAMP, because it tries to
> run a remote diff process against a local temporary file.  The
> attached patch fixes this.

Thanks; applied to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 17:59 bug#37777: Allow vc-sccs-diff to work with TRAMP Peter Oliver
2019-10-17  2:43 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.