[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin adf3b7f 316/439: Neater HTML table of old package ve
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin adf3b7f 316/439: Neater HTML table of old package versions (bug#35331) |
Date: |
Sun, 17 Oct 2021 15:48:27 -0400 (EDT) |
branch: elpa-admin
commit adf3b7fc10139dfe78ec5561987075eb66ea55a6
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>
Neater HTML table of old package versions (bug#35331)
* admin/archive-contents.el (archive--html-bytes-format): Use IEC prefixes.
(archive--html-make-pkg): Sort old versions in newest-to-oldest order.
---
admin/archive-contents.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index de444e3..c4c2e5a 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -387,16 +387,14 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(defun archive--html-bytes-format (bytes) ;Aka memory-usage-format.
(setq bytes (/ bytes 1024.0))
- (let ((units '(;; "B"
- "kB" "MB" "GB" "TB")))
+ (let ((units '("KiB" "MiB" "GiB" "TiB")))
(while (>= bytes 1024)
(setq bytes (/ bytes 1024.0))
(setq units (cdr units)))
(cond
- ;; ((integerp bytes) (format "%4d%s" bytes (car units)))
- ((>= bytes 100) (format "%4.0f%s" bytes (car units)))
- ((>= bytes 10) (format "%4.1f%s" bytes (car units)))
- (t (format "%4.2f%s" bytes (car units))))))
+ ((>= bytes 100) (format "%4.0f %s" bytes (car units)))
+ ((>= bytes 10) (format "%4.1f %s" bytes (car units)))
+ (t (format "%4.2f %s" bytes (car units))))))
(defun archive--get-prop (prop name srcdir mainsrcfile)
(let ((kprop (intern (format ":%s" (downcase prop)))))
@@ -536,7 +534,8 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
"\n</pre>\n")))
(unless (< (length files) (if (zerop (length latest)) 1 2))
(insert (format "<h2>Old versions</h2><table>\n"))
- (dolist (file files)
+ (dolist (file
+ (sort files (lambda (f1 f2) (version< (car f2) (car f1)))))
(unless (equal (pop file) latest)
(let ((attrs (file-attributes file)))
(insert (format "<tr><td><a
href=%S>%s</a></td><td>%s</td><td>%s</td>\n"
- [nongnu] elpa-admin 5dc3bcb 289/439: Use "git worktree list" in archive-contents.el, (continued)
- [nongnu] elpa-admin 5dc3bcb 289/439: Use "git worktree list" in archive-contents.el, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin eb92dfc 293/439: Fix repo links for :core packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin dbd4e0b 295/439: Merge remote-tracking branch 'refs/remotes/origin/master', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d58576c 301/439: * GNUmakefile (FILTER-nonsrc): Don't compile .dir-locals.el files., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0e7eab5 304/439: Merge commit 'facd92f4c026525706a48b96b4e0b24543ce1d94', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 21c69f7 308/439: Merge commit 'c304ac9a80ab7e96f705771a3842a48bf5a32c8a', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 75bab1c 309/439: * admin/archive-contents.el: Fix case of non-versions dependencies, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 26a2da8 312/439: More specific externals example., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin cdefe40 311/439: Improve copying of :core files; update .gitignore, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 86e31b7 313/439: Merge branch 'master' of git://bzr.sv.gnu.org/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin adf3b7f 316/439: Neater HTML table of old package versions (bug#35331),
Philip Kaludercic <=
- [nongnu] elpa-admin 55ff372 317/439: * admin/archive-contents.el: Improve package HTML headers, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d0cae44 318/439: * admin/archive-contents.el: Unbreak elpa.gnu.org build, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0b90b0a 322/439: * GNUmakefile (check_copyrights): Only look at "copyright" in comments, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin cabbab9 323/439: * packages/yasnippet: Merge 0.14.0 from upstream., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5da248f 325/439: * GNUmakefile (process-archive): Fix placement of --exclude and -X, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f79d3e5 327/439: Merge commit 'b49ba259cc7e490e8acdecd28e66063f5ad1325e', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 223f7eb 331/439: * README: Clarify deployment process., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c90458f 329/439: Add lang attributes to the html tag, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 2ce3401 333/439: * README: Don't recommend to keep code on `master` any more, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d30f5d1 337/439: * GNUmakefile (RULE-singlepkg): New rule(s) to compile single-pkg (bug#38140), Philip Kaludercic, 2021/10/17