]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve vc-svn-list-files
authorTassilo Horn <tsdh@gnu.org>
Fri, 13 Sep 2019 20:25:55 +0000 (22:25 +0200)
committerTassilo Horn <tsdh@gnu.org>
Fri, 13 Sep 2019 20:25:55 +0000 (22:25 +0200)
lisp/progmodes/project.el
lisp/vc/vc-bzr.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-svn.el
lisp/vc/vc.el

index 2fd4671e5bca602e7606f8c6bf58a79156610379..dab268361237ab41765a1e602aa399937b026c41 100644 (file)
@@ -225,7 +225,7 @@ to find the list of ignores for each directory."
   :type '(repeat string)
   :safe 'listp)
 
-(defcustom project-vc-project-files-backends '(Bzr Git Hg)
+(defcustom project-vc-project-files-backends '(Bzr Git Hg SVN)
   "List of vc backends which should be used by `project-files'.
 
 For projects using a backend in this list, `project-files' will
@@ -237,10 +237,8 @@ Note that this imposes some differences in semantics:
 - The vc backends list tracked files whereas \"find\" lists
   existing files.
 
-- The performance differs vastly.  The Git backend list files
-  very fast (and generally faster than \"find\") while the SVN
-  backend does so by querying the remote subversion server, i.e.,
-  it requires a network connection and is slow."
+- The performance differs depending on operating system,
+  filesystem, and hardware."
   :type `(set ,@(mapcar (lambda (b) `(const :tag ,(format "%s" b) ,b))
                         vc-handled-backends))
   :version "27.1")
index a12b78e73cb623a0bd66d99ddd8f76b7f5bb2fc9..3f0491c88478e42ddf53aa0dc9d88e86a0fbb1ea 100644 (file)
@@ -1319,7 +1319,7 @@ stream.  Standard error output is discarded."
 
 (declare-function cl-remove-if "cl-seq")
 
-(defun vc-bzr-list-files (&optional dir _args)
+(defun vc-bzr-list-files (&optional dir)
   (let ((default-directory (or dir default-directory)))
     (mapcar
      #'expand-file-name
index 1ff599c585c22cae561e0a22ac01af5e41028e1d..abb50129f535a164e49341f22b57c256c528fe47 100644 (file)
@@ -1709,7 +1709,7 @@ Returns nil if not possible."
 
 (declare-function cl-remove-if "cl-seq")
 
-(defun vc-git-list-files (&optional dir _args)
+(defun vc-git-list-files (&optional dir)
   (let ((default-directory (or dir default-directory)))
     (mapcar
      #'expand-file-name
index 613d2d6961156e51e16cef6e51ac84e27a277cdc..5b3493d1734741b09993e74c9b501b03927e1797 100644 (file)
@@ -1458,7 +1458,7 @@ This function differs from vc-do-command in that it invokes
 (defun vc-hg-root (file)
   (vc-find-root file ".hg"))
 
-(defun vc-hg-list-files (&optional dir _args)
+(defun vc-hg-list-files (&optional dir)
   (let ((default-directory (or dir default-directory)))
     (mapcar
      #'expand-file-name
index 4ced1caa60fa2eadc033b4134cf90902f4f5191e..dd240feb58cdbd5ae4697b6b606223d68f21d3d5 100644 (file)
@@ -813,17 +813,20 @@ Set file properties accordingly.  If FILENAME is non-nil, return its status."
 
 (declare-function cl-remove-if "cl-seq")
 
-(defun vc-svn-list-files (&optional dir _args)
-  (let ((default-directory (or dir default-directory)))
-    (mapcar
-     #'expand-file-name
-     (cl-remove-if #'string-empty-p
-                   (split-string
-                    (with-output-to-string
-                      (with-current-buffer standard-output
-                        (vc-svn-command t 0 "."
-                                        "list" "--recursive")))
-                    "\n")))))
+(defun vc-svn-list-files (&optional dir)
+  (let ((default-directory (or dir default-directory))
+        files)
+    (with-temp-buffer
+      (vc-svn-command t 0 "."
+                      "info" "--recursive"
+                      "--show-item" "relative-url"
+                      "--show-item" "kind")
+      (goto-char (point-min))
+      (message "%s" (buffer-string))
+      (while (re-search-forward "^file\s+\\(.*\\)$" nil t)
+        (setq files (cons (expand-file-name (match-string 1))
+                          files))))
+    (nreverse files)))
 
 (provide 'vc-svn)
 
index 047b8ee465fa46b20be456220380d75abb05d320..c8b0488977f796203344baca1e57cc8ad2268098 100644 (file)
@@ -3108,7 +3108,7 @@ Invoke FUNC f ARGS on each VC-managed file f underneath it."
 
 \f
 
-(defun vc-default-list-files (_backend &optional dir _args)
+(defun vc-default-list-files (_backend &optional dir)
   (let* ((default-directory (or dir default-directory))
          (inhibit-message t)
          files)