[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin adf3b7f 316/357: Neater HTML table of old package vers
From: |
Stefan Monnier |
Subject: |
[elpa] elpa-admin adf3b7f 316/357: Neater HTML table of old package versions (bug#35331) |
Date: |
Thu, 10 Dec 2020 18:07:06 -0500 (EST) |
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"
- [elpa] elpa-admin da3bd64 263/357: [admin int] Use ‘archive--read-externals-list’ more., (continued)
- [elpa] elpa-admin da3bd64 263/357: [admin int] Use ‘archive--read-externals-list’ more., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 34ecb5f 257/357: Respect .elpaignore when compiling and optimize compilation., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 186d10f 269/357: Clear executable bit for Emacs Lisp files., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin ac713ed 242/357: Merge commit 'bdbbc65028af8deb55a4e474be43b5b99e6cc539', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 5660f25 261/357: [admin] Add abstraction: archive--read-externals-list, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a23a8b8 271/357: Merge branch 'scratch/hook-helpers', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 1325337 262/357: [admin int] Simplify ‘archive-gitignore-externals’., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 84f67ae 294/357: * admin/archive-contents.el (archive--insert-repolinks): Fix last change, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 655d2e7 305/357: Update packages/ack from upstream, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin c943660 310/357: Merge commit '98405112baa5ce2a118d1c65184c005d8ddaa1a9', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin adf3b7f 316/357: Neater HTML table of old package versions (bug#35331),
Stefan Monnier <=
- [elpa] elpa-admin 9c8cf14 320/357: * admin/archive-contents.el (archive-refresh-pkg-file): Resurrect., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 4fc4d47 321/357: Merge commit '5b562e4ddfc449cd61c82ef7646a6c501b913b6c', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin cabbab9 323/357: * packages/yasnippet: Merge 0.14.0 from upstream., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 5ef13b0 326/357: Merge commit '33afdb46e1cd61251736816d965495525b36c9cd', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d30f5d1 337/357: * GNUmakefile (RULE-singlepkg): New rule(s) to compile single-pkg (bug#38140), Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a186f57 335/357: * README: Convert to org-mode and prepare for export., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin f6670e0 334/357: * .gitignore: Ignore all the unregistered files under `packages`, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin cff34fa 336/357: Support generating readme.html from README, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 9822a67 315/357: README: Mention that the copyright in ELPA is with the FSF, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d0cae44 318/357: * admin/archive-contents.el: Unbreak elpa.gnu.org build, Stefan Monnier, 2020/12/10