From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRfOC-0003WQ-FL for guix-patches@gnu.org; Tue, 27 Nov 2018 10:35:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRfOA-0000OS-Lo for guix-patches@gnu.org; Tue, 27 Nov 2018 10:35:04 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:48166) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRfOA-0000OE-IU for guix-patches@gnu.org; Tue, 27 Nov 2018 10:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRfOA-0006Go-Dz for guix-patches@gnu.org; Tue, 27 Nov 2018 10:35:02 -0500 Subject: [bug#33522] [PATCH 1/3] git: 'latest-repository-commit' logs its progress. References: <20181127153147.21247-1-ludo@gnu.org> In-Reply-To: <20181127153147.21247-1-ludo@gnu.org> Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 27 Nov 2018 16:34:00 +0100 Message-Id: <20181127153402.21357-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33522@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= From: Ludovic Courtès * guix/git.scm (latest-repository-commit): Add #:log-port and honor it. --- guix/git.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/git.scm b/guix/git.scm index d007916662..78645024c9 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -154,6 +154,7 @@ data, respectively [ | | ]." (define* (latest-repository-commit store url #:key + (log-port (%make-void-port "w")) (cache-directory (%repository-cache-directory)) (ref '(branch . "master"))) @@ -164,11 +165,14 @@ REF is pair whose key is [branch | commit | tag] and value the associated data, respectively [ | | ]. Git repositories are kept in the cache directory specified by -%repository-cache-directory parameter." +%repository-cache-directory parameter. + +Log progress and checkout info to LOG-PORT." (define (dot-git? file stat) (and (string=? (basename file) ".git") (eq? 'directory (stat:type stat)))) + (format log-port "updating checkout of '~a'...~%" url) (let*-values (((checkout commit) (update-cached-checkout url @@ -177,6 +181,7 @@ Git repositories are kept in the cache directory specified by (url-cache-directory url cache-directory))) ((name) (url+commit->name url commit))) + (format log-port "retrieved commit ~a~%" commit) (values (add-to-store store name #t "sha256" checkout #:select? (negate dot-git?)) commit))) -- 2.19.2