[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil ac82044 065/111: Do not raise errors in next-rev
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil ac82044 065/111: Do not raise errors in next-revision and previous-revision commands. |
Date: |
Wed, 29 Sep 2021 08:59:22 -0400 (EDT) |
branch: elpa/vc-fossil
commit ac820447b1411d72d5f659083818128b3f4d3fe9
Author: fifr <fifr>
Commit: fifr <fifr>
Do not raise errors in next-revision and previous-revision commands.
The functions should just return nil if no parent or child could be
found.
---
vc/el/vc-fossil.el | 50 ++++++++++++++++++++++++++++----------------------
1 file changed, 28 insertions(+), 22 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index f5add58..4c2169e 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -336,31 +336,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
- (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)))))
+ (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'."
- (if file
- (with-temp-buffer
- (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)))))
+ (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 6029bc2 082/111: Updates from pdo, (continued)
- [nongnu] elpa/vc-fossil 6029bc2 082/111: Updates from pdo, ELPA Syncer, 2021/09/29
- [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 <=
- [nongnu] elpa/vc-fossil 007187d 075/111: Merge changes from pdo for emacs 25 support, ELPA Syncer, 2021/09/29
- [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