emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b9e2a91: Rename Tramp method "owncloud" to "nextclo


From: Michael Albinus
Subject: [Emacs-diffs] master b9e2a91: Rename Tramp method "owncloud" to "nextcloud"
Date: Sat, 4 Aug 2018 06:05:46 -0400 (EDT)

branch: master
commit b9e2a91ec5b005c624eaca32064dc60b5f3131f9
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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.
---
 doc/misc/tramp.texi          | 22 +++++++++++-----------
 etc/NEWS                     |  2 +-
 lisp/net/tramp-gvfs.el       | 37 +++++++++++++++++++++----------------
 test/lisp/net/tramp-tests.el | 16 ++++++++--------
 4 files changed, 41 insertions(+), 36 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 463f10e..55c21b7 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -544,9 +544,9 @@ file system), @address@hidden,user@@host,/path/to/file}} and
 @cindex method @option{gdrive}
 @cindex @option{gdrive} method
 @cindex google drive
address@hidden method @option{owncloud}
address@hidden @option{owncloud} method
address@hidden nextcloud
address@hidden method @option{nextcloud}
address@hidden @option{nextcloud} method
address@hidden 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
 @address@hidden,john.doe@@gmail.com,/path/to/file}}
 (@samp{john.doe@@gmail.com} stands here for your Google Drive
-account), or @address@hidden,user@@host#8081,/path/to/file}}
+account), or @address@hidden,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.
 
address@hidden @option{owncloud}
address@hidden @option{nextcloud}
 @cindex @acronym{GNOME} Online Accounts
address@hidden method @option{owncloud}
address@hidden @option{owncloud} method
address@hidden nextcloud
address@hidden method @option{nextcloud}
address@hidden @option{nextcloud} method
address@hidden 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 address@hidden  By default,
 this list includes @option{afp}, @option{dav}, @option{davs},
address@hidden, @option{owncloud} and @option{sftp}.  Other methods
address@hidden, @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
diff --git a/etc/NEWS b/etc/NEWS
index 9c78bd5..2d5032f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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.
 
 +++
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 1f40339..84af410 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -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.
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 5c5eff8..c0298bb 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]