]> git.eshelyaron.com Git - emacs.git/commitdiff
Version 2.0.11 released.
authorKai Großjohann <kgrossjo@eu.uu.net>
Mon, 5 Aug 2002 14:58:21 +0000 (14:58 +0000)
committerKai Großjohann <kgrossjo@eu.uu.net>
Mon, 5 Aug 2002 14:58:21 +0000 (14:58 +0000)
(tramp-perl-file-attributes): Print uid and gid as signed
integers.
(tramp-invoke-ange-ftp): Correct check for Ange-FTP being loaded.
Invoke Ange-FTP with tramp-run-real-handler to avoid Ange-FTP
calling Tramp again.
(tramp-find-file-exists-command): Check for `ls -d' last, after
all the variants on `test -e'.
(tramp-post-connection): Erase buffer before finding a command to
check if file exists.

lisp/ChangeLog
lisp/net/tramp.el

index 07c84bea43606c1f7caab45b8b07437dc70a1298..5e66842fa6e173433e4af3fdf269a9aac0f40f9f 100644 (file)
@@ -1,3 +1,16 @@
+2002-08-05  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+       * net/tramp.el: Version 2.0.11 released.
+       (tramp-perl-file-attributes): Print uid and gid as signed
+       integers.
+       (tramp-invoke-ange-ftp): Correct check for Ange-FTP being loaded.
+       Invoke Ange-FTP with tramp-run-real-handler to avoid Ange-FTP
+       calling Tramp again.
+       (tramp-find-file-exists-command): Check for `ls -d' last, after
+       all the variants on `test -e'.
+       (tramp-post-connection): Erase buffer before finding a command to
+       check if file exists.
+
 2002-08-05  David Kastrup  <David.Kastrup@t-online.de>
 
        * calc/calc.el (math-format-stack-value): Revert a broken
index d9ecc6ec4b85eed85d5ec19d8123a8c005790c28..18c5e82a68b30184c168506e8ea06bdf6e65a7f5 100644 (file)
@@ -72,7 +72,7 @@
 ;; In the Tramp CVS repository, the version numer is auto-frobbed from
 ;; the Makefile, so you should edit the top-level Makefile to change
 ;; the version number.
-(defconst tramp-version "2.0.10"
+(defconst tramp-version "2.0.11"
   "This version of tramp.")
 
 (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
@@ -1216,17 +1216,16 @@ some systems don't, and for them we have this shell function.")
 ;; output.  If you are hacking on this, note that you get *no* output
 ;; unless this spits out a complete line, including the '\n' at the
 ;; end.
-(defconst tramp-perl-file-attributes (concat
- "$f = $ARGV[0];
+(defconst tramp-perl-file-attributes "\
+$f = $ARGV[0];
 @s = lstat($f);
 if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
 elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; }
 else { $l = \"nil\" };
-printf(\"(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\\n\",
+printf(\"(%s %u %d %d (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\\n\",
 $l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
 $s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
 $s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 0xffff);"
- )
   "Perl script to produce output suitable for use with `file-attributes'
 on the remote file system.")
 
@@ -3189,14 +3188,15 @@ necessary anymore."
 
 (defun tramp-invoke-ange-ftp (operation &rest args)
   "Invoke the Ange-FTP handler function and throw."
-  (or ange-ftp-name-format (require 'ange-ftp))
+  (or (boundp 'ange-ftp-name-format) (require 'ange-ftp))
   (let ((ange-ftp-name-format
         (list (nth 0 tramp-file-name-structure)
               (nth 3 tramp-file-name-structure)
               (nth 2 tramp-file-name-structure)
               (nth 4 tramp-file-name-structure))))
     (throw 'tramp-forward-to-ange-ftp
-          (apply 'ange-ftp-hook-function operation args))))
+          (tramp-run-real-handler 'ange-ftp-hook-function
+                                  (cons operation args)))))
 
 (defun tramp-ange-ftp-file-name-p (multi-method method)
   "Check if it's a filename that should be forwarded to Ange-FTP."
@@ -3470,9 +3470,6 @@ file exists and nonzero exit status otherwise."
     ;;                  `/usr/bin/test'.
     ;; `/usr/bin/test -e'       In case `/bin/test' does not exist.
     (unless (or
-             (and (setq tramp-file-exists-command "ls -d %s")
-                  (tramp-handle-file-exists-p existing)
-                  (not (tramp-handle-file-exists-p nonexisting)))
              (and (setq tramp-file-exists-command "test -e %s")
                   (tramp-handle-file-exists-p existing)
                   (not (tramp-handle-file-exists-p nonexisting)))
@@ -3480,6 +3477,9 @@ file exists and nonzero exit status otherwise."
                   (tramp-handle-file-exists-p existing)
                   (not (tramp-handle-file-exists-p nonexisting)))
              (and (setq tramp-file-exists-command "/usr/bin/test -e %s")
+                  (tramp-handle-file-exists-p existing)
+                  (not (tramp-handle-file-exists-p nonexisting)))
+             (and (setq tramp-file-exists-command "ls -d %s")
                   (tramp-handle-file-exists-p existing)
                   (not (tramp-handle-file-exists-p nonexisting))))
       (error "Couldn't find command to check if file exists."))))
@@ -4456,6 +4456,7 @@ locale to C and sets up the remote shell search path."
   ;;
   ;; Daniel Pittman <daniel@danann.net>
   (sleep-for 1)
+  (erase-buffer)
   (tramp-find-file-exists-command multi-method method user host)
   (make-local-variable 'tramp-ls-command)
   (setq tramp-ls-command (tramp-find-ls-command multi-method method user host))