[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp-vc.el
From: |
Kai Großjohann |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp-vc.el |
Date: |
Fri, 28 Feb 2003 13:28:48 -0500 |
Index: emacs/lisp/net/tramp-vc.el
diff -c emacs/lisp/net/tramp-vc.el:1.3 emacs/lisp/net/tramp-vc.el:1.4
*** emacs/lisp/net/tramp-vc.el:1.3 Tue Feb 4 08:17:16 2003
--- emacs/lisp/net/tramp-vc.el Fri Feb 28 13:28:47 2003
***************
*** 43,49 ****
;; 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.
! ;;
;; In any case, tramp-run-real-handler now deals correctly with disabling
;; the things that should be, making this a no-op.
;;
--- 43,49 ----
;; 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.
! ;;
;; In any case, tramp-run-real-handler now deals correctly with disabling
;; the things that should be, making this a no-op.
;;
***************
*** 82,94 ****
(method (tramp-file-name-method v))
(user (tramp-file-name-user v))
(host (tramp-file-name-host v))
! (path (tramp-file-name-path v)))
(set-buffer (get-buffer-create buffer))
(set (make-local-variable 'vc-parent-buffer) camefrom)
(set (make-local-variable 'vc-parent-buffer-name)
(concat " from " (buffer-name camefrom)))
(setq default-directory olddir)
!
(erase-buffer)
(mapcar
--- 82,94 ----
(method (tramp-file-name-method v))
(user (tramp-file-name-user v))
(host (tramp-file-name-host v))
! (localname (tramp-file-name-localname v)))
(set-buffer (get-buffer-create buffer))
(set (make-local-variable 'vc-parent-buffer) camefrom)
(set (make-local-variable 'vc-parent-buffer-name)
(concat " from " (buffer-name camefrom)))
(setq default-directory olddir)
!
(erase-buffer)
(mapcar
***************
*** 99,105 ****
(setq vc-file (vc-name file)))
(setq squeezed
(append squeezed
! (list (tramp-file-name-path
(tramp-dissect-file-name vc-file))))))
(if (and file (eq last 'WORKFILE))
(progn
--- 99,105 ----
(setq vc-file (vc-name file)))
(setq squeezed
(append squeezed
! (list (tramp-file-name-localname
(tramp-dissect-file-name vc-file))))))
(if (and file (eq last 'WORKFILE))
(progn
***************
*** 172,178 ****
(method (when file (tramp-file-name-method v)))
(user (when file (tramp-file-name-user v)))
(host (when file (tramp-file-name-host v)))
! (path (when file (tramp-file-name-path v))))
(setq squeezed (delq nil (copy-sequence flags)))
(when file
(setq squeezed (append squeezed (list (file-relative-name
--- 172,178 ----
(method (when file (tramp-file-name-method v)))
(user (when file (tramp-file-name-user v)))
(host (when file (tramp-file-name-host v)))
! (localname (when file (tramp-file-name-localname v))))
(setq squeezed (delq nil (copy-sequence flags)))
(when file
(setq squeezed (append squeezed (list (file-relative-name
***************
*** 194,200 ****
(message "Running %s...OK" command))
(vc-exec-after
`(run-hook-with-args
! 'vc-post-command-functions ',command ',path ',flags))
status))))
--- 194,200 ----
(message "Running %s...OK" command))
(vc-exec-after
`(run-hook-with-args
! 'vc-post-command-functions ',command ',localname ',flags))
status))))
***************
*** 216,222 ****
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p
(buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-do-command-new buffer okstatus command
file ;(or file (buffer-file-name))
flags))
ad-do-it)))
--- 216,222 ----
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p
(buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-do-command-new buffer okstatus command
file ;(or file (buffer-file-name))
flags))
ad-do-it)))
***************
*** 229,235 ****
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p
(buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-do-command buffer okstatus command
(or file (buffer-file-name)) last flags))
ad-do-it))))
;;-)
--- 229,235 ----
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p
(buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-do-command buffer okstatus command
(or file (buffer-file-name)) last flags))
ad-do-it))))
;;-)
***************
*** 251,257 ****
(method (tramp-file-name-method v))
(user (tramp-file-name-user v))
(host (tramp-file-name-host v))
! (path (tramp-file-name-path v)))
(save-excursion (set-buffer (get-buffer-create "*vc-info*"))
(erase-buffer))
(let ((exec-path (append vc-path exec-path)) exec-status
--- 251,257 ----
(method (tramp-file-name-method v))
(user (tramp-file-name-user v))
(host (tramp-file-name-host v))
! (localname (tramp-file-name-localname v)))
(save-excursion (set-buffer (get-buffer-create "*vc-info*"))
(erase-buffer))
(let ((exec-path (append vc-path exec-path)) exec-status
***************
*** 275,281 ****
;; Actually execute remote command
(tramp-handle-shell-command
(mapconcat 'tramp-shell-quote-argument
! (append (list command) args (list path)) " ")
(get-buffer-create"*vc-info*"))
;(tramp-wait-for-output)
;; Get status from command
--- 275,281 ----
;; Actually execute remote command
(tramp-handle-shell-command
(mapconcat 'tramp-shell-quote-argument
! (append (list command) args (list localname)) " ")
(get-buffer-create"*vc-info*"))
;(tramp-wait-for-output)
;; Get status from command
***************
*** 283,289 ****
(tramp-wait-for-output)
(setq exec-status (read (current-buffer)))
(message "Command %s returned status %d." command exec-status)))
!
;; Maybe okstatus can be `async' here. But then, maybe the
;; async thing is new in Emacs 21, but this function is only
;; used in Emacs 20.
--- 283,289 ----
(tramp-wait-for-output)
(setq exec-status (read (current-buffer)))
(message "Command %s returned status %d." command exec-status)))
!
;; Maybe okstatus can be `async' here. But then, maybe the
;; async thing is new in Emacs 21, but this function is only
;; used in Emacs 20.
***************
*** 304,310 ****
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-simple-command okstatus command
(or file (buffer-file-name)) args))
ad-do-it)))
--- 304,310 ----
(if (or (and (stringp file) (tramp-tramp-file-p file))
(and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
(setq ad-return-value
! (apply 'tramp-vc-simple-command okstatus command
(or file (buffer-file-name)) args))
ad-do-it)))
***************
*** 362,378 ****
;; Do we need to advise the vc-user-login-name function anyway?
! ;; This will return the correct login name for the owner of a
;; file. It does not deal with the default remote user name...
;;
! ;; That is, when vc calls (vc-user-login-name), we return the
;; local login name, something that may be different to the remote
! ;; default.
;;
;; The remote VC operations will occur as the user that we logged
;; in with however - not always the same as the local user.
;;
! ;; In the end, I did advise the function. This is because, well,
;; the thing didn't work right otherwise ;)
;;
;; Daniel Pittman <address@hidden>
--- 362,378 ----
;; Do we need to advise the vc-user-login-name function anyway?
! ;; This will return the correct login name for the owner of a
;; file. It does not deal with the default remote user name...
;;
! ;; That is, when vc calls (vc-user-login-name), we return the
;; local login name, something that may be different to the remote
! ;; default.
;;
;; The remote VC operations will occur as the user that we logged
;; in with however - not always the same as the local user.
;;
! ;; In the end, I did advise the function. This is because, well,
;; the thing didn't work right otherwise ;)
;;
;; Daniel Pittman <address@hidden>
***************
*** 417,427 ****
(tramp-handle-vc-user-login-name uid)))) ; get the owner
name
ad-do-it))) ; else call the original
!
;; Determine the name of the user owning a file.
(defun tramp-file-owner (filename)
"Return who owns FILE (user name, as a string)."
! (let ((v (tramp-dissect-file-name
(tramp-handle-expand-file-name filename))))
(if (not (tramp-handle-file-exists-p filename))
nil ; file cannot be opened
--- 417,427 ----
(tramp-handle-vc-user-login-name uid)))) ; get the owner
name
ad-do-it))) ; else call the original
!
;; Determine the name of the user owning a file.
(defun tramp-file-owner (filename)
"Return who owns FILE (user name, as a string)."
! (let ((v (tramp-dissect-file-name
(tramp-handle-expand-file-name filename))))
(if (not (tramp-handle-file-exists-p filename))
nil ; file cannot be opened
***************
*** 435,441 ****
(tramp-file-name-method v)
(tramp-file-name-user v)
(tramp-file-name-host v))
! (tramp-shell-quote-argument (tramp-file-name-path v))))
(tramp-wait-for-output)
;; parse `ls -l' output ...
;; ... file mode flags
--- 435,441 ----
(tramp-file-name-method v)
(tramp-file-name-user v)
(tramp-file-name-host v))
! (tramp-shell-quote-argument (tramp-file-name-localname v))))
(tramp-wait-for-output)
;; parse `ls -l' output ...
;; ... file mode flags