[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 2fd4bf0 095/111: Improved vc-dir performance on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 2fd4bf0 095/111: Improved vc-dir performance on large repositories. |
Date: |
Wed, 29 Sep 2021 08:59:28 -0400 (EDT) |
branch: elpa/vc-fossil
commit 2fd4bf0113797fb3155f24087af4e281f8a0d8c3
Author: pdo <pdo>
Commit: pdo <pdo>
Improved vc-dir performance on large repositories.
Query fossil classification of all managed files up front, instead of
per-file when "fossil update" says UNCHANGED.
---
vc/el/vc-fossil.el | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 7c92165..60e1231 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -216,9 +216,22 @@ Allow user to edit command in minibuffer if PROMPT is
non-nil."
"Get fossil status for all files in a directory"
(vc-fossil--dir-status-files dir nil update-function))
+(defvar vc-fossil--file-classifications nil
+ "An alist of (filename . classification) pairs.")
+
+(defun vc-fossil--classify-all-files (dir)
+ (setq vc-fossil--file-classifications nil)
+ (let* ((default-directory dir)
+ (lines (split-string (vc-fossil--run "changes" "--classify" "--all")
"[\n\r]+" t)))
+ (dolist (line lines)
+ (string-match "^\\(\\w+\\)\\s-+\\(.+\\)$" line)
+ (let ((pair (cons (match-string 2 line) (match-string 1 line))))
+ (push pair vc-fossil--file-classifications)))))
+
(defun vc-fossil--dir-status-files (dir files update-function)
"Get fossil status for all specified files in a directory.
If `files` is nil return the status for all files."
+ (vc-fossil--classify-all-files dir)
(insert (apply 'vc-fossil--run "update" "-n" "-v" "current"
(or files (list dir))))
(let ((result '())
@@ -235,9 +248,7 @@ If `files` is nil return the status for all files."
(setq file (file-relative-name file dir))
;; if 'fossil update' says file is UNCHANGED check to see if it
has been RENAMED
(when (or (not state) (eql state 'up-to-date))
- (let ((line (vc-fossil--run "changes" "--classify" "--unchanged"
"--renamed"
- (file-truename file))))
- (setq state (and line (vc-fossil-state-code (car (split-string
line)))))))
+ (setq state (vc-fossil-state-code (cdr (assoc file
vc-fossil--file-classifications)))))
(push (list file state) result)))
(forward-line)))
;; now collect untracked files
@@ -264,8 +275,6 @@ If `files` is nil return the status for all files."
(concat (propertize name 'face 'font-lock-type-face)
(propertize value 'face 'font-lock-variable-name-face)))
-(defun vc-fossil-checkout-model (files) 'implicit)
-
(defun vc-fossil-dir-extra-headers (dir)
(let ((info (vc-fossil--run "info"))
(settings (vc-fossil--run "settings"))
- [nongnu] elpa/vc-fossil a57356e 061/111: Refactor find-revision command., (continued)
- [nongnu] elpa/vc-fossil a57356e 061/111: Refactor find-revision command., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 866bd8d 059/111: Use relative file names in print-log command., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil be45ea1 066/111: Declare some unknown function and variables., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil ac82044 065/111: Do not raise errors in next-revision and previous-revision commands., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 007187d 075/111: Merge changes from pdo for emacs 25 support, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 67855dd 081/111: Fixed accidental breakage in last commit., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil e0d3521 085/111: Enforced double-dash internal function convention., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 1bef549 109/111: From Upstream: ams: Add (vc-fossil-link), ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 6beb2f2 092/111: Merge old trunk I hope, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 4e95c73 094/111: Merged., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 2fd4bf0 095/111: Improved vc-dir performance on large repositories.,
ELPA Syncer <=
- [nongnu] elpa/vc-fossil aff450c 018/111: deal with some compiler warnings (assignments to line etc remain), ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 0921094 023/111: whitespace and fiddle with a instructions comment, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil eeb48f4 024/111: fiddle with some if constructs so I can read this, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 5e71178 029/111: ideomatic lisp, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil adb17bc 034/111: Use file-truename in vc-fossil-state otherwise status is not returned if called from outside a fossil tree, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 13a0a69 036/111: Untabify, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 1319569 041/111: Show unregistered files in dir stat., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil f0f81f8 043/111: Fix `vc-fossil-find-revision`., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 49552ae 046/111: Delete and rename modify working directory., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 798b503 054/111: Fix file name expansion in log command., ELPA Syncer, 2021/09/29