emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive afdcd5fda8 41/49: Comment: Remove old commented


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive afdcd5fda8 41/49: Comment: Remove old commented version of -fill-version-ranges
Date: Wed, 20 Sep 2023 19:01:34 -0400 (EDT)

branch: elpa/hyperdrive
commit afdcd5fda8f6ee5a52f0e32b8b286690c0c5c874
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Comment: Remove old commented version of -fill-version-ranges
---
 hyperdrive-lib.el | 69 -------------------------------------------------------
 1 file changed, 69 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 0cec88db2d..ccd8d4f886 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -736,75 +736,6 @@ Returns the ranges cons cell for ENTRY."
       (setf (map-elt ranges range-start) `(:existsp nil :range-end ,range-end)
             (hyperdrive-entry-version-ranges entry) (cl-sort ranges #'< :key 
#'car)))))
 
-;; (cl-defun hyperdrive-fill-version-ranges (entry &key then)
-;;   "Asynchronously fill in versions ranges for ENTRY and call THEN.
-;; First fill latest version of ENTRY's hyperdrive.  Then recurse
-;; backward through some unknown ranges and fill them.  Once all
-;; requests return, call THEN with no arguments."
-;;   ;; TODO: Limit the number of recursive calls made.
-;;   (declare (indent defun))
-;;   ;; Filling drive's latest version lets us display the full history,
-;;   ;; and it ensures that the final range is not unknown.
-;;   (hyperdrive-fill-latest-version (hyperdrive-entry-hyperdrive entry))
-;;   (let* ((ranges-no-gaps (hyperdrive-entry-version-ranges-no-gaps entry))
-;;          (ranges-to-fill
-;;           (cl-delete-if-not
-;;            ;; Select certain unknown ranges to be filled. Unknown
-;;            ;; ranges are filled by requesting the version at its
-;;            ;; range-end. The entry at the range-end of an unknown
-;;            ;; ranges which is followed by a nonexistent entry is
-;;            ;; likely to also be nonexistent. By only attempting to
-;;            ;; fill unknown ranges which are either followed by a
-;;            ;; existent range or are themselves the final range, we
-;;            ;; minimize the number of unnecessary requests.
-;;            (pcase-lambda (`(,_range-start . ,(map (:existsp existsp) 
(:range-end range-end))))
-;;              (and (eq 'unknown existsp)
-;;                   (if-let ((next-range (map-elt ranges-no-gaps (1+ 
range-end))))
-;;                       ;; If next range exists, fill it.
-;;                       (eq t (map-elt next-range :existsp))
-;;                     ;; This is the final range: fill it.
-;;                     t)))
-;;            ranges-no-gaps))
-;;          queue)
-;;     (if ranges-to-fill
-;;         (progn
-;;           ;; TODO: When `plz' lets us handle errors in the queue finalizer, 
add that here.
-;;           (setf queue (make-plz-queue :limit hyperdrive-queue-size :finally 
then))
-;;           (cl-labels ((fill-recursively (unknown-entry)
-;;                         ;; NOTE: `fill-recursively' is recursive logically 
but
-;;                         ;; not technically, because each call is in the 
async callback.
-;;                         ;; Fill entry at its version, then if its previous
-;;                         ;; version is unknown, recurse on previous version.
-;;                         (hyperdrive-fill unknown-entry
-;;                           ;; `hyperdrive-fill' is only used here for 
updating
-;;                           ;; `hyperdrive-version-ranges'. The copied entry 
is thrown away.
-;;                           :then (lambda (filled-entry)
-;;                                   ;; Don't use `hyperdrive-entry-previous' 
here, since it makes a sync request
-;;                                   (pcase-let ((`(,range-start . ,_plist) 
(hyperdrive-entry-version-range filled-entry)))
-;;                                     (setf (hyperdrive-entry-version 
filled-entry) (1- range-start))
-;;                                     (when (eq 'unknown 
(hyperdrive-entry-exists-p filled-entry))
-;;                                       ;; Recurse backward through history, 
filling unknown
-;;                                       ;; entries. Stop recursing at known 
nonexistent entry.
-;;                                       (fill-recursively filled-entry))))
-;;                           :else (lambda (err)
-;;                                   (pcase (plz-response-status 
(plz-error-response err))
-;;                                     ;; FIXME: If plz-error is a curl-error, 
this block will fail.
-;;                                     ;; TODO: How to handle entries which 
have never been known
-;;                                     ;; existent. From a UI perspective, the 
history buffer
-;;                                     ;; should display the versions at which 
the entry is known
-;;                                     ;; non-existent. However, we don't want 
to store loads of
-;;                                     ;; non-existent entries in 
`hyperdrive-version-ranges'.
-;;                                     (404 nil)
-;;                                     (_ (signal (car err) (cdr err))))
-;;                                   err)
-;;                           :queue queue)))
-;;             (pcase-dolist (`(,_range-start . ,(map (:range-end range-end))) 
ranges-to-fill)
-;;               ;; TODO: Consider using async iterator instead (with 
`iter-defun' or `aio'?)
-;;               (let ((range-end-entry (hyperdrive-copy-tree entry t)))
-;;                 (setf (hyperdrive-entry-version range-end-entry) range-end)
-;;                 (fill-recursively range-end-entry)))))
-;;       (funcall then))))
-
 (cl-defun hyperdrive-fill-version-ranges (entry &key (finally #'ignore))
   "Asynchronously fill in versions ranges before ENTRY.
 Once all requests return, call FINALLY with no arguments."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]