[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 98bcea9 268/439: [admin int] Add abstraction: archiv
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 98bcea9 268/439: [admin int] Add abstraction: archive--dirname |
Date: |
Sun, 17 Oct 2021 15:48:18 -0400 (EDT) |
branch: elpa-admin
commit 98bcea9307f77d7e750803ad4818df7dcdf1649e
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[admin int] Add abstraction: archive--dirname
* admin/archive-contents.el (archive--dirname): New func.
(archive-prepare-packages, archive--make-changelog, archive--pull)
(archive--cleanup-packages): Use ‘archive--dirname’.
---
admin/archive-contents.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index e4db805..af156b9 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -44,6 +44,9 @@
(list (car elt)
(archive--version-to-list (car (cdr elt)))))
+(defun archive--dirname (dir &optional base)
+ (file-name-as-directory (expand-file-name dir base)))
+
(defun archive--delete-elc-files (dir &optional only-orphans)
"Recursively delete all .elc files in DIR.
Delete backup files also."
@@ -107,7 +110,7 @@ Expects to be called from within the `packages' directory.
\"Prepare\" here is for subsequent construction of the packages and archive,
so it is meant to refresh any generated files we may need.
Currently only refreshes the ChangeLog files."
- (setq srcdir (file-name-as-directory (expand-file-name srcdir)))
+ (setq srcdir (archive--dirname srcdir))
(let* ((wit ".changelog-witness")
(prevno (with-temp-buffer
(insert-file-contents wit)
@@ -240,7 +243,7 @@ Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return
the descriptor."
(defun archive--make-changelog (dir srcdir)
"Export Git log info of DIR into a ChangeLog file."
(message "Refreshing ChangeLog in %S" dir)
- (let ((default-directory (file-name-as-directory (expand-file-name dir))))
+ (let ((default-directory (archive--dirname dir)))
(with-temp-buffer
(set-buffer-multibyte nil)
(let ((coding-system-for-read 'binary)
@@ -248,8 +251,7 @@ Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return
the descriptor."
(when (file-readable-p "ChangeLog") (insert-file-contents "ChangeLog"))
(let ((old-md5 (md5 (current-buffer))))
(erase-buffer)
- (let ((default-directory
- (file-name-as-directory (expand-file-name dir srcdir))))
+ (let ((default-directory (archive--dirname dir srcdir)))
(archive-call (current-buffer) ; hmm, why not use ‘t’ here? --ttn
"git" "log" "--date=short"
"--format=%cd %aN <%ae>%n%n%w(80,8,8)%B%n"
@@ -603,8 +605,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(archive--html-make-index archive-contents)))
(defun archive--pull (dirname)
- (let ((default-directory (file-name-as-directory
- (expand-file-name dirname))))
+ (let ((default-directory (archive--dirname dirname)))
(with-temp-buffer
(message "Running git pull in %S" default-directory)
(archive-call t "git" "pull")
@@ -665,8 +666,7 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
((file-directory-p (expand-file-name (format "%s/.git" dir)))
(let ((status
(with-temp-buffer
- (let ((default-directory (file-name-as-directory
- (expand-file-name dir))))
+ (let ((default-directory (archive--dirname dir)))
(archive-call t "git" "status" "--porcelain")
(buffer-string)))))
(if (zerop (length status))
- [nongnu] elpa-admin b14148a 249/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, (continued)
- [nongnu] elpa-admin b14148a 249/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 2f122b0 251/439: Merge branch 'master' into new-website, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b9ba590 252/439: packages/yasnippet: Merge external (v0.11.0), Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c670f77 253/439: Merge branch 'master' into new-website, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7626ffa 254/439: Website footer improvement, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 294407d 256/439: README: Fix copyright years., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 34ecb5f 257/439: Respect .elpaignore when compiling and optimize compilation., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 82a2bda 259/439: Put tar'd files at the end to fix build in some environments., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5660f25 261/439: [admin] Add abstraction: archive--read-externals-list, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c101039 265/439: [admin int] Add abstraction: archive-call, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 98bcea9 268/439: [admin int] Add abstraction: archive--dirname,
Philip Kaludercic <=
- [nongnu] elpa-admin 186d10f 269/439: Clear executable bit for Emacs Lisp files., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 336afcd 272/439: Merge commit '8280df5ce6db836559a5c2442b97a2f02b6f7a05', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 9db3516 274/439: Merge branch 'scratch/org-edna', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0f843a7 275/439: Merge branch 'scratch/dired-du', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 94286b7 276/439: * packages/yasnippet: Merge version 0.12.0 from upstream., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 602f32e 277/439: Merge yasnippet 0.12.1 from upstream, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5ac89c8 281/439: * packages/yasnippet: Merge version 0.12.2 from upstream., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d5be3dd 283/439: * README: mention make check_copyrights, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d220792 286/439: Add 'packages/mmm-mode/' from commit '00c10a69c8c90178530219730ccea14ab634a74e', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8c08096 285/439: * GNUmakefile (org-fetch): Don't stop the whole update if it fails., Philip Kaludercic, 2021/10/17