1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00
emacs/test/lisp/net
Michael Albinus d35868bec9 Implement file locks for remote files (Bug#49261)
* doc/lispref/files.texi (Magic File Names): Add file-locked-p,
lock-file and unlock-file.

* etc/NEWS: Tramp supports file locks now.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-adb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): New defun.

* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
(tramp-fuse-unmount): New defun.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sh-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-smb-handle-copy-directory): Use `sleep-for'.
(tramp-smb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sshfs-handle-write-region): Handle LOCKNAME.
(tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sudoedit-maybe-open-connection):
Set "lock-pid" connection property.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
(tramp-handle-file-locked-p, tramp-handle-lock-file)
(tramp-handle-unlock-file): New defuns.
(tramp-lock-file-contents-regexp): New regexp.
(tramp-handle-write-region): Handle LOCKNAME.

* src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
Call handler if exists.
(Flock_file, Funlock_file): New defuns.
(Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
(Slock_file, Sunlock_file): Declare subroutines.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test40-make-nearby-temp-file)
(tramp-archive-test43-file-system-info): Rename.

* test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
(tramp--test-fuse-p): New defun.
(tramp-test14-delete-directory): Use it.
(tramp-test39-lock-file): New test.
(tramp-test40-make-nearby-temp-file)
(tramp-test41-special-characters)
(tramp-test41-special-characters-with-stat)
(tramp-test41-special-characters-with-perl)
(tramp-test41-special-characters-with-ls, tramp-test42-utf8)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
(tramp-test44-asynchronous-requests, tramp-test45-auto-load)
(tramp-test45-delay-load, tramp-test45-recursive-load)
(tramp-test45-remote-load-path, tramp-test46-unload): Rename.
(tramp--test-special-characters, tramp--test-utf8)
(tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 18:36:53 +02:00
..
dbus-resources Add D-Bus introspection tests 2020-09-30 11:19:41 +02:00
mailcap-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
netrc-resources Use lexical-binding in netrc.el and add tests 2020-10-28 03:24:18 +01:00
network-stream-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
ntlm-resources Implement NTLM server for ntlm.el testing 2021-02-18 18:59:18 -05:00
shr-resources Move shr.el test data to follow our conventions 2020-10-24 02:29:04 +02:00
tramp-archive-resources
browse-url-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dbus-tests.el Add command 'dbus-monitor' 2021-02-05 14:32:41 +01:00
dig-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
gnutls-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
hmac-md5-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mailcap-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
netrc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
network-stream-tests.el Re-enable network-stream-tests.el :nowait t tests 2021-02-25 16:44:43 +01:00
newsticker-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
nsm-tests.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
ntlm-tests.el ntlm-tests: Remove missing dependency warnings 2021-02-19 17:11:42 -05:00
puny-tests.el Fix Bootstring skew parameter in puny.el 2021-03-01 14:05:36 +01:00
rcirc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
rfc2104-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sasl-cram-tests.el Use lexical-binding in sasl.el and add tests 2021-01-29 20:11:38 +01:00
sasl-scram-rfc-tests.el ; Minor license statement fixes 2021-02-08 09:10:57 +01:00
sasl-tests.el Use lexical-binding in sasl.el and add tests 2021-01-29 20:11:38 +01:00
secrets-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
shr-tests.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
socks-tests.el Mute noisy test fixture for socks.el 2021-02-20 17:15:44 +02:00
tramp-archive-tests.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-tests.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
webjump-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00