[Top][All Lists]

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

Re: Patch: makes tramp-vc.el work w/ CVS servers that reject absolute pa

From: Francis Litterio
Subject: Re: Patch: makes tramp-vc.el work w/ CVS servers that reject absolute pathnames
Date: Mon, 02 Dec 2002 11:48:58 -0500
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

Kai Gro├čjohann wrote:

> With your patch, things rely on the current working directory being
> the same directory as the filename given.
> How about changing (file-name-nondirectory path) to something which
> gives the path relative to the current directory?  Maybe
> (file-relative-name file default-directory)?
> I used file instead of path as the first arg for file-relative-name
> because default-directory also includes the user/host prefix stuff.
> What do you think?

Sounds good.  So my patch changes to the one shown below, correct?  I've
switched to this version of the patch, and it seems to work.
Francis Litterio
GPG and PGP public keys available on keyservers.

--- tramp-vc.el 17 Jun 2002 10:57:20 -0000      2.2
+++ tramp-vc.el 27 Nov 2002 18:04:15 -0000
@@ -40,6 +40,14 @@
 ;; -- vc --
+(defcustom tramp-vc-use-relative-pathnames nil
+  "*If non-nil, supply a relative pathname to the version control backend
+command, otherwise supply an absolute pathname.  Use this if your version
+control system doesn't accept absolute pathnames."
+  :group 'tramp
+  :type 'boolean)
 ;; This used to blow away the file-name-handler-alist and reinstall
 ;; TRAMP into it. This was intended to let VC work remotely. It didn't,
 ;; at least not in my XEmacs 21.2 install.
@@ -174,7 +182,10 @@
              (path (when file (tramp-file-name-path v))))
       (setq squeezed (delq nil (copy-sequence flags)))
       (when file
-       (setq squeezed (append squeezed (list path))))
+       (setq squeezed (append squeezed (list
+                                        (if tramp-vc-use-relative-pathnames
+                                            (file-relative-name file 
+                                          path)))))
       (let ((w32-quote-process-args t))
         (when (eq okstatus 'async)
           (message "Tramp doesn't do async commands, running synchronously."))

reply via email to

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