1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 08:31:09 -08:00
emacs/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
..
ange-ftp.el Mention the -e switch in an ange-ftp doc string 2021-05-28 01:24:37 +02:00
browse-url.el Clarify some browse-url doc strings 2021-06-12 15:07:07 +02:00
dbus.el
dictionary-connection.el
dictionary.el
dig.el Allow `C-u M-x dig' to ask for a query type 2021-06-24 18:51:38 +02:00
dns.el
eudc-bob.el
eudc-export.el
eudc-hotlist.el
eudc-vars.el
eudc.el In files that use allout use it for all headings 2021-06-30 22:17:01 +02:00
eudcb-bbdb.el
eudcb-ldap.el
eudcb-mab.el
eudcb-macos-contacts.el
eww.el Add command in eww to toggle images 2021-04-12 10:31:46 +02:00
gnutls.el
goto-addr.el * lisp/**/*.el: Avoid positional args to define-minor-mode 2021-04-11 23:47:14 -04:00
hmac-def.el
hmac-md5.el
imap.el * lisp/net/imap.el (imap-mailbox-close): Use proper closures 2021-05-18 19:12:11 -04:00
ldap.el
mailcap.el Add a new command `mailcap-view-file' 2021-06-01 08:55:06 +02:00
mairix.el Mairix: use 'mairix-search-options' as documented 2021-05-15 11:12:00 +03:00
net-utils.el Fix launching net-utils on MS-Windows 2021-05-15 12:38:01 +03:00
netrc.el
network-stream.el
newst-backend.el Replace local intersection functions with seq-intersection 2021-04-05 11:14:34 +02:00
newst-plainview.el
newst-reader.el
newst-ticker.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
newst-treeview.el
newsticker.el
nsm.el
ntlm.el
pop3.el
puny.el
quickurl.el
rcirc.el Merge from origin/emacs-27 2021-07-04 00:14:47 -04:00
rfc2104.el
rlogin.el
sasl-cram.el
sasl-digest.el
sasl-ntlm.el
sasl-scram-rfc.el
sasl-scram-sha256.el
sasl.el
secrets.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
shr-color.el
shr.el Add faces for shr heading elements (bug#49433) 2021-07-06 17:06:17 +02:00
sieve-manage.el * lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures 2021-05-18 19:23:54 -04:00
sieve-mode.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
sieve.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
snmp-mode.el
soap-client.el
soap-inspect.el
socks.el
telnet.el
tramp-adb.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-archive.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-cache.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-cmds.el Improve Tramp traces 2021-05-13 16:46:17 +02:00
tramp-compat.el Tune Tramp traces 2021-05-07 13:04:28 +02:00
tramp-crypt.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-ftp.el
tramp-fuse.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-gvfs.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-integration.el Fix bug#48476 2021-05-22 17:51:07 +02:00
tramp-rclone.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-sh.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-smb.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-sshfs.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-sudoedit.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
tramp-uu.el
tramp.el Implement file locks for remote files (Bug#49261) 2021-07-07 18:36:53 +02:00
trampver.el Sync with Tramp 2.5.1 2021-06-29 17:15:55 +02:00
webjump.el
zeroconf.el