[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil 6eb44a2 064/111: Refactor next-revision and prev
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil 6eb44a2 064/111: Refactor next-revision and previous-revision commands. |
Date: |
Wed, 29 Sep 2021 08:59:22 -0400 (EDT) |
branch: elpa/vc-fossil
commit 6eb44a204bcff59deea541c368a3e40929f8c9fc
Author: fifr <fifr>
Commit: fifr <fifr>
Refactor next-revision and previous-revision commands.
---
vc/el/vc-fossil.el | 36 ++++++++++++------------------------
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 86c1344..f5add58 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -338,18 +338,12 @@ If REV is specified, annotate that revision."
"Fossil specific version of the `vc-previous-revision'."
(if file
(with-temp-buffer
- (let ((found (not rev))
- (newver nil))
- (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
- ;; (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))
+ (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
+ (goto-char (point-min))
+ (and (re-search-forward (concat "^" (regexp-quote rev)))
+ (zerop (forward-line))
+ (looking-at "^\\([0-9a-zA-Z]+\\)")
+ (match-string 1)))
(let ((info (vc-fossil--run "info" rev)))
(and (string-match "parent: *\\([0-9a-fA-F]+\\)" info)
(match-string 1 info)))))
@@ -358,18 +352,12 @@ If REV is specified, annotate that revision."
"Fossil specific version of the `vc-previous-revision'."
(if file
(with-temp-buffer
- (let ((found (not rev))
- (oldver nil))
- (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
- ;; (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))
+ (vc-fossil-command t 0 (file-truename file) "finfo" "-l" "-b")
+ (goto-char (point-min))
+ (and (re-search-forward (concat "^" (regexp-quote rev)))
+ (zerop (forward-line -1))
+ (looking-at "^\\([0-9a-zA-Z]+\\)")
+ (match-string 1)))
(let ((info (vc-fossil--run "info" rev)))
(and (string-match "child: *\\([0-9a-fA-F]+\\)" info)
(match-string 1 info)))))
- [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, (continued)
- [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, 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 <=
- [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, 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