GNU bug report logs -
#69328
[PATCH 00/12] Better source code recovery from SWH
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri, 23 Feb 2024 14:46:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #80 received at 69328 <at> debbugs.gnu.org (full text, mbox):
This allows content-addressed access to the checkout, which is
preferable.
* guix/hg-download.scm (hg-fetch): Add call to
‘swh-download-directory-by-nar-hash’ before ‘swh-download’ call.
Change-Id: I2afc8badc1f8bb2c8bdd3a47abbb72d455d93e64
---
guix/hg-download.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/hg-download.scm b/guix/hg-download.scm
index 6d02de47e4..dd28d9c244 100644
--- a/guix/hg-download.scm
+++ b/guix/hg-download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2014-2017, 2019, 2024 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
;;;
@@ -117,9 +117,11 @@ (define* (hg-fetch ref hash-algo hash
(parameterize ((%verify-swh-certificate? #f))
(format (current-error-port)
"Trying to download from Software Heritage...~%")
- (swh-download #$(hg-reference-url ref)
- #$(hg-reference-changeset ref)
- #$output)))))))
+ (or (swh-download-directory-by-nar-hash #$hash '#$hash-algo
+ #$output)
+ (swh-download #$(hg-reference-url ref)
+ #$(hg-reference-changeset ref)
+ #$output))))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "hg-checkout") build
--
2.41.0
This bug report was last modified 1 year and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.