emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108877: Sync with Tramp 2.2.6-pre.


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108877: Sync with Tramp 2.2.6-pre.
Date: Thu, 05 Jul 2012 08:57:57 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108877
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2012-07-05 08:57:57 +0200
message:
  Sync with Tramp 2.2.6-pre.
  
  * net/tramp.el (tramp-drop-volume-letter): Provide an XEmacs
  compatible declaration.
  
  * net/tramp-cmds.el (tramp-append-tramp-buffers): Protect
  `list-load-path-shadows' call.
  
  * net/tramp-compat.el (top): Require packages, which aren't
  autoloaded anymore for XEmacs.  Protect call of
  `tramp-file-name-handler' by `tramp-compat-funcall', pacifying the
  compiler.  Do not require tramp-util.el and tramp-vc.el anymore,
  it hurts at least for SXEmacs.
  (tramp-compat-temporary-file-directory): In XEmacs, there is no
  standard-value for `temporary-file-directory'.
  
  * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
  Redirect stderr to /dev/null.
  (tramp-sh-handle-write-region): uid and gid can be floats.
  Reported by Russell Sim <address@hidden>.
  (tramp-sh-handle-vc-registered): Hide errors.
  (tramp-vc-file-name-handler): Use dummy results for `process-file'
  and `start-file-process'.
  (tramp-maybe-open-connection): Check also whether `non-essential'
  is bound.
modified:
  lisp/ChangeLog
  lisp/net/tramp-cmds.el
  lisp/net/tramp-compat.el
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-04 16:32:54 +0000
+++ b/lisp/ChangeLog    2012-07-05 06:57:57 +0000
@@ -1,3 +1,31 @@
+2012-07-05  Michael Albinus  <address@hidden>
+
+       Sync with Tramp 2.2.6-pre.
+
+       * net/tramp.el (tramp-drop-volume-letter): Provide an XEmacs
+       compatible declaration.
+
+       * net/tramp-cmds.el (tramp-append-tramp-buffers): Protect
+       `list-load-path-shadows' call.
+
+       * net/tramp-compat.el (top): Require packages, which aren't
+       autoloaded anymore for XEmacs.  Protect call of
+       `tramp-file-name-handler' by `tramp-compat-funcall', pacifying the
+       compiler.  Do not require tramp-util.el and tramp-vc.el anymore,
+       it hurts at least for SXEmacs.
+       (tramp-compat-temporary-file-directory): In XEmacs, there is no
+       standard-value for `temporary-file-directory'.
+
+       * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
+       Redirect stderr to /dev/null.
+       (tramp-sh-handle-write-region): uid and gid can be floats.
+       Reported by Russell Sim <address@hidden>.
+       (tramp-sh-handle-vc-registered): Hide errors.
+       (tramp-vc-file-name-handler): Use dummy results for `process-file'
+       and `start-file-process'.
+       (tramp-maybe-open-connection): Check also whether `non-essential'
+       is bound.
+
 2012-07-04  Chong Yidong  <address@hidden>
 
        * xml.el (xml--parse-buffer): Use xml-syntax-table.

