comparison lisp/net/tramp-vc.el @ 48973:09acf3f65bb5

* net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes. * net/tramp-ftp.el: Glue code with Ange-FTP, broken out of tramp.el. From Michael Albinus. * net/tramp-smb.el: New file for using smbclient to access Windows shares with Tramp. From Michael Albinus.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Thu, 26 Dec 2002 20:47:51 +0000
parents 7b663a89ef2a
children 0d8b17d428b5
comparison
equal deleted inserted replaced
48972:2d4e1ccc9f01 48973:09acf3f65bb5
134 (setq status (read (current-buffer))) 134 (setq status (read (current-buffer)))
135 (message "Command %s returned status %d." command status))) 135 (message "Command %s returned status %d." command status)))
136 (goto-char (point-max)) 136 (goto-char (point-max))
137 (set-buffer-modified-p nil) 137 (set-buffer-modified-p nil)
138 (forward-line -1) 138 (forward-line -1)
139 (if (or (not (integerp status)) (and okstatus (< okstatus status))) 139 (if (or (not (integerp status))
140 (and (integerp okstatus) (< okstatus status)))
140 (progn 141 (progn
141 (pop-to-buffer buffer) 142 (pop-to-buffer buffer)
142 (goto-char (point-min)) 143 (goto-char (point-min))
143 (shrink-window-if-larger-than-buffer) 144 (shrink-window-if-larger-than-buffer)
144 (error "Running `%s'...FAILED (%s)" command 145 (error "Running `%s'...FAILED (%s)" command
172 (user (when file (tramp-file-name-user v))) 173 (user (when file (tramp-file-name-user v)))
173 (host (when file (tramp-file-name-host v))) 174 (host (when file (tramp-file-name-host v)))
174 (path (when file (tramp-file-name-path v)))) 175 (path (when file (tramp-file-name-path v))))
175 (setq squeezed (delq nil (copy-sequence flags))) 176 (setq squeezed (delq nil (copy-sequence flags)))
176 (when file 177 (when file
177 (setq squeezed (append squeezed (list path)))) 178 (setq squeezed (append squeezed (list (file-relative-name
179 file default-directory)))))
178 (let ((w32-quote-process-args t)) 180 (let ((w32-quote-process-args t))
179 (when (eq okstatus 'async) 181 (when (eq okstatus 'async)
180 (message "Tramp doesn't do async commands, running synchronously.")) 182 (message "Tramp doesn't do async commands, running synchronously."))
181 (setq status (tramp-handle-shell-command 183 (setq status (tramp-handle-shell-command
182 (mapconcat 'tramp-shell-quote-argument 184 (mapconcat 'tramp-shell-quote-argument
183 (cons command squeezed) " ") t)) 185 (cons command squeezed) " ") t))
184 (when (or (not (integerp status)) (and okstatus (< okstatus status))) 186 (when (or (not (integerp status))
187 (and (integerp okstatus) (< okstatus status)))
185 (pop-to-buffer (current-buffer)) 188 (pop-to-buffer (current-buffer))
186 (goto-char (point-min)) 189 (goto-char (point-min))
187 (shrink-window-if-larger-than-buffer) 190 (shrink-window-if-larger-than-buffer)
188 (error "Running %s...FAILED (%s)" command 191 (error "Running %s...FAILED (%s)" command
189 (if (integerp status) (format "status %d" status) status)))) 192 (if (integerp status) (format "status %d" status) status))))
279 (tramp-send-command multi-method method user host "echo $?") 282 (tramp-send-command multi-method method user host "echo $?")
280 (tramp-wait-for-output) 283 (tramp-wait-for-output)
281 (setq exec-status (read (current-buffer))) 284 (setq exec-status (read (current-buffer)))
282 (message "Command %s returned status %d." command exec-status))) 285 (message "Command %s returned status %d." command exec-status)))
283 286
287 ;; Maybe okstatus can be `async' here. But then, maybe the
288 ;; async thing is new in Emacs 21, but this function is only
289 ;; used in Emacs 20.
284 (cond ((> exec-status okstatus) 290 (cond ((> exec-status okstatus)
285 (switch-to-buffer (get-file-buffer file)) 291 (switch-to-buffer (get-file-buffer file))
286 (shrink-window-if-larger-than-buffer 292 (shrink-window-if-larger-than-buffer
287 (display-buffer "*vc-info*")) 293 (display-buffer "*vc-info*"))
288 (error "Couldn't find version control information"))) 294 (error "Couldn't find version control information")))