[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 1319569 041/111: Show unregistered files in dir
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 1319569 041/111: Show unregistered files in dir stat. |
Date: |
Wed, 29 Sep 2021 08:59:17 -0400 (EDT) |
branch: elpa/vc-fossil
commit 1319569a50f8da5dfb3257ab6a8cad39621a3caf
Author: fifr <fifr>
Commit: fifr <fifr>
Show unregistered files in dir stat.
The directory status should list untracked files. This is implemented
by a call to "fossil extras". Also implements
`vc-fossil-dir-status-files`.
---
vc/el/vc-fossil.el | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index f53d5e6..db27336 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -123,24 +123,37 @@
(defun vc-fossil-dir-status (dir update-function)
- "Get Fossil status for all files in a directory"
- (insert (vc-fossil--run "update" "-n" "-v" "current" dir))
+ "Get fossil status for all files in a directory"
+ (vc-fossil-dir-status-files dir nil nil update-function))
+
+(defun vc-fossil-dir-status-files (dir files default-state update-function)
+ "Get fossil status for all specified files in a directory.
+If `files` is nil return the status for all files."
+ (insert (apply 'vc-fossil--run "update" "-n" "-v" "current"
+ (or files (list dir))))
(let ((result '())
(root (vc-fossil-root dir)))
(goto-char (point-min))
(while (not (eobp))
- (let* ((line (buffer-substring-no-properties
- (point)
- (progn
- (forward-line)
- (point))))
+ (let* ((line (buffer-substring-no-properties (point)
(line-end-position)))
(status-word (car (split-string line))))
(if (string-match "-----" status-word)
(goto-char (point-max))
(let ((file (substring line (+ (length status-word) 1))))
(setq file (expand-file-name file root))
(setq file (file-relative-name file dir))
- (push (list file (vc-fossil-state-code status-word)) result)))))
+ (push (list file (vc-fossil-state-code status-word)) result)))
+ (forward-line)))
+ ;; now collect untracked files
+ (delete-region (point-min) (point-max))
+ (insert (apply 'vc-fossil--run "extras" "--dotfiles" (or files (list
dir))))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (let ((file (buffer-substring-no-properties (point)
(line-end-position))))
+ (setq file (expand-file-name file dir))
+ (setq file (file-relative-name file dir))
+ (push (list file (vc-fossil-state-code nil)) result)
+ (forward-line)))
(funcall update-function result nil)))
(defun vc-fossil-checkout-model (files) 'implicit)
- [nongnu] elpa/vc-fossil 1bef549 109/111: From Upstream: ams: Add (vc-fossil-link), (continued)
- [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, 2021/09/29
- [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 <=
- [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
- [nongnu] elpa/vc-fossil 9f31709 055/111: Fix diff command if old rev is not specified., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 0ab9dce 057/111: Implement diff for the root directory., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 141937e 062/111: Fix checkout command for special revisions., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil ec8c00c 058/111: Fix extraction of revision in annotate buffer., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 6eb44a2 064/111: Refactor next-revision and previous-revision commands., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 85119b6 068/111: Merge devel., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil dffd034 069/111: Pipe commit message through log-edit-extract-headers., ELPA Syncer, 2021/09/29