diff options
| author | Michael Albinus | 2016-07-04 15:36:30 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-07-04 15:36:30 +0200 |
| commit | f24fe30cb8118f8e15688eaf61a6fefde87f597e (patch) | |
| tree | 2f08f491a69ad05bbbffc745c89815b61a8faf24 | |
| parent | 05d76dba6604f78e4b2b7b9f8b30c916cad7d32a (diff) | |
| download | emacs-f24fe30cb8118f8e15688eaf61a6fefde87f597e.tar.gz emacs-f24fe30cb8118f8e15688eaf61a6fefde87f597e.zip | |
Add Google Drive support to Tramp
* doc/misc/tramp.texi: Add `gdrive' method.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.1-pre".
* etc/NEWS: Add Tramp connection method "gdrive".
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <gdrive>: Add.
(tramp-default-user-alist, tramp-default-host-alist): Add rule
for "gdrive".
(tramp-gvfs-file-attributes): Add "name", remove "standard::icon".
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Simplify regexp.
(tramp-gvfs-get-directory-attributes): Improve loop. Use
"standard::display-name" as file name, if available.
(tramp-gvfs-handle-file-name-all-completions): Simplify.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Map between "gdrive" and "google-drive".
* lisp/net/tramp.el (tramp-call-process): Do not signal error.
* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Do not enable `tramp-message-show-message'.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Do not specify error type.
| -rw-r--r-- | doc/misc/tramp.texi | 20 | ||||
| -rw-r--r-- | doc/misc/trampver.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 95 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 14 | ||||
| -rw-r--r-- | lisp/net/trampver.el | 6 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 5 |
7 files changed, 92 insertions, 54 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 894ccbe9c9c..dc3ef23c455 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -957,6 +957,22 @@ syntax requires a leading volume (share) name, for example: | |||
| 957 | based on standard protocols, such as HTTP@. @option{davs} does the same | 957 | based on standard protocols, such as HTTP@. @option{davs} does the same |
| 958 | but with SSL encryption. Both methods support the port numbers. | 958 | but with SSL encryption. Both methods support the port numbers. |
| 959 | 959 | ||
| 960 | @item @option{gdrive} | ||
| 961 | @cindex method gdrive | ||
| 962 | @cindex gdrive method | ||
| 963 | @cindex Google Drive | ||
| 964 | |||
| 965 | Via the @option{gdrive} method it is possible to access your Google | ||
| 966 | Drive online storage. User and host name of the remote file name are | ||
| 967 | your email address of the Google Drive credentials, like | ||
| 968 | @file{@trampfn{gdrive,john.doe@@gmail.com,/}}. These credentials must | ||
| 969 | be populated in your @command{Online Accounts} application outside Emacs. | ||
| 970 | |||
| 971 | Since Google Drive uses cryptic blob file names internally, | ||
| 972 | @value{tramp} works with the @code{display-name} of the files. This | ||
| 973 | could produce unexpected behaviour in case two files in the same | ||
| 974 | directory have the same @code{display-name}, such a situation must be avoided. | ||
| 975 | |||
| 960 | @item @option{obex} | 976 | @item @option{obex} |
| 961 | @cindex method obex | 977 | @cindex method obex |
| 962 | @cindex obex method | 978 | @cindex obex method |
| @@ -986,8 +1002,8 @@ requires the SYNCE-GVFS plugin. | |||
| 986 | @vindex tramp-gvfs-methods | 1002 | @vindex tramp-gvfs-methods |
| 987 | This custom option is a list of external methods for GVFS@. By | 1003 | This custom option is a list of external methods for GVFS@. By |
| 988 | default, this list includes @option{afp}, @option{dav}, @option{davs}, | 1004 | default, this list includes @option{afp}, @option{dav}, @option{davs}, |
| 989 | @option{obex}, @option{sftp} and @option{synce}. Other methods to | 1005 | @option{gdrive}, @option{obex}, @option{sftp} and @option{synce}. |
| 990 | include are: @option{ftp} and @option{smb}. | 1006 | Other methods to include are: @option{ftp} and @option{smb}. |
| 991 | @end defopt | 1007 | @end defopt |
| 992 | 1008 | ||
| 993 | 1009 | ||
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 6f67f35902a..3101dc0de82 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | @c In the Tramp GIT, the version number is auto-frobbed from | 8 | @c In the Tramp GIT, the version number is auto-frobbed from |
| 9 | @c configure.ac, so you should edit that file and run | 9 | @c configure.ac, so you should edit that file and run |
| 10 | @c "autoconf && ./configure" to change the version number. | 10 | @c "autoconf && ./configure" to change the version number. |
| 11 | @set trampver 2.3.0 | 11 | @set trampver 2.3.1-pre |
| 12 | 12 | ||
| 13 | @c Other flags from configuration | 13 | @c Other flags from configuration |
| 14 | @set instprefix /usr/local | 14 | @set instprefix /usr/local |
| @@ -318,6 +318,10 @@ different group ID. | |||
| 318 | +++ | 318 | +++ |
| 319 | *** New connection method "doas" for OpenBSD hosts. | 319 | *** New connection method "doas" for OpenBSD hosts. |
| 320 | 320 | ||
| 321 | +++ | ||
| 322 | *** New connection method "gdrive", which allows to access Google | ||
| 323 | Drive onsite repositories. | ||
| 324 | |||
| 321 | --- | 325 | --- |
| 322 | ** 'auto-revert-use-notify' is set back to t in 'global-auto-revert-mode'. | 326 | ** 'auto-revert-use-notify' is set back to t in 'global-auto-revert-mode'. |
| 323 | 327 | ||
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 0e874d6c586..8e7ef0f4079 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -49,10 +49,10 @@ | |||
| 49 | 49 | ||
| 50 | ;; The custom option `tramp-gvfs-methods' contains the list of | 50 | ;; The custom option `tramp-gvfs-methods' contains the list of |
| 51 | ;; supported connection methods. Per default, these are "afp", "dav", | 51 | ;; supported connection methods. Per default, these are "afp", "dav", |
| 52 | ;; "davs", "obex", "sftp" and "synce". Note that with "obex" it might | 52 | ;; "davs", "gdrive", "obex", "sftp" and "synce". Note that with |
| 53 | ;; be necessary to pair with the other bluetooth device, if it hasn't | 53 | ;; "obex" it might be necessary to pair with the other bluetooth |
| 54 | ;; been done already. There might be also some few seconds delay in | 54 | ;; device, if it hasn't been done already. There might be also some |
| 55 | ;; discovering available bluetooth devices. | 55 | ;; few seconds delay in discovering available bluetooth devices. |
| 56 | 56 | ||
| 57 | ;; Other possible connection methods are "ftp" and "smb". When one of | 57 | ;; Other possible connection methods are "ftp" and "smb". When one of |
| 58 | ;; these methods is added to the list, the remote access for that | 58 | ;; these methods is added to the list, the remote access for that |
| @@ -110,21 +110,29 @@ | |||
| 110 | (require 'custom)) | 110 | (require 'custom)) |
| 111 | 111 | ||
| 112 | ;;;###tramp-autoload | 112 | ;;;###tramp-autoload |
| 113 | (defcustom tramp-gvfs-methods '("afp" "dav" "davs" "obex" "sftp" "synce") | 113 | (defcustom tramp-gvfs-methods |
| 114 | '("afp" "dav" "davs" "gdrive" "obex" "sftp" "synce") | ||
| 114 | "List of methods for remote files, accessed with GVFS." | 115 | "List of methods for remote files, accessed with GVFS." |
| 115 | :group 'tramp | 116 | :group 'tramp |
| 116 | :version "25.1" | 117 | :version "25.2" |
| 117 | :type '(repeat (choice (const "afp") | 118 | :type '(repeat (choice (const "afp") |
| 118 | (const "dav") | 119 | (const "dav") |
| 119 | (const "davs") | 120 | (const "davs") |
| 120 | (const "ftp") | 121 | (const "ftp") |
| 122 | (const "gdrive") | ||
| 121 | (const "obex") | 123 | (const "obex") |
| 122 | (const "sftp") | 124 | (const "sftp") |
| 123 | (const "smb") | 125 | (const "smb") |
| 124 | (const "synce")))) | 126 | (const "synce")))) |
| 125 | 127 | ||
| 126 | ;; Add a default for `tramp-default-user-alist'. Rule: For the SYNCE | 128 | ;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'. |
| 127 | ;; method, no user is chosen. | 129 | ;;;###tramp-autoload |
| 130 | (when (string-match "\\(.+\\)@\\(\\(?:gmail\\|googlemail\\)\\.com\\)" | ||
| 131 | user-mail-address) | ||
| 132 | (add-to-list 'tramp-default-user-alist | ||
| 133 | `("\\`gdrive\\'" nil ,(match-string 1 user-mail-address))) | ||
| 134 | (add-to-list 'tramp-default-host-alist | ||
| 135 | '("\\`gdrive\\'" nil ,(match-string 2 user-mail-address)))) | ||
| 128 | ;;;###tramp-autoload | 136 | ;;;###tramp-autoload |
| 129 | (add-to-list 'tramp-default-user-alist '("\\`synce\\'" nil nil)) | 137 | (add-to-list 'tramp-default-user-alist '("\\`synce\\'" nil nil)) |
| 130 | 138 | ||
| @@ -408,11 +416,9 @@ Every entry is a list (NAME ADDRESS).") | |||
| 408 | "The device interface of the HAL daemon.") | 416 | "The device interface of the HAL daemon.") |
| 409 | 417 | ||
| 410 | (defconst tramp-gvfs-file-attributes | 418 | (defconst tramp-gvfs-file-attributes |
| 411 | '("type" | 419 | '("name" |
| 420 | "type" | ||
| 412 | "standard::display-name" | 421 | "standard::display-name" |
| 413 | ;; We don't need this one. It is used as delimiter in case the | ||
| 414 | ;; display name contains spaces, which is hard to parse. | ||
| 415 | "standard::icon" | ||
| 416 | "standard::symlink-target" | 422 | "standard::symlink-target" |
| 417 | "unix::nlink" | 423 | "unix::nlink" |
| 418 | "unix::uid" | 424 | "unix::uid" |
| @@ -432,9 +438,7 @@ Every entry is a list (NAME ADDRESS).") | |||
| 432 | "GVFS file attributes.") | 438 | "GVFS file attributes.") |
| 433 | 439 | ||
| 434 | (defconst tramp-gvfs-file-attributes-with-gvfs-ls-regexp | 440 | (defconst tramp-gvfs-file-attributes-with-gvfs-ls-regexp |
| 435 | (concat "[[:blank:]]" | 441 | (concat "[[:blank:]]" (regexp-opt tramp-gvfs-file-attributes t) "=\\(.+?\\)") |
| 436 | (regexp-opt tramp-gvfs-file-attributes t) | ||
| 437 | "=\\([^[:blank:]]+\\)") | ||
| 438 | "Regexp to parse GVFS file attributes with `gvfs-ls'.") | 442 | "Regexp to parse GVFS file attributes with `gvfs-ls'.") |
| 439 | 443 | ||
| 440 | (defconst tramp-gvfs-file-attributes-with-gvfs-info-regexp | 444 | (defconst tramp-gvfs-file-attributes-with-gvfs-info-regexp |
| @@ -834,25 +838,31 @@ file names." | |||
| 834 | v "gvfs-ls" "-h" "-n" "-a" | 838 | v "gvfs-ls" "-h" "-n" "-a" |
| 835 | (mapconcat 'identity tramp-gvfs-file-attributes ",") | 839 | (mapconcat 'identity tramp-gvfs-file-attributes ",") |
| 836 | (tramp-gvfs-url-file-name directory)) | 840 | (tramp-gvfs-url-file-name directory)) |
| 837 | ;; Parse output ... | 841 | ;; Parse output. |
| 838 | (with-current-buffer (tramp-get-connection-buffer v) | 842 | (with-current-buffer (tramp-get-connection-buffer v) |
| 839 | (goto-char (point-min)) | 843 | (goto-char (point-min)) |
| 840 | (while (re-search-forward | 844 | (while (looking-at |
| 841 | (concat "^\\(.+\\)[[:blank:]]" | 845 | (concat "^\\(.+\\)[[:blank:]]" |
| 842 | "\\([[:digit:]]+\\)[[:blank:]]" | 846 | "\\([[:digit:]]+\\)[[:blank:]]" |
| 843 | "(\\(.+\\))[[:blank:]]" | 847 | "(\\(.+?\\))" |
| 844 | "standard::display-name=\\(.+\\)[[:blank:]]" | 848 | tramp-gvfs-file-attributes-with-gvfs-ls-regexp)) |
| 845 | "standard::icon=") | 849 | (let ((item (list (cons "type" (match-string 3)) |
| 846 | (point-at-eol) t) | ||
| 847 | (let ((item (list (cons "standard::display-name" (match-string 4)) | ||
| 848 | (cons "type" (match-string 3)) | ||
| 849 | (cons "standard::size" (match-string 2)) | 850 | (cons "standard::size" (match-string 2)) |
| 850 | (match-string 1)))) | 851 | (cons "name" (match-string 1))))) |
| 851 | (while (re-search-forward | 852 | (goto-char (1+ (match-end 3))) |
| 852 | tramp-gvfs-file-attributes-with-gvfs-ls-regexp | 853 | (while (looking-at |
| 853 | (point-at-eol) t) | 854 | (concat |
| 854 | (push (cons (match-string 1) (match-string 2)) item)) | 855 | tramp-gvfs-file-attributes-with-gvfs-ls-regexp |
| 855 | (push (nreverse item) result)) | 856 | "\\(" tramp-gvfs-file-attributes-with-gvfs-ls-regexp |
| 857 | "\\|" "$" "\\)")) | ||
| 858 | (push (cons (match-string 1) (match-string 2)) item) | ||
| 859 | (goto-char (match-end 2))) | ||
| 860 | ;; Add display name as head. | ||
| 861 | (push | ||
| 862 | (cons (cdr (or (assoc "standard::display-name" item) | ||
| 863 | (assoc "name" item))) | ||
| 864 | (nreverse item)) | ||
| 865 | result)) | ||
| 856 | (forward-line))) | 866 | (forward-line))) |
| 857 | result))))) | 867 | result))))) |
| 858 | 868 | ||
| @@ -868,7 +878,7 @@ file names." | |||
| 868 | ;; Send command. | 878 | ;; Send command. |
| 869 | (tramp-gvfs-send-command | 879 | (tramp-gvfs-send-command |
| 870 | v "gvfs-info" (tramp-gvfs-url-file-name filename)) | 880 | v "gvfs-info" (tramp-gvfs-url-file-name filename)) |
| 871 | ;; Parse output ... | 881 | ;; Parse output. |
| 872 | (with-current-buffer (tramp-get-connection-buffer v) | 882 | (with-current-buffer (tramp-get-connection-buffer v) |
| 873 | (goto-char (point-min)) | 883 | (goto-char (point-min)) |
| 874 | (while (re-search-forward | 884 | (while (re-search-forward |
| @@ -1024,17 +1034,12 @@ file names." | |||
| 1024 | filename | 1034 | filename |
| 1025 | (with-parsed-tramp-file-name (expand-file-name directory) nil | 1035 | (with-parsed-tramp-file-name (expand-file-name directory) nil |
| 1026 | (with-tramp-file-property v localname "file-name-all-completions" | 1036 | (with-tramp-file-property v localname "file-name-all-completions" |
| 1027 | (let ((result '("./" "../")) | 1037 | (let ((result '("./" "../"))) |
| 1028 | entry) | ||
| 1029 | ;; Get a list of directories and files. | 1038 | ;; Get a list of directories and files. |
| 1030 | (dolist (item (tramp-gvfs-get-directory-attributes directory) result) | 1039 | (dolist (item (tramp-gvfs-get-directory-attributes directory) result) |
| 1031 | (setq entry | ||
| 1032 | (or ;; Use display-name if available (google-drive). | ||
| 1033 | ;(cdr (assoc "standard::display-name" item)) | ||
| 1034 | (car item))) | ||
| 1035 | (if (string-equal (cdr (assoc "type" item)) "directory") | 1040 | (if (string-equal (cdr (assoc "type" item)) "directory") |
| 1036 | (push (file-name-as-directory entry) result) | 1041 | (push (file-name-as-directory (car item)) result) |
| 1037 | (push entry result))))))))) | 1042 | (push (car item) result))))))))) |
| 1038 | 1043 | ||
| 1039 | (defun tramp-gvfs-handle-file-notify-add-watch (file-name flags _callback) | 1044 | (defun tramp-gvfs-handle-file-notify-add-watch (file-name flags _callback) |
| 1040 | "Like `file-notify-add-watch' for Tramp files." | 1045 | "Like `file-notify-add-watch' for Tramp files." |
| @@ -1220,6 +1225,8 @@ file-notify events." | |||
| 1220 | (url-recreate-url | 1225 | (url-recreate-url |
| 1221 | (if (tramp-tramp-file-p filename) | 1226 | (if (tramp-tramp-file-p filename) |
| 1222 | (with-parsed-tramp-file-name filename nil | 1227 | (with-parsed-tramp-file-name filename nil |
| 1228 | (when (string-equal "gdrive" method) | ||
| 1229 | (setq method "google-drive")) | ||
| 1223 | (when (and user (string-match tramp-user-with-domain-regexp user)) | 1230 | (when (and user (string-match tramp-user-with-domain-regexp user)) |
| 1224 | (setq user | 1231 | (setq user |
| 1225 | (concat (match-string 2 user) ";" (match-string 1 user)))) | 1232 | (concat (match-string 2 user) ";" (match-string 1 user)))) |
| @@ -1389,6 +1396,8 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"." | |||
| 1389 | (setq host (tramp-bluez-device host))) | 1396 | (setq host (tramp-bluez-device host))) |
| 1390 | (when (and (string-equal "dav" method) (string-equal "true" ssl)) | 1397 | (when (and (string-equal "dav" method) (string-equal "true" ssl)) |
| 1391 | (setq method "davs")) | 1398 | (setq method "davs")) |
| 1399 | (when (string-equal "google-drive" method) | ||
| 1400 | (setq method "gdrive")) | ||
| 1392 | (unless (zerop (length domain)) | 1401 | (unless (zerop (length domain)) |
| 1393 | (setq user (concat user tramp-prefix-domain-format domain))) | 1402 | (setq user (concat user tramp-prefix-domain-format domain))) |
| 1394 | (unless (zerop (length port)) | 1403 | (unless (zerop (length port)) |
| @@ -1474,6 +1483,8 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or \"[xx:xx:xx:xx:xx:xx]\"." | |||
| 1474 | (setq host (tramp-bluez-device host))) | 1483 | (setq host (tramp-bluez-device host))) |
| 1475 | (when (and (string-equal "dav" method) (string-equal "true" ssl)) | 1484 | (when (and (string-equal "dav" method) (string-equal "true" ssl)) |
| 1476 | (setq method "davs")) | 1485 | (setq method "davs")) |
| 1486 | (when (string-equal "google-drive" method) | ||
| 1487 | (setq method "gdrive")) | ||
| 1477 | (when (and (string-equal "synce" method) (zerop (length user))) | 1488 | (when (and (string-equal "synce" method) (zerop (length user))) |
| 1478 | (setq user (or (tramp-file-name-user vec) ""))) | 1489 | (setq user (or (tramp-file-name-user vec) ""))) |
| 1479 | (unless (zerop (length domain)) | 1490 | (unless (zerop (length domain)) |
| @@ -1531,6 +1542,9 @@ It was \"a(say)\", but has changed to \"a{sv})\"." | |||
| 1531 | (list (tramp-gvfs-mount-spec-entry "type" "afp-volume") | 1542 | (list (tramp-gvfs-mount-spec-entry "type" "afp-volume") |
| 1532 | (tramp-gvfs-mount-spec-entry "host" host) | 1543 | (tramp-gvfs-mount-spec-entry "host" host) |
| 1533 | (tramp-gvfs-mount-spec-entry "volume" share))) | 1544 | (tramp-gvfs-mount-spec-entry "volume" share))) |
| 1545 | ((string-equal "gdrive" method) | ||
| 1546 | (list (tramp-gvfs-mount-spec-entry "type" "google-drive") | ||
| 1547 | (tramp-gvfs-mount-spec-entry "host" host))) | ||
| 1534 | (t | 1548 | (t |
| 1535 | (list (tramp-gvfs-mount-spec-entry "type" method) | 1549 | (list (tramp-gvfs-mount-spec-entry "type" method) |
| 1536 | (tramp-gvfs-mount-spec-entry "host" host)))) | 1550 | (tramp-gvfs-mount-spec-entry "host" host)))) |
| @@ -1896,8 +1910,9 @@ They are retrieved from the hal daemon." | |||
| 1896 | 1910 | ||
| 1897 | ;;; TODO: | 1911 | ;;; TODO: |
| 1898 | 1912 | ||
| 1899 | ;; * Host name completion via afp-server, smb-server or smb-network. | 1913 | ;; * Host name completion for existing mount points (afp-server, |
| 1900 | ;; * Check how two shares of the same SMB server can be mounted in | 1914 | ;; smb-server) or via smb-network. |
| 1915 | ;; * Check, how two shares of the same SMB server can be mounted in | ||
| 1901 | ;; parallel. | 1916 | ;; parallel. |
| 1902 | ;; * Apply SDP on bluetooth devices, in order to filter out obex | 1917 | ;; * Apply SDP on bluetooth devices, in order to filter out obex |
| 1903 | ;; capability. | 1918 | ;; capability. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b02760bff80..d80006abbca 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4012,7 +4012,7 @@ are written with verbosity of 6." | |||
| 4012 | (vector tramp-current-method tramp-current-user | 4012 | (vector tramp-current-method tramp-current-user |
| 4013 | tramp-current-host nil nil))) | 4013 | tramp-current-host nil nil))) |
| 4014 | (destination (if (eq destination t) (current-buffer) destination)) | 4014 | (destination (if (eq destination t) (current-buffer) destination)) |
| 4015 | result) | 4015 | output error result) |
| 4016 | (tramp-message | 4016 | (tramp-message |
| 4017 | v 6 "`%s %s' %s %s" | 4017 | v 6 "`%s %s' %s %s" |
| 4018 | program (mapconcat 'identity args " ") infile destination) | 4018 | program (mapconcat 'identity args " ") infile destination) |
| @@ -4023,13 +4023,17 @@ are written with verbosity of 6." | |||
| 4023 | 'call-process program infile (or destination t) display args)) | 4023 | 'call-process program infile (or destination t) display args)) |
| 4024 | ;; `result' could also be an error string. | 4024 | ;; `result' could also be an error string. |
| 4025 | (when (stringp result) | 4025 | (when (stringp result) |
| 4026 | (signal 'file-error (list result))) | 4026 | (setq error result |
| 4027 | result 1)) | ||
| 4027 | (with-current-buffer | 4028 | (with-current-buffer |
| 4028 | (if (bufferp destination) destination (current-buffer)) | 4029 | (if (bufferp destination) destination (current-buffer)) |
| 4029 | (tramp-message v 6 "%d\n%s" result (buffer-string)))) | 4030 | (setq output (buffer-string)))) |
| 4030 | (error | 4031 | (error |
| 4031 | (setq result 1) | 4032 | (setq error (error-message-string err) |
| 4032 | (tramp-message v 6 "%d\n%s" result (error-message-string err)))) | 4033 | result 1))) |
| 4034 | (if (zerop (length error)) | ||
| 4035 | (tramp-message v 6 "%d\n%s" result output) | ||
| 4036 | (tramp-message v 6 "%d\n%s\n%s" result output error)) | ||
| 4033 | result)) | 4037 | result)) |
| 4034 | 4038 | ||
| 4035 | (defun tramp-call-process-region | 4039 | (defun tramp-call-process-region |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index aea260541e9..fad7e7f77c1 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> | 6 | ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> |
| 7 | ;; Keywords: comm, processes | 7 | ;; Keywords: comm, processes |
| 8 | ;; Package: tramp | 8 | ;; Package: tramp |
| 9 | ;; Version: 2.3.0 | 9 | ;; Version: 2.3.1-pre |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; should be changed only there. | 32 | ;; should be changed only there. |
| 33 | 33 | ||
| 34 | ;;;###tramp-autoload | 34 | ;;;###tramp-autoload |
| 35 | (defconst tramp-version "2.3.0" | 35 | (defconst tramp-version "2.3.1-pre" |
| 36 | "This version of Tramp.") | 36 | "This version of Tramp.") |
| 37 | 37 | ||
| 38 | ;;;###tramp-autoload | 38 | ;;;###tramp-autoload |
| @@ -54,7 +54,7 @@ | |||
| 54 | ;; Check for Emacs version. | 54 | ;; Check for Emacs version. |
| 55 | (let ((x (if (>= emacs-major-version 23) | 55 | (let ((x (if (>= emacs-major-version 23) |
| 56 | "ok" | 56 | "ok" |
| 57 | (format "Tramp 2.3.0 is not fit for %s" | 57 | (format "Tramp 2.3.1-pre is not fit for %s" |
| 58 | (when (string-match "^.*$" (emacs-version)) | 58 | (when (string-match "^.*$" (emacs-version)) |
| 59 | (match-string 0 (emacs-version))))))) | 59 | (match-string 0 (emacs-version))))))) |
| 60 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) | 60 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index b9562c1befc..fe927bb25fd 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -119,7 +119,6 @@ eval properly in `should', `should-not' or `should-error'. BODY | |||
| 119 | shall not contain a timeout." | 119 | shall not contain a timeout." |
| 120 | (declare (indent 1) (debug (natnump body))) | 120 | (declare (indent 1) (debug (natnump body))) |
| 121 | `(let ((tramp-verbose ,verbose) | 121 | `(let ((tramp-verbose ,verbose) |
| 122 | (tramp-message-show-message t) | ||
| 123 | (tramp-debug-on-error t) | 122 | (tramp-debug-on-error t) |
| 124 | (debug-ignored-errors | 123 | (debug-ignored-errors |
| 125 | (cons "^make-symbolic-link not supported$" debug-ignored-errors))) | 124 | (cons "^make-symbolic-link not supported$" debug-ignored-errors))) |
| @@ -932,7 +931,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." | |||
| 932 | (make-directory tmp-name1) | 931 | (make-directory tmp-name1) |
| 933 | (should (file-directory-p tmp-name1)) | 932 | (should (file-directory-p tmp-name1)) |
| 934 | (should (file-accessible-directory-p tmp-name1)) | 933 | (should (file-accessible-directory-p tmp-name1)) |
| 935 | (should-error (make-directory tmp-name2) :type 'file-error) | 934 | (should-error (make-directory tmp-name2)) |
| 936 | (make-directory tmp-name2 'parents) | 935 | (make-directory tmp-name2 'parents) |
| 937 | (should (file-directory-p tmp-name2)) | 936 | (should (file-directory-p tmp-name2)) |
| 938 | (should (file-accessible-directory-p tmp-name2))) | 937 | (should (file-accessible-directory-p tmp-name2))) |
| @@ -953,7 +952,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." | |||
| 953 | ;; Delete non-empty directory. | 952 | ;; Delete non-empty directory. |
| 954 | (make-directory tmp-name) | 953 | (make-directory tmp-name) |
| 955 | (write-region "foo" nil (expand-file-name "bla" tmp-name)) | 954 | (write-region "foo" nil (expand-file-name "bla" tmp-name)) |
| 956 | (should-error (delete-directory tmp-name) :type 'file-error) | 955 | (should-error (delete-directory tmp-name)) |
| 957 | (delete-directory tmp-name 'recursive) | 956 | (delete-directory tmp-name 'recursive) |
| 958 | (should-not (file-directory-p tmp-name)))) | 957 | (should-not (file-directory-p tmp-name)))) |
| 959 | 958 | ||