[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil c63995e 074/111: Added ability to cope with rena
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil c63995e 074/111: Added ability to cope with renamed files. |
Date: |
Wed, 29 Sep 2021 08:59:24 -0400 (EDT) |
branch: elpa/vc-fossil
commit c63995ec0b6351afa2b93b4edb787f5a6f1aada9
Author: pdo <pdo>
Commit: pdo <pdo>
Added ability to cope with renamed files.
---
vc/el/vc-fossil.el | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index f127c43..1941a0e 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -139,13 +139,21 @@ If nil, use the value of `vc-diff-switches'. If t, use
no switches."
((string= code "REMOVE") 'removed)
((string= code "UPDATE") 'needs-update)
((string= code "MERGE") 'needs-merge)
+ ((string= code "EXTRA") 'unregistered)
+ ((string= code "MISSING") 'missing)
+ ((string= code "RENAMED") 'added)
(t nil)))
(defun vc-fossil-state (file)
"Fossil specific version of `vc-state'."
- (let ((line (vc-fossil--run "update" "-n" "-v" "current" (file-truename
file))))
- (and line
- (vc-fossil-state-code (car (split-string line))))))
+ (let* ((line (vc-fossil--run "update" "-n" "-v" "current" (file-truename
file)))
+ (state (vc-fossil-state-code (car (split-string line)))))
+ ;; 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)))))))
+ state))
(defun vc-fossil-working-revision (file)
"Fossil Specific version of `vc-working-revision'."
@@ -177,10 +185,16 @@ If `files` is nil return the status for all files."
(status-word (car (split-string line))))
(if (string-match "-----" status-word)
(goto-char (point-max))
- (let ((file (substring line (+ (length status-word) 1))))
+ (let ((file (substring line (+ (length status-word) 1)))
+ (state (vc-fossil-state-code status-word)))
(setq file (expand-file-name file root))
(setq file (file-relative-name file dir))
- (push (list file (vc-fossil-state-code status-word)) result)))
+ ;; 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)))))))
+ (push (list file state) result)))
(forward-line)))
;; now collect untracked files
(delete-region (point-min) (point-max))
- [nongnu] elpa/vc-fossil 9f31709 055/111: Fix diff command if old rev is not specified., (continued)
- [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
- [nongnu] elpa/vc-fossil 26c16f3 072/111: Create new branch named "pdo", ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 6f26a92 070/111: Implement the pull/update command., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 9b9736c 079/111: Add github mirror information and remove obsolete notes, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil c63995e 074/111: Added ability to cope with renamed files.,
ELPA Syncer <=
- [nongnu] elpa/vc-fossil b468088 083/111: Fixed accidental breakage., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil e0192e5 105/111: Bring in changes from upstream: Switch to using "fossil changes" (by ams)., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7bb3121 093/111: Push changes from pdo, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7815c30 111/111: vc-fossil.el: Update from fossil., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 31b0ee6 106/111: From ams: Work better when operating under a subdirectory. vc-fossil.el (vc-fossil--classify-all-files): List only files under directory we are in. (vc-fossil-dir-status-files): Since we are in DIR; don't try to figure out the relative name of the file., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil da4d895 084/111: Refactored header-line propertizing function., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 9f90307 097/111: Add changes from pdo, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7e84860 091/111: Attempted pushes. Sigh, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 73c5145 088/111: Tweaked :synchro and :checkout header line formats., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil d9190c0 100/111: Fossil at the end of the VC backends list., ELPA Syncer, 2021/09/29