[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 21e55d694e 04/31: Change: (hyperdrive-mirror-fi
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/hyperdrive 21e55d694e 04/31: Change: (hyperdrive-mirror-files-and-urls) Use plain list |
|
Date: |
Fri, 3 Nov 2023 22:00:46 -0400 (EDT) |
branch: elpa/hyperdrive
commit 21e55d694e18d060c426acfdfbc2000cef0a51b1
Author: Joseph Turner <joseph@ushin.org>
Commit: Adam Porter <adam@alphapapa.net>
Change: (hyperdrive-mirror-files-and-urls) Use plain list
Since we're no longer using tabulated-list-mode, there's no need to
use a vector within a list.
---
hyperdrive-mirror.el | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el
index d250174702..2a8fec6e0a 100644
--- a/hyperdrive-mirror.el
+++ b/hyperdrive-mirror.el
@@ -40,8 +40,7 @@
(put 'hyperdrive-mirror-parent-entry 'permanent-local t)
(defvar-local hyperdrive-mirror-files-and-urls nil
- "List of mappings between filenames and the URLs into which files
-will be uploaded in `hyperdrive-mirror-mode'.")
+ "List of lists like (FILE STATUS URL) for `hyperdrive-mirror-mode'.")
(defvar-local hyperdrive-mirror-query nil
"List of arguments passed to `hyperdrive-mirror', excluding
\\+`no-confirm'.")
@@ -57,7 +56,7 @@ will be uploaded in `hyperdrive-mirror-mode'.")
hyperdrive-mirror-keys "hyperdrive-mirror-key" "Grouping keys."))
(hyperdrive-mirror-define-key status (&key name status)
- (pcase-let ((`(,_id [,_file ,item-status ,_url]) item))
+ (pcase-let ((`(,_file ,item-status ,_url) item))
(if status
(when (equal status item-status)
(or name status))
@@ -75,15 +74,15 @@ will be uploaded in `hyperdrive-mirror-mode'.")
(taxy-magit-section-define-column-definer "hyperdrive-mirror"))
(hyperdrive-mirror-define-column "File" ()
- (pcase-let* ((`(,_id [,file ,_status ,_url]) item))
+ (pcase-let* ((`(,file ,_status ,_url) item))
file))
(hyperdrive-mirror-define-column "Status" ()
- (pcase-let* ((`(,_id [,_file ,status ,_url]) item))
+ (pcase-let* ((`(,_file ,status ,_url) item))
status))
(hyperdrive-mirror-define-column "URL" ()
- (pcase-let* ((`(,_id [,_file ,_status ,url]) item))
+ (pcase-let* ((`(,_file ,_status ,url) item))
url))
(unless hyperdrive-mirror-columns
@@ -98,7 +97,7 @@ will be uploaded in `hyperdrive-mirror-mode'.")
FILES-AND-URLS is structured like `hyperdrive-mirror-files-and-urls'.
After uploading files, open PARENT-ENTRY."
(let* ((count 0)
- (upload-files-and-urls (cl-remove-if-not (pcase-lambda (`(,_id
[,_file ,status ,_url]))
+ (upload-files-and-urls (cl-remove-if-not (pcase-lambda (`(,_file
,status ,_url))
(string-match-p (rx (or
"not in" "newer than")) status))
files-and-urls))
(progress-reporter
@@ -112,7 +111,7 @@ After uploading files, open PARENT-ENTRY."
(revert-buffer nil t))))))
(unless upload-files-and-urls
(hyperdrive-user-error "No new/newer files to upload"))
- (pcase-dolist (`(,_id [,file ,_status ,url]) upload-files-and-urls)
+ (pcase-dolist (`(,file ,_status ,url) upload-files-and-urls)
(hyperdrive-upload-file file (hyperdrive-url-entry url)
:queue queue
;; TODO: Error handling (e.g. in case one or more files fails to
upload).
@@ -203,7 +202,7 @@ predicate and set NO-CONFIRM to t."
(hyperdrive-mirror--metadata-finally
buffer
(sort files-and-urls
- (pcase-lambda (`(,_ [,_ ,a-file ,_]) `(,_
[,_ ,b-file ,_]))
+ (pcase-lambda (`(,_ ,a-file ,_) `(,_
,b-file ,_))
(string< a-file b-file)))))))
(dolist (file files)
(let ((entry (hyperdrive-entry-create
@@ -221,7 +220,7 @@ predicate and set NO-CONFIRM to t."
(t
(propertize "older than" 'face
'hyperdrive-mirror-older))))
(url (hyperdrive-entry-url entry)))
- (push (list url (vector file status url))
files-and-urls)
+ (push (list file status url) files-and-urls)
(update-progress (cl-incf num-filled) num-of)))
:else (lambda (plz-error)
(let ((status-code (plz-response-status
(plz-error-response plz-error))))
@@ -231,7 +230,7 @@ predicate and set NO-CONFIRM to t."
(hyperdrive-update-nonexistent-version-range
entry)
(let ((status (propertize "not in" 'face
'hyperdrive-mirror-new))
(url (hyperdrive-entry-url entry)))
- (push (list url (vector file status url))
files-and-urls)
+ (push (list file status url) files-and-urls)
(update-progress (cl-incf num-filled)
num-of)))
(_
(hyperdrive-error "Unable to get metadata for
URL \"%s\": %S"
- [nongnu] elpa/hyperdrive 6321fdc675 01/31: Change: (hyperdrive-mirror) Use taxy-magit-section, (continued)
- [nongnu] elpa/hyperdrive 6321fdc675 01/31: Change: (hyperdrive-mirror) Use taxy-magit-section, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive f201aedb5e 08/31: Change: (hyperdrive-mirror-files-and-urls) Use symbols, not strings, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 471517e574 17/31: Add names, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive e9614f01c3 22/31: Tidy: Remove commented code, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 74a701b164 30/31: Change: (hyperdrive--mirror) Kill mirror buffer after mirroring, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive edd5eb8a06 15/31: Add/Change: (cl-defstruct hyperdrive-mirror-item), ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 35dbbd86f8 06/31: Change: (hyperdrive-mirror) Remove Status column, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 579d678da7 20/31: Change: Inherit from built-in faces for hyperdrive-mirror-* faces, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 2c38208541 23/31: Comment: Update TODO, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive de24c7fffe 31/31: Merge branch 'wip/send-last-modified-header', ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 21e55d694e 04/31: Change: (hyperdrive-mirror-files-and-urls) Use plain list,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 93520312ef 05/31: Tidy: (hyperdrive-mirror) Minor optimization, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive c47693ff5a 07/31: Tidy: (hyperdrive-mirror-define-key) Don't accept arguments, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 17f3cde160 10/31: Change: (hyperdrive-mirror--insert-taxy) Sort taxys, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 4c44d4fae0 12/31: Tidy: (hyperdrive-mirror-files-and-urls) Reorder format, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive e2a76f0b66 18/31: Fix: Abbreviate file name only for display in column, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 46f6852b47 24/31: Merge branch 'wip/mirror-taxy-magit-section', ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive 8f1ab68519 26/31: Change: (hyperdrive-mirror) Show short key in URL column, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive a5af3356bd 28/31: Change: (hyperdrive-mirror) Compare timestamps to the second, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive a6cd445883 21/31: Tidy, ELPA Syncer, 2023/11/03
- [nongnu] elpa/hyperdrive e2e341cd14 27/31: Change: (hyperdrive-upload-file) Send Last-Modified header, ELPA Syncer, 2023/11/03