[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 007187d 075/111: Merge changes from pdo for emac
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 007187d 075/111: Merge changes from pdo for emacs 25 support |
Date: |
Wed, 29 Sep 2021 08:59:24 -0400 (EDT) |
branch: elpa/vc-fossil
commit 007187d9e7343960aa8e96fbf139b36d1700e563
Merge: 0aceef3 c63995e
Author: venks <venks>
Commit: venks <venks>
Merge changes from pdo for emacs 25 support
---
doc/index.wiki | 16 ++++++++++++++++
vc/el/vc-fossil.el | 49 ++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/doc/index.wiki b/doc/index.wiki
index ad6c3d5..dbb233d 100644
--- a/doc/index.wiki
+++ b/doc/index.wiki
@@ -60,3 +60,19 @@ A few are:
</table>
</table>
+
+<h4>Credits</h4>
+
+Over the years many folks have helped me (Venkat Iyer,
+venkat@comit.com) with building and improving emacs-fossil. Notable
+are:
+
+<ul>
+ <li>Barak A. Pearlmutter, barak pearlmutter net :
+ Major cleanup of my initial versions</li>
+ <li>Frank Fisher, frank-fischer shadow-soft de :
+ colorized logs, annotate, a few fixes for the diff</li>
+ <li>Paul Onions, ponions37 gmail com :
+ emacs 25 support</li>
+</ul>
+
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 68408a6..1941a0e 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -34,12 +34,13 @@
;; STATE-QUERYING FUNCTIONS
;; * registered (file)
;; * state (file) - 'up-to-date 'edited 'needs-patch 'needs-merge
+;; * dir-status-files (dir files uf)
;; * workfile-version (file)
;; * checkout-model (file)
;; - workfile-unchanged-p (file)
;; STATE-CHANGING FUNCTIONS
;; * register (file &optional rev comment)
-;; * checkin (file rev comment)
+;; * checkin (file comment &optional rev)
;; * find-version (file rev buffer)
;; * checkout (file &optional editable rev)
;; * revert (file &optional contents-done)
@@ -47,7 +48,7 @@
;; - responsible-p (file)
;; HISTORY FUNCTIONS
;; * print-log (file &optional buffer)
-;; * diff (file &optional rev1 rev2 buffer)
+;; * diff (file &optional rev1 rev2 buffer async)
;; MISCELLANEOUS
;; - delete-file (file)
;; - rename-file (old new)
@@ -138,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'."
@@ -161,9 +170,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no
switches."
(defun vc-fossil-dir-status (dir update-function)
"Get fossil status for all files in a directory"
- (vc-fossil-dir-status-files dir nil nil update-function))
+ (vc-fossil-dir-status-files-i dir nil update-function))
-(defun vc-fossil-dir-status-files (dir files default-state update-function)
+(defun vc-fossil-dir-status-files-i (dir files 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"
@@ -176,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))
@@ -193,6 +208,12 @@ If `files` is nil return the status for all files."
(forward-line)))
(funcall update-function result nil)))
+(if (>= emacs-major-version 25)
+ (defun vc-fossil-dir-status-files (dir files update-function)
+ (vc-fossil-dir-status-files-i dir files update-function))
+ (defun vc-fossil-dir-status-files (dir files default-state update-function)
+ (vc-fossil-dir-status-files-i dir files update-function)))
+
(defun vc-fossil-checkout-model (files) 'implicit)
(defun vc-fossil-dir-extra-headers (dir)
@@ -230,7 +251,7 @@ If `files` is nil return the status for all files."
(declare-function log-edit-extract-headers "log-edit" (headers string))
-(defun vc-fossil-checkin (files rev comment)
+(defun vc-fossil-checkin-i (files comment &optional rev)
(apply 'vc-fossil-command nil 0 files
(nconc (list "commit" "-m")
(log-edit-extract-headers
@@ -239,6 +260,12 @@ If `files` is nil return the status for all files."
comment)
(vc-switches 'Fossil 'checkin))))
+(if (>= emacs-major-version 25)
+ (defun vc-fossil-checkin (files comment &optional rev)
+ (vc-fossil-checkin-i files comment rev))
+ (defun vc-fossil-checkin (files rev comment)
+ (vc-fossil-checkin-i files comment rev)))
+
(defun vc-fossil-find-revision (file rev buffer)
(apply #'vc-fossil-command buffer 0 file
"cat"
@@ -332,7 +359,7 @@ Fossil pull command. The default is \"fossil update\"."
(1 'change-log-date))))))
;; TODO: implement diff for directories
-(defun vc-fossil-diff (files &optional rev1 rev2 buffer)
+(defun vc-fossil-diff (files &optional rev1 rev2 buffer async)
"Get Differences for a file"
(let ((buf (or buffer "*vc-diff*"))
(root (and files (expand-file-name (vc-fossil-root (car files))))))
- [nongnu] elpa/vc-fossil 4724850 089/111: Merged vc-push functionality and some code cleanups., (continued)
- [nongnu] elpa/vc-fossil 4724850 089/111: Merged vc-push functionality and some code cleanups., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 8e34d7b 080/111: Added support for vc-push command., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7f26034 087/111: Corrected vc-fossil-dir-status function., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 2747e6c 103/111: Move vc-fossil.el to top dir, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 4d3e1cb 086/111: Update vc-dir header info after fossil commands., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil ec551ba 056/111: Implement previous-revision command for whole repository., ELPA Syncer, 2021/09/29
- [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 <=
- [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, 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