[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/package+vc 60b3eb0754 02/10: Allow specifying the VC backend use
From: |
Philip Kaludercic |
Subject: |
feature/package+vc 60b3eb0754 02/10: Allow specifying the VC backend used by 'package-vc-install' |
Date: |
Sun, 30 Oct 2022 13:55:31 -0400 (EDT) |
branch: feature/package+vc
commit 60b3eb07542ce7b9f094b40d174c07b1393d2835
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Allow specifying the VC backend used by 'package-vc-install'
* lisp/emacs-lisp/package-vc.el (package-vc-install): Add argument BACKEND.
---
lisp/emacs-lisp/package-vc.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 23249fd59c..a3e7e68d5b 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -452,7 +452,7 @@ the `:brach' attribute in PKG-SPEC."
(package-vc-unpack-1 pkg-desc default-directory))))
;;;###autoload
-(defun package-vc-install (name-or-url &optional name rev)
+(defun package-vc-install (name-or-url &optional name rev backend)
"Fetch the source of NAME-OR-URL.
If NAME-OR-URL is a URL, then the package will be downloaded from
the repository indicated by the URL. The function will try to
@@ -462,7 +462,9 @@ NAME-OR-URL is taken to be a package name, and the package
metadata will be consulted for the URL. An explicit revision can
be requested using REV. If the command is invoked with a prefix
argument, the revision used for the last release in the package
-archive is used."
+archive is used. If a NAME-OR-URL is a URL, that is to say a
+string, the VC backend used to clone the repository can be set by
+BACKEND. If missing, `package-vc-guess-backend' will be used."
(interactive
(progn
;; Initialize the package system to get the list of package
@@ -481,7 +483,7 @@ archive is used."
(package--archives-initialize)
(cond
((and-let* ((stringp name-or-url)
- (backend (package-vc-guess-backend name-or-url)))
+ (backend (or backend (package-vc-guess-backend name-or-url))))
(package-vc-unpack
(package-desc-create
:name (or name (intern (file-name-base name-or-url)))
- feature/package+vc updated (eaafc10f67 -> 2a4f37fe52), Philip Kaludercic, 2022/10/30
- feature/package+vc bb86ed20e1 08/10: Display a message after installing source packages, Philip Kaludercic, 2022/10/30
- feature/package+vc a00ec87c0b 01/10: Update handling for new elpa-packages.eld format, Philip Kaludercic, 2022/10/30
- feature/package+vc 4097781655 03/10: Ensure that package specifications are always fetched, Philip Kaludercic, 2022/10/30
- feature/package+vc a52cec7b6b 04/10: Explicitly handle :vc-backend in a package specification, Philip Kaludercic, 2022/10/30
- feature/package+vc 30f1e7c1e9 05/10: Extract last source package release from local VCS data, Philip Kaludercic, 2022/10/30
- feature/package+vc 8b49d553b6 06/10: ; Avoid a type error on malformed "elpa-packages.eld" input, Philip Kaludercic, 2022/10/30
- feature/package+vc ec3f102b8c 07/10: Prefer "Package-Version" over "Version" if available, Philip Kaludercic, 2022/10/30
- feature/package+vc 60b3eb0754 02/10: Allow specifying the VC backend used by 'package-vc-install',
Philip Kaludercic <=
- feature/package+vc d33998ed3b 09/10: Have 'last-change' accept a line number instead of a range, Philip Kaludercic, 2022/10/30
- feature/package+vc 2a4f37fe52 10/10: Merge remote-tracking branch 'origin/master' into feature/package+vc, Philip Kaludercic, 2022/10/30