[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 85119b6 068/111: Merge devel.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 85119b6 068/111: Merge devel. |
Date: |
Wed, 29 Sep 2021 08:59:23 -0400 (EDT) |
branch: elpa/vc-fossil
commit 85119b6ddc2e0decb70fe9b0d177fac37b86eaca
Merge: 5b0c159 be45ea1
Author: fifr <fifr>
Commit: fifr <fifr>
Merge devel.
Several improvements for log-view.
---
vc/el/vc-fossil.el | 100 +++++++++++++++++++++++++++++------------------------
1 file changed, 54 insertions(+), 46 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 1b5af79..b3558aa 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -8,7 +8,7 @@
;;; Installation:
-;; 1. Put this file somewhere in the emacs load-path.
+;; 1. Put this file somewhere in the Emacs load-path.
;; 2. Tell Emacs to load it when needed:
;; (autoload 'vc-fossil-registered "vc-fossil")
;; 3. Add Fossil to the list of supported backends:
@@ -37,8 +37,12 @@
;; - delete-file (file)
;; - rename-file (old new)
+;;; Code:
+
(eval-when-compile (require 'vc))
+(autoload 'vc-switches "vc")
+
;;; Customization
(defgroup vc-fossil nil
@@ -213,22 +217,21 @@ If `files` is nil return the status for all files."
(vc-switches 'Fossil 'checkin)))
(defun vc-fossil-find-revision (file rev buffer)
- (if (zerop (length rev))
- (apply #'vc-fossil-command buffer 0 file
- "cat"
- (vc-switches 'Fossil 'checkout))
- (apply #'vc-fossil-command buffer 0 file
- "cat" "-r" rev
- (vc-switches 'Fossil 'checkout))))
+ (apply #'vc-fossil-command buffer 0 file
+ "cat"
+ (nconc
+ (unless (zerop (length rev)) (list "-r" rev))
+ (vc-switches 'Fossil 'checkout))))
(defun vc-fossil-checkout (file &optional editable rev)
(apply #'vc-fossil-command nil 0 file
"update"
- (append (cond
- ((eq rev t) nil)
- (rev (list rev))
- (t nil))
- (vc-switches 'Fossil 'checkout))))
+ (nconc
+ (cond
+ ((eq rev t) (list "current"))
+ ((equal rev "") (list "trunk"))
+ ((stringp rev) (list rev)))
+ (vc-switches 'Fossil 'checkout))))
(defun vc-fossil-revert (file &optional contents-done)
"Revert FILE to the version stored in the fossil repository."
@@ -240,6 +243,8 @@ If `files` is nil return the status for all files."
;; FIXME, we actually already have short, start and limit, need to
;; add it into the code
+(autoload 'vc-setup-buffer "vc-dispatcher")
+
(defun vc-fossil-print-log (files buffer &optional shortlog start-revision
limit)
"Print full log for a file"
(vc-setup-buffer buffer)
@@ -250,7 +255,12 @@ If `files` is nil return the status for all files."
(nconc
(when start-revision (list "before" start-revision))
(when limit (list "-n" (number-to-string limit)))
- (list "-p" (expand-file-name file))))))))
+ (list "-p" (file-relative-name (expand-file-name file)))))))))
+
+(defvar log-view-message-re)
+(defvar log-view-file-re)
+(defvar log-view-font-lock-keywords)
+(defvar log-view-per-file-logs)
(define-derived-mode vc-fossil-log-view-mode log-view-mode "Fossil-Log-View"
(require 'add-log) ;; we need the add-log faces
@@ -291,6 +301,8 @@ If `files` is nil return the status for all files."
(rev1 (list "--from" rev1)))
(vc-switches 'Fossil 'diff)))))
+(declare-function vc-annotate-convert-time "vc-annotate" (time))
+
(defun vc-fossil-annotate-command (file buffer &optional rev)
"Execute \"fossil annotate\" on FILE, inserting the contents in BUFFER.
If REV is specified, annotate that revision."
@@ -337,41 +349,37 @@ If REV is specified, annotate that revision."
(defun vc-fossil-previous-revision (file rev)
"Fossil specific version of the `vc-previous-revision'."
- (if file
- (with-temp-buffer
- (let ((found (not rev))
- (newver nil))
- (insert (vc-fossil--run "finfo" "-l" "-b" (file-truename file)))
- ;; (vc-fossil--call "fossil" "finfo" "-l" "-b" file)
- (goto-char (point-min))
- (while (not (eobp))
- (let* ((line (buffer-substring-no-properties (point)
(line-end-position)))
- (version (car (split-string line))))
- (setq newver (or newver (and found version)))
- (setq found (string= version rev)))
- (forward-line))
- newver))
- (let ((info (vc-fossil--run "info" rev)))
- (and (string-match "parent: *\\([0-9a-fA-F]+\\)" info)
- (match-string 1 info)))))
+ (with-temp-buffer
+ (cond
+ (file
+ (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
+ (goto-char (point-min))
+ (and (re-search-forward (concat "^" (regexp-quote rev)) nil t)
+ (zerop (forward-line))
+ (looking-at "^\\([0-9a-zA-Z]+\\)")
+ (match-string 1)))
+ (t
+ (vc-fossil-command t 0 nil "info" rev)
+ (goto-char (point-min))
+ (and (re-search-forward "parent: *\\([0-9a-fA-F]+\\)" nil t)
+ (match-string 1))))))
(defun vc-fossil-next-revision (file rev)
"Fossil specific version of the `vc-previous-revision'."
- (when file
- (with-temp-buffer
- (let ((found (not rev))
- (oldver nil))
- (insert (vc-fossil--run "finfo" "-l" "-b" (file-truename file)))
- ;; (vc-fossil--call "fossil" "finfo" "-l" "-b" file)
- (goto-char (point-min))
- (while (not (eobp))
- (let* ((line (buffer-substring-no-properties (point)
(line-end-position)))
- (version (car (split-string line))))
- (setq found (string= version rev))
- (setq oldver (or oldver found version)))
- (forward-line))
- oldver))))
-
+ (with-temp-buffer
+ (cond
+ (file
+ (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
+ (goto-char (point-min))
+ (and (re-search-forward (concat "^" (regexp-quote rev)) nil t)
+ (zerop (forward-line -1))
+ (looking-at "^\\([0-9a-zA-Z]+\\)")
+ (match-string 1)))
+ (t
+ (vc-fossil-command t 0 nil "info" rev)
+ (goto-char (point-min))
+ (and (re-search-forward "child: *\\([0-9a-fA-F]+\\)" nil t)
+ (match-string 1))))))
(defun vc-fossil-delete-file (file)
(vc-fossil-command nil 0 (file-truename file) "rm" "--hard"))
- [nongnu] elpa/vc-fossil 13a0a69 036/111: Untabify, (continued)
- [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
- [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 <=
- [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, 2021/09/29
- [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