[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: makes tramp-vc.el work w/ CVS servers that reject absolute pathna
From: |
Francis Litterio |
Subject: |
Patch: makes tramp-vc.el work w/ CVS servers that reject absolute pathnames |
Date: |
Wed, 27 Nov 2002 12:59:45 -0500 |
I was using TRAMP to access a remote file that was under CVS and kept
getting errors from CVS of the form:
absolute pathname `/lhome/litterio/src/foo/bar' illegal for server
The problem is that my company's CVS server (over which I have no
control), doesn't accept absolute pathnames. For example:
bash$ cvs log /lhome/litterio/src/Makefile
absolute pathname `/lhome/litterio/src/Makefile' illegal for server
But it's fine with relative pathname, so I made the below change to cope
with this. Since this is a fairly significant change, I protected with
with a configuration variable (tramp-vc-use-relative-pathnames) that
defaults to the original behavior. So far, all CVS-in-Emacs-over-TRAMP
activity has been working OK for me (e.g., commit, log, diff, etc.).
What do you think?
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
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-name-nondirectory path)
+ path)))))
(let ((w32-quote-process-args t))
(when (eq okstatus 'async)
(message "Tramp doesn't do async commands, running synchronously."))
- Patch: makes tramp-vc.el work w/ CVS servers that reject absolute pathnames,
Francis Litterio <=