Commit b9e2a91e authored by Michael Albinus's avatar Michael Albinus

Rename Tramp method "owncloud" to "nextcloud"

In the spirit of freedom, "nextcloud" is preferred over "owncloud".

* doc/misc/tramp.texi (Quick Start Guide, GVFS based methods):
* etc/NEWS: Rename "owncloud" method to "nextcloud".

* lisp/net/tramp-gvfs.el (tramp-gvfs-methods, tramp-goa-methods)
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
(tramp-get-goa-accounts): Use "nextcloud" instead of "owncloud".
(tramp-gvfs-nextcloud-default-prefix)
(tramp-gvfs-nextcloud-default-prefix-regexp): Rename them.  Adapt
all callees.

* test/lisp/net/tramp-tests.el (tramp--test-nextcloud-p):
Rename from `tramp--test-owncloud-p'.
(tramp-test11-copy-file, tramp-test12-rename-file): Use it.
parent 5dc3d0a9
......@@ -544,9 +544,9 @@ file system), @file{@trampfn{dav,user@@host,/path/to/file}} and
@cindex method @option{gdrive}
@cindex @option{gdrive} method
@cindex google drive
@cindex method @option{owncloud}
@cindex @option{owncloud} method
@cindex nextcloud
@cindex method @option{nextcloud}
@cindex @option{nextcloud} method
@cindex owncloud
GVFS-based methods include also @acronym{GNOME} Online Accounts, which
support the @option{Files} service. These are the Google Drive file
......@@ -554,7 +554,7 @@ system, and the OwnCloud/NextCloud file system. The file name syntax
is here always
@file{@trampfn{gdrive,john.doe@@gmail.com,/path/to/file}}
(@samp{john.doe@@gmail.com} stands here for your Google Drive
account), or @file{@trampfn{owncloud,user@@host#8081,/path/to/file}}
account), or @file{@trampfn{nextcloud,user@@host#8081,/path/to/file}}
(@samp{8081} stands for the port number) for OwnCloud/NextCloud files.
......@@ -1096,7 +1096,7 @@ but with SSL encryption. Both methods support the port numbers.
Paths being part of the WebDAV volume to be mounted by GVFS, as it is
common for OwnCloud or NextCloud file names, are not supported by
these methods. See method @option{owncloud} for handling them.
these methods. See method @option{nextcloud} for handling them.
@item @option{gdrive}
@cindex method @option{gdrive}
......@@ -1114,13 +1114,13 @@ Since Google Drive uses cryptic blob file names internally,
could produce unexpected behavior in case two files in the same
directory have the same @code{display-name}, such a situation must be avoided.
@item @option{owncloud}
@item @option{nextcloud}
@cindex @acronym{GNOME} Online Accounts
@cindex method @option{owncloud}
@cindex @option{owncloud} method
@cindex nextcloud
@cindex method @option{nextcloud}
@cindex @option{nextcloud} method
@cindex owncloud
As the name indicates, the method @option{owncloud} allows you to
As the name indicates, the method @option{nextcloud} allows you to
access OwnCloud or NextCloud hosted files and directories. Like the
@option{gdrive} method, your credentials must be populated in your
@command{Online Accounts} application outside Emacs. The method
......@@ -1139,7 +1139,7 @@ that for security reasons refuse @command{ssh} connections.
@defopt tramp-gvfs-methods
This user option is a list of external methods for GVFS@. By default,
this list includes @option{afp}, @option{dav}, @option{davs},
@option{gdrive}, @option{owncloud} and @option{sftp}. Other methods
@option{gdrive}, @option{nextcloud} and @option{sftp}. Other methods
to include are @option{ftp}, @option{http}, @option{https} and
@option{smb}. These methods are not intended to be used directly as
GVFS based method. Instead, they are added here for the benefit of
......
......@@ -598,7 +598,7 @@ process. It now accepts signals specified either by name or by its number.
** Tramp
+++
*** New connection method "owncloud", which allows to access OwnCloud
*** New connection method "nextcloud", which allows to access OwnCloud
or NextCloud hosted files and directories.
+++
......
......@@ -49,9 +49,9 @@
;; The user option `tramp-gvfs-methods' contains the list of supported
;; connection methods. Per default, these are "afp", "dav", "davs",
;; "gdrive", "owncloud" and "sftp".
;; "gdrive", "nextcloud" and "sftp".
;; "gdrive" and "owncloud" connection methods require a respective
;; "gdrive" and "nextcloud" connection methods require a respective
;; account in GNOME Online Accounts, with enabled "Files" service.
;; Other possible connection methods are "ftp", "http", "https" and
......@@ -121,7 +121,7 @@
;;;###tramp-autoload
(defcustom tramp-gvfs-methods
'("afp" "dav" "davs" "gdrive" "owncloud" "sftp")
'("afp" "dav" "davs" "gdrive" "nextcloud" "sftp")
"List of methods for remote files, accessed with GVFS."
:group 'tramp
:version "27.1"
......@@ -132,11 +132,11 @@
(const "gdrive")
(const "http")
(const "https")
(const "owncloud")
(const "nextcloud")
(const "sftp")
(const "smb"))))
(defconst tramp-goa-methods '("gdrive" "owncloud")
(defconst tramp-goa-methods '("gdrive" "nextcloud")
"List of methods which require registration at GNOME Online Accounts.")
;; Remove GNOME Online Accounts methods if not supported.
......@@ -511,11 +511,11 @@ It has been changed in GVFS 1.14.")
":[[:blank:]]+\\(.*\\)$")
"Regexp to parse GVFS file system attributes with `gvfs-info'.")
(defconst tramp-gvfs-owncloud-default-prefix "/remote.php/webdav"
(defconst tramp-gvfs-nextcloud-default-prefix "/remote.php/webdav"
"Default prefix for owncloud / nextcloud methods.")
(defconst tramp-gvfs-owncloud-default-prefix-regexp
(concat (regexp-quote tramp-gvfs-owncloud-default-prefix) "$")
(defconst tramp-gvfs-nextcloud-default-prefix-regexp
(concat (regexp-quote tramp-gvfs-nextcloud-default-prefix) "$")
"Regexp of default prefix for owncloud / nextcloud methods.")
......@@ -1380,7 +1380,7 @@ file-notify events."
(with-parsed-tramp-file-name filename nil
(when (string-equal "gdrive" method)
(setq method "google-drive"))
(when (string-equal "owncloud" method)
(when (string-equal "nextcloud" method)
(setq method "davs"
localname
(concat (tramp-gvfs-get-remote-prefix v) localname)))
......@@ -1543,8 +1543,8 @@ file-notify events."
(setq method "davs"))
(when (and (string-equal "davs" method)
(string-match
tramp-gvfs-owncloud-default-prefix-regexp prefix))
(setq method "owncloud"))
tramp-gvfs-nextcloud-default-prefix-regexp prefix))
(setq method "nextcloud"))
(when (string-equal "google-drive" method)
(setq method "gdrive"))
(when (and (string-equal "http" method) (stringp uri))
......@@ -1633,8 +1633,8 @@ file-notify events."
(setq method "davs"))
(when (and (string-equal "davs" method)
(string-match
tramp-gvfs-owncloud-default-prefix-regexp prefix))
(setq method "owncloud"))
tramp-gvfs-nextcloud-default-prefix-regexp prefix))
(setq method "nextcloud"))
(when (string-equal "google-drive" method)
(setq method "gdrive"))
(when (and (string-equal "http" method) (stringp uri))
......@@ -1688,7 +1688,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
(localname (tramp-file-name-unquote-localname vec))
(share (when (string-match "^/?\\([^/]+\\)" localname)
(match-string 1 localname)))
(ssl (if (string-match "^davs\\|^owncloud" method) "true" "false"))
(ssl (if (string-match "^davs\\|^nextcloud" method) "true" "false"))
(mount-spec
`(:array
,@(cond
......@@ -1696,7 +1696,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
(list (tramp-gvfs-mount-spec-entry "type" "smb-share")
(tramp-gvfs-mount-spec-entry "server" host)
(tramp-gvfs-mount-spec-entry "share" share)))
((string-match "^dav\\|^owncloud" method)
((string-match "^dav\\|^nextcloud" method)
(list (tramp-gvfs-mount-spec-entry "type" "dav")
(tramp-gvfs-mount-spec-entry "host" host)
(tramp-gvfs-mount-spec-entry "ssl" ssl)))
......@@ -1707,6 +1707,9 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
((string-equal "gdrive" method)
(list (tramp-gvfs-mount-spec-entry "type" "google-drive")
(tramp-gvfs-mount-spec-entry "host" host)))
((string-equal "nextcloud" method)
(list (tramp-gvfs-mount-spec-entry "type" "owncloud")
(tramp-gvfs-mount-spec-entry "host" host)))
((string-match "^http" method)
(list (tramp-gvfs-mount-spec-entry "type" "http")
(tramp-gvfs-mount-spec-entry
......@@ -1980,6 +1983,8 @@ VEC is used only for traces."
:port (match-string 3 identity)))
(when (string-equal (tramp-goa-name-method key) "google")
(setf (tramp-goa-name-method key) "gdrive"))
(when (string-equal (tramp-goa-name-method key) "owncloud")
(setf (tramp-goa-name-method key) "nextcloud"))
;; Cache all properties.
(dolist (prop (nconc account-properties files-properties))
(tramp-set-connection-property key (car prop) (cdr prop)))
......@@ -2086,7 +2091,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi."
;; * (Customizable) unmount when exiting Emacs. See tramp-archive.el.
;; * Host name completion for existing mount points (afp-server,
;; smb-server, google-drive, owncloud) or via smb-network or network.
;; smb-server, google-drive, nextcloud) or via smb-network or network.
;;
;; * Check, how two shares of the same SMB server can be mounted in
;; parallel.
......
......@@ -2182,7 +2182,7 @@ This checks also `file-name-as-directory', `file-name-directory',
(unwind-protect
;; FIXME: This fails on my QNAP server, see
;; /share/Web/owncloud/data/owncloud.log
(unless (tramp--test-owncloud-p)
(unless (tramp--test-nextcloud-p)
(write-region "foo" nil source)
(should (file-exists-p source))
(make-directory target)
......@@ -2205,7 +2205,7 @@ This checks also `file-name-as-directory', `file-name-directory',
(unwind-protect
;; FIXME: This fails on my QNAP server, see
;; /share/Web/owncloud/data/owncloud.log
(unless (and (tramp--test-owncloud-p)
(unless (and (tramp--test-nextcloud-p)
(or (not (file-remote-p source))
(not (file-remote-p target))))
(make-directory source)
......@@ -2231,7 +2231,7 @@ This checks also `file-name-as-directory', `file-name-directory',
;; FIXME: This fails on my QNAP server, see
;; /share/Web/owncloud/data/owncloud.log
(unless
(and (tramp--test-owncloud-p) (not (file-remote-p source)))
(and (tramp--test-nextcloud-p) (not (file-remote-p source)))
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
......@@ -2320,7 +2320,7 @@ This checks also `file-name-as-directory', `file-name-directory',
(unwind-protect
;; FIXME: This fails on my QNAP server, see
;; /share/Web/owncloud/data/owncloud.log
(unless (tramp--test-owncloud-p)
(unless (tramp--test-nextcloud-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
......@@ -2344,7 +2344,7 @@ This checks also `file-name-as-directory', `file-name-directory',
(unwind-protect
;; FIXME: This fails on my QNAP server, see
;; /share/Web/owncloud/data/owncloud.log
(unless (tramp--test-owncloud-p)
(unless (tramp--test-nextcloud-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
......@@ -4427,10 +4427,10 @@ This does not support external Emacs calls."
(string-equal
"mock" (file-remote-p tramp-test-temporary-file-directory 'method)))
(defun tramp--test-owncloud-p ()
"Check, whether the owncloud method is used."
(defun tramp--test-nextcloud-p ()
"Check, whether the nextcloud method is used."
(string-equal
"owncloud" (file-remote-p tramp-test-temporary-file-directory 'method)))
"nextcloud" (file-remote-p tramp-test-temporary-file-directory 'method)))
(defun tramp--test-rsync-p ()
"Check, whether the rsync method is used.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment