[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 9126fc7 365/439: * elpa-admin.el: Fix date computati
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 9126fc7 365/439: * elpa-admin.el: Fix date computation for :core packages |
Date: |
Sun, 17 Oct 2021 15:48:37 -0400 (EDT) |
branch: elpa-admin
commit 9126fc71c0020aa961ca65c2fc26f79d6aeece9b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* elpa-admin.el: Fix date computation for :core packages
(elpaa--select-revision): Make sure we follow symlinks.
(elpaa--get-devel-version): For :core packages, use the date of last
commit to the main file.
---
elpa-admin.el | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index e0d34b0..ac61e5b 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -221,8 +221,13 @@ Assumes that the current worktree holds a snapshot
version."
(defun elpaa--select-revision (dir pkg-spec rev)
"Checkout revision REV in DIR of PKG-SPEC.
Do it without leaving the current branch."
- (let ((cur-rev (vc-working-revision
- (expand-file-name (elpaa--main-file pkg-spec) dir))))
+ (let ((cur-rev
+ ;; FIXME: Emacs-26's `vc-git-working-revision' ignores its arg and
+ ;; uses uses the `default-directory' to get the revision.
+ (let* ((ftn (file-truename
+ (expand-file-name (elpaa--main-file pkg-spec) dir)))
+ (default-directory (file-name-directory ftn)))
+ (vc-working-revision ftn))))
(if (equal rev cur-rev)
(elpaa--message "Current revision is already desired revision!")
(with-temp-buffer
@@ -387,12 +392,20 @@ Return non-nil if a new tarball was created."
(message "Built new package %s!" tarball)
'new)))))
-(defun elpaa--get-devel-version (dir)
+(defun elpaa--get-devel-version (dir pkg-spec)
"Compute the date-based pseudo-version used for devel builds."
- (let* ((default-directory (elpaa--dirname dir))
+ (let* ((ftn (file-truename ;; Follow symlinks!
+ (expand-file-name (elpaa--main-file pkg-spec) dir)))
+ (default-directory (file-name-directory ftn))
(gitdate
(with-temp-buffer
- (elpaa--call t "git" "show" "--pretty=format:%cI" "--no-patch")
+ (if (plist-get (cdr pkg-spec) :core)
+ ;; For core packages, don't use the date of the last
+ ;; commit to the branch, but that of the last commit
+ ;; to the main file.
+ (elpaa--call t "git" "log" "--pretty=format:%cI" "--no-patch"
+ "-1" "--" (file-name-nondirectory ftn))
+ (elpaa--call t "git" "show" "--pretty=format:%cI" "--no-patch"))
(buffer-string)))
(verdate
;; Convert Git's date into something that looks like a version
number.
@@ -452,7 +465,7 @@ Return non-nil if a new tarball was created."
;; First, try and build the devel tarball
;; Do it before building the release tarball, because building
;; the release tarball may revert to some older commit.
- (let* ((date-version (elpaa--get-devel-version dir))
+ (let* ((date-version (elpaa--get-devel-version dir pkg-spec))
;; Add a ".0." so that when the version number goes from
;; NN.MM to NN.MM.1 we don't end up with the devel build
;; of NN.MM comparing as more recent than NN.MM.1.
- [nongnu] elpa-admin f79d3e5 327/439: Merge commit 'b49ba259cc7e490e8acdecd28e66063f5ad1325e', (continued)
- [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
- [nongnu] elpa-admin e48de90 332/439: * README: Fix typos., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f6670e0 334/439: * .gitignore: Ignore all the unregistered files under `packages`, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d5c6272 339/439: * admin/archive-contents.el: foo.tar.sig is not an old tarball, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin de02176 397/439: * elpa-admin.el: Use :lisp-dir in default value of :main-file and :renames, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d5001e6 404/439: * elpa-admin.el: Keep the number of old tarballs under check, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 9126fc7 365/439: * elpa-admin.el: Fix date computation for :core packages,
Philip Kaludercic <=
- [nongnu] elpa-admin 39eb0cf 343/439: * admin/archive-contents.el (batch-generate-description-file): New function, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a5cffdb 374/439: * elpa-admin.el (elpaa--pull): Set the upstream branch if needed, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d47f83f 373/439: * elpa-admin.el (elpaa--fetch): Use the default branch rather than "master", Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b1bcdc4 367/439: * elpa-admin.el (elpaa--pull): Be slightly less chatty, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7e57ea1 371/439: * elpa-admin.el (elpaa--push): Don't checkout branch, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1b69bf6 340/439: * admin/archive-contents.el: Don't use "git log" when not needed, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 14d46c2 375/439: * elpa-admin.el (elpaa--pull): Fix up oversight in last change, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 47280ce 402/439: * elpa-admin.el: Don't mention skipping :core if there are no :core, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 059dde5 344/439: * GNUmakefile (RULE-singlepkg): Add rules to install&compile each package, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e22c225 395/439: * elpa-admin.el (elpaa--fetch): Only show upstream commits, Philip Kaludercic, 2021/10/17