[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/tsdh-vc-list-files dafbf99: ; Improve vc-svn-list-
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] scratch/tsdh-vc-list-files dafbf99: ; Improve vc-svn-list-files |
Date: |
Fri, 13 Sep 2019 16:26:30 -0400 (EDT) |
branch: scratch/tsdh-vc-list-files
commit dafbf9992c191ed507e8cbfb423acd029e4676cc
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
; Improve vc-svn-list-files
---
lisp/progmodes/project.el | 8 +++-----
lisp/vc/vc-bzr.el | 2 +-
lisp/vc/vc-git.el | 2 +-
lisp/vc/vc-hg.el | 2 +-
lisp/vc/vc-svn.el | 25 ++++++++++++++-----------
lisp/vc/vc.el | 2 +-
6 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2fd4671..dab2683 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -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")
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index a12b78e..3f0491c 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -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
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 1ff599c..abb5012 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -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
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 613d2d6..5b3493d 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -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
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 4ced1ca..dd240fe 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -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)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 047b8ee..c8b0488 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -3108,7 +3108,7 @@ Invoke FUNC f ARGS on each VC-managed file f underneath
it."
-(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] scratch/tsdh-vc-list-files dafbf99: ; Improve vc-svn-list-files,
Tassilo Horn <=