branch: elpa/hyperdrive
commit 30941b0e300c9e73e4f46d9f92ce46bf2b0e6681
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Fix: (h/fill-version-ranges) Handle loading history edge case
Previously, the "Loading" overlay never disappeared in the history
buffer if the user attempted to load the version history for an entry
which never existed.
---
hyperdrive-lib.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index f228684ab8..530c612ad7 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -880,7 +880,13 @@ Once all requests return, call FINALLY with no arguments."
('t (fill-existent-at
last-requested-version))
('nil (fill-nonexistent-at
last-requested-version))
('unknown
- (h/error "Entry should have been filled
at version: %s" last-requested-version))))))))
+ ;; This clause may run when attempting to
+ ;; fill version ranges for an entry which
+ ;; has never been saved: Say message and
+ ;; call `finally' so callers can clean up.
+ (h/message "Entry should have been filled
at version: %s"
+ last-requested-version)
+ (funcall finally))))))))
;; Make a copy of the version ranges for use in the HEAD
request callback.
(copy-entry-version-ranges (copy-sequence (he/version-ranges
entry))))
;; For nonexistent entries, send requests in parallel.