1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

176 Commits

Author SHA1 Message Date
Michael Albinus
f87a9e359e Fix accidential change in tramp-tests; do not merge with master
* lisp/net/trampver.el: Change version to "2.3.5.26.3".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.3.

* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Add skip for w32.
2019-06-15 21:38:11 +02:00
Juanma Barranquero
200f63cfa5 tramp-test42-auto-load: Add expected-result.
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Expect a failed result if remote file access is not enabled,
as it happens while doing the test on Windows.
2019-06-15 07:23:25 +02:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Rob Browning
ab8ed41859 Avoid test failures if directory name looks like a regexp
Taken from <https://sources.debian.org/patches/emacs/1:26.1+1-1>
* test/lisp/ibuffer-tests.el (ibuffer-filter-inclusion-3):
* test/lisp/net/tramp-tests.el (tramp-test42-remote-load-path):
Regexp-quote file names to avoid failures with directory names
of the form "build/emacs-i87jK3/emacs-26.1+1/...".
2018-12-18 15:34:01 -05:00
Michael Albinus
61de292c72 Fix (Bug#32218). Do not merge with master
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.4.26.2".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.2.

* lisp/net/tramp.el (tramp-handle-file-truename):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Fix problem
with trailing slash.  (Bug#32218)

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Remove `tramp--test-emacs27-p' check.
2018-07-20 10:56:41 +02:00
Michael Albinus
40c2ce743b Remove test code from last commit 2018-07-08 13:08:05 +02:00
Michael Albinus
e02d8e29c6 Fix Bug#32084
* test/lisp/net/dbus-tests.el (dbus-test02-register-service-own-bus):
Unset $DISPLAY when calling dbus-launch, in order to avoid
possible X11 authentication errors.  (Bug#32084)
2018-07-08 13:02:19 +02:00
Michael Albinus
1f5037925b Sync with Tramp 2.3.4. Do not merge with master
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.4".

* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
Check, that the directory has been removed indeed.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
(tramp--test-emacs25-p): New defun.
(tramp-test34-vc-registered): Use it.
2018-06-27 13:08:18 +02:00
Michael Albinus
e8912d5be9 Sync with Tramp 2.3.4-pre
* doc/misc/trampver.texi: Change version to "2.3.4-pre

* lisp/net/tramp.el (tramp-mode, tramp-verbose)
(tramp-backup-directory-alist, tramp-auto-save-directory)
(tramp-encoding-shell, tramp-encoding-command-switch)
(tramp-encoding-command-interactive, tramp-default-method)
(tramp-default-method-alist, tramp-default-user)
(tramp-default-user-alist, tramp-default-host)
(tramp-default-host-alist, tramp-default-proxies-alist)
(tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist)
(tramp-local-end-of-line, tramp-rsh-end-of-line)
(tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
(tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
(tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
(tramp-terminal-prompt-regexp)
(tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp)
(tramp-process-alive-regexp, tramp-chunksize)
(tramp-process-connection-type, tramp-connection-timeout)
(tramp-connection-min-time-diff)
(tramp-completion-reread-directory-timeout):
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
(tramp-gvfs-zeroconf-domain, tramp-bluez-discover-devices-timeout):
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-terminal-type)
(tramp-histfile-override, tramp-use-ssh-controlmaster-options)
(tramp-remote-path, tramp-remote-process-environment)
(tramp-sh-extra-args):
* lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
(tramp-smb-conf, tramp-smb-winexe-program)
(tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch):
Dont't require 'tramp.  (Bug#31558)

* lisp/net/tramp.el (tramp-accept-process-output):
* lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-start-file-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process): Suppress timers.

* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Write proper message.

* lisp/net/tramp-cmds.el (tramp-change-syntax):
Use `customize-set-variable'.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Ensure proper EOL handling for Darwin.
(tramp-find-inline-compress): Improve command quoting for w32.
Reported by Chris Zheng <chriszheng99@gmail.com>.
(tramp-open-connection-setup-interactive-shell): Wrap both echo
calls in parentheses, in order to avoid double prompt.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_RESOURCE_NAME_NOT_FOUND".

* lisp/net/tramp.el (tramp-default-user-alist)
(tramp-default-host-alist): Fix docstring.
(tramp-dissect-file-name): Adapt docstring.  (Bug#30904)
(tramp-make-tramp-file-name): Check, that method is
not empty.  (Bug#30038)
(tramp-message-show-message): Change default.

* lisp/net/trampver.el: Change version to "2.3.4-pre".

* test/lisp/net/tramp-tests.el (ert-x): Require it.
(tramp-test10-write-region): Extend test.
(tramp--test-emacs27-p, tramp--test-windows-nt): New defuns.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files): Use them.
(tramp-test21-file-links): Do not call `make-symbolic-link' on w32.
Fix file name quoting test.
(tramp-test32-environment-variables-and-port-numbers):
Adapt check for systems which do not support "echo -n".  (Bug#29712)
(tramp-test36-find-backup-file-name): Call also
`convert-standard-filename' due to w32.
(tramp-test41-asynchronous-requests):
Use $REMOTE_PARALLEL_PROCESSES.  Flush cache prior file operations.
(tramp-test42-auto-load, tramp-test42-delay-load)
(tramp-test42-recursive-load, tramp-test42-remote-load-path):
Quote command due to w32.
2018-05-29 09:57:48 +02:00
Michael Albinus
01932c8dec Revert a1bbc49015 (Bug#30243), do not merge
* lisp/files.el:
* test/lisp/net/tramp-tests.el: Revert a1bbc49015.  (Bug#30243)
2018-02-01 15:00:18 +01:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Michael Albinus
ac53084f9b Improve fix for Bug#29712
* test/lisp/net/tramp-tests.el
(tramp-test32-environment-variables-and-port-numbers):
Adapt check for systems which do not support "echo -n".  (Bug#29712)
2017-12-16 16:40:03 +01:00
Michael Albinus
95606af8b0 Fix Bug#29712 in tramp-tests.el
* test/lisp/net/tramp-tests.el
(tramp-test32-environment-variables-and-port-numbers):
Skip for macOS.  (Bug#29712)
2017-12-15 09:37:42 +01:00
Michael Albinus
7eea3144d4 Minor Tramp fixes
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Fix a bug when renaming.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp-test42-delay-load, tramp-test42-remote-load-path):
Skip unless Emacs >= 26.
2017-12-08 16:37:53 +01:00
Michael Albinus
a1bbc49015 Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations.  (Bug#29579)

* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.

* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
2017-12-06 20:49:30 +01:00
Michael Albinus
ad99550610 Make tramp-test42-auto-load more robust
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Make it more robust.  Don't skip.
2017-11-30 20:31:33 +01:00
Michael Albinus
3dd25aeecb Some minor Tramp corrections
* lisp/net/tramp.el (tramp-handle-directory-file-name):
Handle several trailing slashes correctly.
(tramp-handle-file-selinux-context): New defun.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-file-selinux-context'.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Extend test.
(tramp-test17-insert-directory): Make check more robust.
(tramp-test42-auto-load): Combine several let forms.
(tramp-test42-delay-load, tramp-test42-recursive-load)
(tramp-test42-remote-load-path, tramp-test43-unload): Rename.
2017-11-29 09:37:42 +01:00
Michael Albinus
06d05fec84 Fix Bug#29163
* lisp/net/tramp.el (tramp-autoload-file-name-regexp):
Do not use "\\'" in regexp.  (Bug#29163)
(top) Do not run (tramp-register-autoload-file-name-handlers)
when loading tramp.el.

* test/lisp/net/tramp-tests.el (tramp--test-mock-p): New defun.
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test41-asynchronous-requests): Use it.
(tramp-test42-auto-load): New test.
(tramp-test43-recursive-load, tramp-test44-remote-load-path)
(tramp-test45-delay-load, tramp-test46-unload): Rename.
2017-11-27 13:31:53 +01:00
Michael Albinus
55c5b12fa0 Add test for Bug#29423 in Tramp.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add test for Bug#29423.
2017-11-25 16:03:53 +01:00
Michael Albinus
504a56cf32 ; Fix last commit 2017-11-19 12:50:05 +01:00
Michael Albinus
a34e44e8ee ; Fix last commit
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)
2017-11-19 12:22:30 +01:00
Michael Albinus
a8892b4e62 Further fix for Bug#29291
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)
2017-11-19 12:11:18 +01:00
Michael Albinus
c355529bae Fix bug in tramp-handle-file-truename
* lisp/net/tramp.el (tramp-handle-file-truename): Expand localname.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Check also
relative symbolic links.
2017-11-18 14:24:03 +01:00
Michael Albinus
d8e0951d5f ; Remove Tramp test instrumentation. Do not merge
* test/Makefile.in: Remove instrumentation for tramp-tests.

* test/lisp/net/tramp-tests.el (tramp-test41-asynchronous-requests):
Remove instrumentation.
2017-11-17 13:14:58 +01:00
Paul Eggert
720322aab8 ; Spelling fixes 2017-11-16 00:01:00 -08:00
Michael Albinus
a5ec644caa Fix Bug#29291
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Preserve permissions when copying.  (Bug#29291)
2017-11-14 10:38:41 +01:00
Michael Albinus
8b900e5ba2 Fix Bug#2928
* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Enhance test.  (Bug#29287)
(tramp-test44-delay-load): Fix for older Emacsen.
2017-11-14 10:21:55 +01:00
Michael Albinus
48ad00390d Fix Bug#29225
* src/fileio.c (Fset_file_acl): Report error only when
acl_errno_valid returns true.  (Bug#29225)

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl)
(tramp-test25-file-selinux): New tests.
(tramp-test26-file-name-completion, tramp-test27-load)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-interrupt-process, tramp-test31-shell-command)
(tramp-test32-environment-variables)
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test33-explicit-shell-file-name)
(tramp-test34-vc-registered)
(tramp-test35-make-auto-save-file-name)
(tramp-test36-find-backup-file-name)
(tramp-test37-make-nearby-temp-file)
(tramp-test38-special-characters)
(tramp-test38-special-characters-with-stat)
(tramp-test38-special-characters-with-perl)
(tramp-test38-special-characters-with-ls, tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls, tramp-test40-file-system-info)
(tramp-test41-asynchronous-requests)
(tramp-test42-recursive-load, tramp-test43-remote-load-path)
(tramp-test44-delay-load, tramp-test45-unload): Rename.
2017-11-12 13:06:09 +01:00
Glenn Morris
795bb233a5 * test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards):
Clean up properly.
2017-11-06 18:50:53 -05:00
Michael Albinus
ca2d94ba61 Do not load Tramp unless `tramp-mode' is non-nil
* lisp/net/tramp.el (tramp-autoload-file-name-handler): Load Tramp only if
`tramp-mode' is non-nil.
(tramp-unload-file-name-handlers): Unload also
`tramp-autoload-file-name-handler'.

* test/lisp/net/tramp-tests.el (tramp-test42-delay-load): Extend test.
2017-11-05 20:08:05 +01:00
Michael Albinus
646e56e150 Fix Bug#28959
* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use `tramp-tramp-file-p' rather than `tramp-file-name-p'.  Add
hop to backup file name.  (Bug#28959)

* test/lisp/net/tramp-tests.el (tramp-test34-find-backup-file-name):
New test.
(tramp-test35-make-nearby-temp-file)
(tramp-test36-special-characters)
(tramp-test36-special-characters-with-stat)
(tramp-test36-special-characters-with-perl)
(tramp-test36-special-characters-with-ls, tramp-test37-utf8)
(tramp-test37-utf8-with-stat, tramp-test37-utf8-with-perl)
(tramp-test37-utf8-with-ls, tramp-test38-file-system-info)
(tramp-test39-asynchronous-requests)
(tramp-test40-recursive-load, tramp-test41-remote-load-path)
(tramp-test42-delay-load, tramp-test43-unload): Rename.
2017-10-26 16:24:28 +02:00
Michael Albinus
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): New test.
(tramp-test42-unload): Rename.
2017-10-24 11:55:20 +02:00
Michael Albinus
8093e82e42 Improve backward compatibility of tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-emacs26-p): Fix docstring.
(tramp-test41-unload): Skip unless Emacs >= 26.
2017-10-23 12:46:32 +02:00
Michael Albinus
b500e06f4d Fix Bug#28896
* lisp/net/tramp-adb.el (tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Handle FILENAME
being a directory.  (Bug#28896)

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Test also FILENAME being a directory.
2017-10-20 12:46:54 +02:00
Michael Albinus
3ea6a4d4ba Skip an rsync test in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Skip for "rsync".
2017-10-19 17:47:14 +02:00
Paul Eggert
5d51403ceb ; Typo fixes, mostly repeated words 2017-10-09 22:55:06 -07:00
Michael Albinus
1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory):
Handle PARENTS properly.

* test/lisp/net/tramp-tests.el (tramp-test13-make-directory):
Extend test.
2017-10-08 13:55:20 +02:00
Michael Albinus
a9ac20c179 Add support for `file-system-info' in Tramp
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-system-info'.

* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info): New defun.
(tramp-adb-file-name-handler-alist): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-system-attributes)
(tramp-gvfs-file-system-attributes-regexp): New defconst.
(tramp-gvfs-handle-file-system-info): New defun.
(tramp-gvfs-file-name-handler-alist): Use it.
(tramp-gvfs-get-directory-attributes): Fix property name.
(tramp-gvfs-get-root-attributes): Support also file system attributes.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-system-info): New defun.
(tramp-sh-file-name-handler-alist): Use it.
(tramp-sh-handle-insert-directory): Insert size information.
(tramp-get-remote-df): New defun.

* lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): New defun.
(tramp-smb-file-name-handler-alist): Use it.
(tramp-smb-handle-insert-directory): Insert size information.

* test/lisp/net/tramp-tests.el (tramp-test37-file-system-info):
New test.
(tramp-test38-asynchronous-requests)
(tramp-test39-recursive-load, tramp-test40-remote-load-path)
(tramp-test41-unload): Rename.
2017-10-03 16:07:32 +02:00
Paul Eggert
bbda601d1d ; Spelling fixes 2017-09-29 16:41:50 -07:00
Michael Albinus
49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb. 2017-09-25 17:52:24 +02:00
Michael Albinus
57249fb297 Fix compatibility problem in Tramp
* lisp/net/tramp.el (tramp-interrupt-process): Better error handling.

* lisp/net/tramp-compat.el (default-toplevel-value): Move up.
(top): Do not call `tramp-change-syntax' anymore.
(tramp-compat-directory-name-p): New defalias.

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Use it.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Modify test.
2017-09-17 19:16:59 +02:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Michael Albinus
4ab44f75d6 Improve backward compatibility of tramp-tests
* test/lisp/net/tramp-tests.el (seq): Don't require.
(tramp--test-emacs26-p): New defun.
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Use it.
(tramp-test16-file-expand-wildcards): Use `copy-sequence'.
2017-09-13 20:10:40 +02:00
Michael Albinus
49a42fbd27 Extend tramp-tests according to bug#27986
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Extend tests.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Specifiy error symbol in `should-error'.
2017-09-12 11:20:49 +02:00
Michael Albinus
7004545244 Further optimization in Tramp's file name decomposition
* lisp/net/tramp.el (tramp-syntax): Recompute all file name
components.  Call `custom-set-variables' after loading.
(tramp-build-prefix-format, tramp-build-prefix-regexp)
(tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format)
(tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp)
(tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp): New defuns.
(tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
(tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-file-name-regexp): Convert defuns into defvars.
(tramp-prefix-regexp-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist): Remove.
(tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): Simplify.
(tramp-completion-file-name-regexp-alist): New defconst.
(tramp-tramp-file-p, tramp-dissect-file-name)
(tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-register-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use variables but functions for
file name components.

* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Use variables but functions for file name components.
2017-09-11 17:12:32 +02:00
Paul Eggert
29963648dd Port tramp-tests to new copy-directory behavior
* test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
Use directory name as arg for copy-directory when we want
the special behavior.
2017-09-10 23:05:20 -07:00
Paul Eggert
01c885f21f Fix race with rename-file etc. with dir NEWNAME
This changes the behavior of rename-file etc. slightly.
The old behavior mostly disagreed with the documentation, and had
a race condition bug that could allow attackers to modify victims'
write-protected directories (Bug#27986).
* doc/lispref/files.texi (Changing Files): Document that in
rename-file etc., NEWFILE is special if it is a directory name.
* etc/NEWS: Document the change in behavior.
* src/fileio.c (directory_like): Remove.  All uses removed.
(expand_cp_target): Test only whether NEWNAME is a directory name,
not whether it is currently a directory.  This avoids a race.
(Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
Document behavior if NEWNAME is a directory name.
(Frename_file): Simplify now that the destdir behavior occurs
only when NEWNAME is a directory name.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp--test-check-files):
Adjust tests to match new behavior.
2017-09-10 15:46:51 -07:00
Mark Oteiza
9f64d59ae6 Add tests for mailcap.el
* test/data/mailcap/mime.types: New file.
* test/lisp/net/mailcap-tests.el: New file.
2017-09-05 11:55:01 -04:00
Michael Albinus
8a65d7a731 Work on Tramp's (symbolic) links
* doc/misc/tramp.texi (Traces and Profiles): Mention the
backtrace when tramp-verbose is greater than or equal to 10.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-add-name-to-file'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_CONNECTION_DISCONNECTED" and
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
(tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
(tramp-smb-do-file-attributes-with-stat): Return non-nil only
if one of the attributes is non-nil.
(tramp-smb-handle-file-local-copy): Use `file-truename'.
(tramp-smb-handle-file-truename): Move to tramp.el.
(tramp-smb-handle-insert-directory): Show symlinks.
(tramp-smb-handle-make-symbolic-link): Improve.
(tramp-smb-read-file-entry): Handle extended file modes in Samba.

* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-file-truename): New defuns.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp--test-check-files): Make check for "smb".
2017-09-04 13:10:52 +02:00
Michael Albinus
9376ea3f6c Improve symlinks for Tramp
* lisp/files.el (files--splice-dirname-file): Quote whole file.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
Do not expand TARGET, it could be remote.
(tramp-sh-handle-file-truename): Check for cyclic symlink also
in case of readlink.  Quote result if it looks remote.
(tramp-sh-handle-file-local-copy): Use `file-truename'.

* test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy)
(tramp-test09-insert-file-contents): Test also file missing.
(tramp-test21-file-links): Extend test.
2017-08-30 12:00:26 +02:00