diff options
| author | Michael Albinus | 2018-11-24 13:56:10 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-11-24 13:56:10 +0100 |
| commit | 5f9b29673fa29d27b7c165ecd5bbc7c3c06b138b (patch) | |
| tree | 4b679e61dc01316189e9439c3e48632034dfd614 | |
| parent | 1342cccd4bcd606cf8fdb477e4b28001a88cc065 (diff) | |
| download | emacs-5f9b29673fa29d27b7c165ecd5bbc7c3c06b138b.tar.gz emacs-5f9b29673fa29d27b7c165ecd5bbc7c3c06b138b.zip | |
Revert patch in tramp-equal-remote
* lisp/net/tramp-sh.el (tramp-timeout-session):
Use `tramp-file-name-equal-p'.
* lisp/net/tramp.el (tramp-equal-remote): Revert patch.
| -rw-r--r-- | lisp/net/tramp-sh.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 18 |
2 files changed, 8 insertions, 12 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 462ad83317e..b5d4893580e 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4704,7 +4704,7 @@ Goes through the list `tramp-inline-compress-commands'." | |||
| 4704 | "Close the connection VEC after a session timeout. | 4704 | "Close the connection VEC after a session timeout. |
| 4705 | If there is just some editing, retry it after 5 seconds." | 4705 | If there is just some editing, retry it after 5 seconds." |
| 4706 | (if (and tramp-locked tramp-locker | 4706 | (if (and tramp-locked tramp-locker |
| 4707 | (tramp-equal-remote vec tramp-current-connection)) | 4707 | (tramp-file-name-equal-p vec (car tramp-current-connection))) |
| 4708 | (progn | 4708 | (progn |
| 4709 | (tramp-message | 4709 | (tramp-message |
| 4710 | vec 5 "Cannot timeout session, trying it again in %s seconds." 5) | 4710 | vec 5 "Cannot timeout session, trying it again in %s seconds." 5) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 3fbc45f8c89..fe0ba94f4c7 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1230,6 +1230,7 @@ If nil, return `tramp-default-port'." | |||
| 1230 | (or (tramp-file-name-port vec) | 1230 | (or (tramp-file-name-port vec) |
| 1231 | (tramp-get-method-parameter vec 'tramp-default-port))) | 1231 | (tramp-get-method-parameter vec 'tramp-default-port))) |
| 1232 | 1232 | ||
| 1233 | ;; Comparision of file names is performed by `tramp-equal-remote'. | ||
| 1233 | (defun tramp-file-name-equal-p (vec1 vec2) | 1234 | (defun tramp-file-name-equal-p (vec1 vec2) |
| 1234 | "Check, whether VEC1 and VEC2 denote the same `tramp-file-name'." | 1235 | "Check, whether VEC1 and VEC2 denote the same `tramp-file-name'." |
| 1235 | (and (tramp-file-name-p vec1) (tramp-file-name-p vec2) | 1236 | (and (tramp-file-name-p vec1) (tramp-file-name-p vec2) |
| @@ -4068,6 +4069,7 @@ If it doesn't exist, generate a new one." | |||
| 4068 | (with-tramp-connection-property (tramp-get-connection-process vec) "device" | 4069 | (with-tramp-connection-property (tramp-get-connection-process vec) "device" |
| 4069 | (cons -1 (setq tramp-devices (1+ tramp-devices))))) | 4070 | (cons -1 (setq tramp-devices (1+ tramp-devices))))) |
| 4070 | 4071 | ||
| 4072 | ;; Comparision of vectors is performed by `tramp-file-name-equal-p'. | ||
| 4071 | (defun tramp-equal-remote (file1 file2) | 4073 | (defun tramp-equal-remote (file1 file2) |
| 4072 | "Check, whether the remote parts of FILE1 and FILE2 are identical. | 4074 | "Check, whether the remote parts of FILE1 and FILE2 are identical. |
| 4073 | The check depends on method, user and host name of the files. If | 4075 | The check depends on method, user and host name of the files. If |
| @@ -4077,20 +4079,14 @@ account. | |||
| 4077 | 4079 | ||
| 4078 | Example: | 4080 | Example: |
| 4079 | 4081 | ||
| 4080 | (tramp-equal-remote \"/ssh::/etc\" \"/<your host name>:/home\") | 4082 | (tramp-equal-remote \"/ssh::/etc\" \"/-:<your host name>:/home\") |
| 4081 | 4083 | ||
| 4082 | would yield t. On the other hand, the following check results in nil: | 4084 | would yield t. On the other hand, the following check results in nil: |
| 4083 | 4085 | ||
| 4084 | (tramp-equal-remote \"/sudo::/etc\" \"/su::/etc\") | 4086 | (tramp-equal-remote \"/sudo::/etc\" \"/su::/etc\")" |
| 4085 | 4087 | (and (tramp-tramp-file-p file1) | |
| 4086 | FILE1 and FILE2 could also be Tramp vectors." | 4088 | (tramp-tramp-file-p file2) |
| 4087 | (or (and (tramp-tramp-file-p file1) | 4089 | (string-equal (file-remote-p file1) (file-remote-p file2)))) |
| 4088 | (tramp-tramp-file-p file2) | ||
| 4089 | (string-equal (file-remote-p file1) (file-remote-p file2))) | ||
| 4090 | (and (tramp-file-name-p file1) | ||
| 4091 | (tramp-file-name-p file2) | ||
| 4092 | (string-equal (tramp-make-tramp-file-name file1 'localname) | ||
| 4093 | (tramp-make-tramp-file-name file2 'localname))))) | ||
| 4094 | 4090 | ||
| 4095 | ;;;###tramp-autoload | 4091 | ;;;###tramp-autoload |
| 4096 | (defun tramp-mode-string-to-int (mode-string) | 4092 | (defun tramp-mode-string-to-int (mode-string) |