[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 3c8fae8 016/111: Mulitple changes to allow 23.2
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 3c8fae8 016/111: Mulitple changes to allow 23.2 integration and to fix fossil-state-code incorrectly still using --file to update -n -v |
Date: |
Wed, 29 Sep 2021 08:59:12 -0400 (EDT) |
branch: elpa/vc-fossil
commit 3c8fae87b98b723fe344b790655390f93005cb64
Author: venkat <venkat>
Commit: venkat <venkat>
Mulitple changes to allow 23.2 integration and to fix fossil-state-code
incorrectly still using --file to update -n -v
---
vc/el/vc-fossil.el | 51 ++++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 1dbe03e..e1013b5 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -13,6 +13,7 @@
;; to the list of supported backends in `vc-handled-backends'
;;
;; e.g. (add-to-list 'vc-handled-backends 'Fossil)
+;; or (setq vc-handled-backends '(CVS Fossil))
;;; Implemented Functions
;; BACKEND PROPERTIES
@@ -92,26 +93,30 @@
(defun vc-fossil-state-code (code)
(if (not code)
'unregistered
- (let ((state (cond
- ((string= code "UNKNOWN") 'unregistered)
- ((string= code "UNCHANGED") 'up-to-date)
- ((string= code "CONFLICT") 'edited)
- ((string= code "ADDED") 'added)
- ((string= code "ADD") 'needs-update)
- ((string= code "EDITED") 'edited)
- ((string= code "REMOVE") 'removed)
- ((string= code "UPDATE") 'needs-update)
- ((string= code "MERGE") 'needs-merge))))
- (if state state
- (error "Cannot handle fossil state code %s" code)))))
-
-
-(defun vc-fossil-state (file)
+ (cond
+ ((string= code "UNKNOWN") 'unregistered)
+ ((string= code "UNCHANGED") 'up-to-date)
+ ((string= code "CONFLICT") 'edited)
+ ((string= code "ADDED") 'added)
+ ((string= code "ADD") 'needs-update)
+ ((string= code "EDITED") 'edited)
+ ((string= code "REMOVE") 'removed)
+ ((string= code "UPDATE") 'needs-update)
+ ((string= code "MERGE") 'needs-merge))))
+
+; (vc-fossil-state "/proj/fiesta/tools/fossil/emacs-fossil/vc/el/vc-fossil.el")
+
+(defun vc-fossil-state (file)
"Fossil specific version of `vc-state'."
; (message (format "vc-fossil-state on %s" file))
- (let ((line (vc-fossil--run "update" "-n" "-v" "--file" file)))
- (and line
- (vc-fossil-state-code (car (split-string line))))))
+ (with-temp-buffer
+ (insert (vc-fossil--run "update" "-n" "-v" "current" file))
+ (goto-char (point-max))
+ (forward-line -1)
+ (vc-fossil-state-code
+ (car
+ (split-string
+ (buffer-substring-no-properties (point) (buffer-end 1)))))))
(defun vc-fossil-working-revision (file)
"Fossil Specific version of `vc-working-revision'."
@@ -135,17 +140,13 @@
(goto-char (point-min))
(while (not (eobp))
(setq line (buffer-substring-no-properties (point) (line-end-position)))
- ;(message line)
(setq status-word (car (split-string line)))
(setq file (substring line (+ (length status-word) 1)))
- ;(message file)
(setq file (expand-file-name file root))
- ;(message file)
(setq file (file-relative-name file dir))
- ;(message file)
- (setq result
- (if (string-match ":" line) result
- (cons (list file (vc-fossil-state-code status-word)) result)))
+ (setq result (if (or (string-match ":" line)
+ (string-match "^[ \t]" line)) result
+ (cons (list file (vc-fossil-state-code status-word))
result)))
(forward-line))
(funcall update-function result nil)))
- [nongnu] elpa/vc-fossil 5a8e1a3 022/111: autoload in docs, (continued)
- [nongnu] elpa/vc-fossil 5a8e1a3 022/111: autoload in docs, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 0da61d3 025/111: standard comment style, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil fe3e0d3 035/111: Enable vc-ediff to work. Thanks to folks who contributed in [8521322bc9], ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil c642a01 042/111: Pass `vc-checkin-switches` on checkin., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil d844871 026/111: typo in emacs keystroke in documentation, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 419877b 030/111: squelch dead computation; clarify logic, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 403712d 032/111: Fossil gets confused traversing through symlinks. Use file-truename in multiple places to get past that., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 9d2d9f8 038/111: Refactoring of `vc-fossil-dir-status`., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil c1585fc 040/111: Remove `vc-fossil-after-dir-status`., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 54df12a 045/111: Fix parameter passing in `vc-fossil-find-revision`., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 3c8fae8 016/111: Mulitple changes to allow 23.2 integration and to fix fossil-state-code incorrectly still using --file to update -n -v,
ELPA Syncer <=
- [nongnu] elpa/vc-fossil 9856860 021/111: appropriate autoload, and consistent "add fossil" expression in docs, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 1d46c62 027/111: eschew some redundancy, and use modern apply syntax, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 0497f8f 037/111: Remove some old debug messages., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil f69eac0 047/111: Add end-of-file comment., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 3455e4a 049/111: Access command switches by `vc-switches`., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 4ce0039 052/111: Enable word-wrap with indentation in log view., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 03282dc 063/111: Implement next-revision command for whole repository., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil f68c80a 077/111: Merged enhanced vc-dir buffer header capability., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 6174102 078/111: Create README.md, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil b43a7e2 073/111: Added Emacs 25 compatibility., ELPA Syncer, 2021/09/29