=== modified file 'lisp/net/tramp-cmds.el'
--- a/lisp/net/tramp-cmds.el    2012-06-11 10:30:07 +0000
+++ b/lisp/net/tramp-cmds.el    2012-07-05 06:57:57 +0000
@@ -295,8 +295,9 @@
   ;; Dump load-path shadows.
   (insert "\nload-path shadows:\n==================\n")
   (ignore-errors
-    (mapc (lambda (x) (when (string-match "tramp" x) (insert x "\n")))
-         (split-string (list-load-path-shadows t) "\n")))
+    (mapc
+     (lambda (x) (when (string-match "tramp" x) (insert x "\n")))
+     (split-string (tramp-compat-funcall 'list-load-path-shadows t) "\n")))
 
   ;; Append buffers only when we are in message mode.
   (when (and

=== modified file 'lisp/net/tramp-compat.el'
--- a/lisp/net/tramp-compat.el  2012-06-11 10:30:07 +0000
+++ b/lisp/net/tramp-compat.el  2012-07-05 06:57:57 +0000
@@ -29,8 +29,6 @@
 
 ;;; Code:
 
-(require 'tramp-loaddefs)
-
 (eval-when-compile
 
   ;; Pacify byte-compiler.
@@ -38,11 +36,24 @@
 
 (eval-and-compile
 
+  ;; Some packages must be required for XEmacs, because we compile
+  ;; with -no-autoloads.
+  (when (featurep 'xemacs)
+    (require 'cus-edit)
+    (require 'env)
+    (require 'executable)
+    (require 'outline)
+    (require 'passwd)
+    (require 'pp)
+    (require 'regexp-opt))
+
   (require 'advice)
   (require 'custom)
   (require 'format-spec)
   (require 'shell)
 
+  (require 'tramp-loaddefs)
+
   ;; As long as password.el is not part of (X)Emacs, it shouldn't be
   ;; mandatory.
   (if (featurep 'xemacs)
@@ -61,7 +72,8 @@
     (require 'timer))
 
   ;; We check whether `start-file-process' is bound.
-  (unless (fboundp 'start-file-process)
+  ;; Note: we deactivate this.  There are problems, at least in SXEmacs.
+  (unless t;(fboundp 'start-file-process)
 
     ;; tramp-util offers integration into other (X)Emacs packages like
     ;; compile.el, gud.el etc.  Not necessary in Emacs 23.
@@ -127,7 +139,8 @@
     (defalias 'file-remote-p
       (lambda (file &optional identification connected)
        (when (tramp-tramp-file-p file)
-         (tramp-file-name-handler
+         (tramp-compat-funcall
+          'tramp-file-name-handler
           'file-remote-p file identification connected)))))
 
   ;; `process-file' does not exist in XEmacs.
@@ -153,8 +166,8 @@
     (defalias 'set-file-times
       (lambda (filename &optional time)
        (when (tramp-tramp-file-p filename)
-         (tramp-file-name-handler
-          'set-file-times filename time)))))
+         (tramp-compat-funcall
+          'tramp-file-name-handler 'set-file-times filename time)))))
 
   ;; We currently use "[" and "]" in the filename format for IPv6
   ;; hosts of GNU Emacs.  This means that Emacs wants to expand
@@ -221,11 +234,11 @@
 For Emacs, this is the variable `temporary-file-directory', for XEmacs
 this is the function `temp-directory'."
   (let (file-name-handler-alist)
+    ;; We must return a local directory.  If it is remote, we could
+    ;; run into an infloop.
     (cond
-     ;; We must return a local directory.  If it is remote, we could
-     ;; run into an infloop.
-     ((boundp 'temporary-file-directory)
-      (eval (car (get 'temporary-file-directory 'standard-value))))
+     ((and (boundp 'temporary-file-directory)
+          (eval (car (get 'temporary-file-directory 'standard-value)))))
      ((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory))
      ((let ((d (getenv "TEMP"))) (and d (file-directory-p d)))
       (file-name-as-directory (getenv "TEMP")))
@@ -302,7 +315,8 @@
    ((or (null id-format) (eq id-format 'integer))
     (file-attributes filename))
    ((tramp-tramp-file-p filename)
-    (tramp-file-name-handler 'file-attributes filename id-format))
+    (tramp-compat-funcall
+     'tramp-file-name-handler 'file-attributes filename id-format))
    (t (condition-case nil
          (tramp-compat-funcall 'file-attributes filename id-format)
        (wrong-number-of-arguments (file-attributes filename))))))

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2012-06-17 18:54:39 +0000
+++ b/lisp/net/tramp-sh.el      2012-07-05 06:57:57 +0000
@@ -1692,9 +1692,10 @@
      ;; "-"; this would confuse xargs.  "ls -aQ" might be a solution,
      ;; but it does not work on all remote systems.  Therefore, we
      ;; quote the filenames via sed.
-     "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | xargs "
-     "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t 
%%ie0 -1)'); "
-     "echo \")\"")
+     "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | "
+     "xargs %s -c "
+     "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 
-1)'"
+     " 2>/dev/null); echo \")\"")
     (tramp-shell-quote-argument localname)
     (tramp-get-ls-command vec)
     (tramp-get-remote-stat vec)
@@ -3284,14 +3285,14 @@
       (let (last-coding-system-used (need-chown t))
        ;; Set file modification time.
        (when (or (eq visit t) (stringp visit))
-          (let ((file-attr (file-attributes filename)))
+          (let ((file-attr (tramp-compat-file-attributes filename 'integer)))
             (set-visited-file-modtime
              ;; We must pass modtime explicitly, because filename can
              ;; be different from (buffer-file-name), f.e. if
              ;; `file-precious-flag' is set.
              (nth 5 file-attr))
-            (when (and (eq (nth 2 file-attr) uid)
-                       (eq (nth 3 file-attr) gid))
+            (when (and (= (nth 2 file-attr) uid)
+                       (= (nth 3 file-attr) gid))
               (setq need-chown nil))))
 
        ;; Set the ownership.
@@ -3332,7 +3333,7 @@
               `((,tramp-file-name-regexp . tramp-vc-file-name-handler))))
 
          ;; Here we collect only file names, which need an operation.
-         (tramp-run-real-handler 'vc-registered (list file))
+         (ignore-errors (tramp-run-real-handler 'vc-registered (list file)))
          (tramp-message v 10 "\n%s" tramp-vc-registered-file-names)
 
          ;; Send just one command, in order to fill the cache.
@@ -3400,10 +3401,12 @@
         ((and fn (memq operation '(file-exists-p file-readable-p)))
          (add-to-list 'tramp-vc-registered-file-names localname 'append)
          nil)
+        ;; `process-file' and `start-file-process' shall be ignored.
+        ((and fn (eq operation 'process-file) 0))
+        ((and fn (eq operation 'start-file-process) nil))
         ;; Tramp file name handlers like `expand-file-name'.  They
         ;; must still work.
-        (fn
-         (save-match-data (apply (cdr fn) args)))
+        (fn (save-match-data (apply (cdr fn) args)))
         ;; Default file name handlers, we don't care.
         (t (tramp-run-real-handler operation args)))))))
 
@@ -4294,7 +4297,7 @@
            (tramp-get-buffer vec)
 
            ;; If `non-essential' is non-nil, don't reopen a new connection.
-           (when non-essential
+           (when (and (boundp 'non-essential) (symbol-value 'non-essential))
              (throw 'non-essential 'non-essential))
 
            (tramp-with-progress-reporter

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2012-06-17 18:54:39 +0000
+++ b/lisp/net/tramp.el 2012-07-05 06:57:57 +0000
@@ -1531,6 +1531,9 @@
 
     'identity))
 
+(if (featurep 'xemacs)
+    (defalias 'tramp-drop-volume-letter 'identity))
+
 (defun tramp-cleanup (vec)
   "Cleanup connection VEC, but keep the debug buffer."
   (with-current-buffer (tramp-get-debug-buffer vec)


reply via email to

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