From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SE3oBMqk22T+NwEASxT56A (envelope-from ) for ; Tue, 15 Aug 2023 18:16:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aFnzBMqk22S/4wAA9RJhRA (envelope-from ) for ; Tue, 15 Aug 2023 18:16:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 64C2738F97 for ; Tue, 15 Aug 2023 18:16:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="U/GBOBYn"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692116169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6FGsvFLM24oHeGGt0O+QpUXL7NW0JlhNv0ofqDvx1n8=; b=Fb70LCowXSQoU9mE+NCixYknu7LaSvjyX0j8uFw2o4t+Aip/xO6BhVzlXsg9nWSxX1+Kxz zY22B09sFEwsBxjbtPUmD5vnUUKc4noBxgIw8LNLmztmDxBXuMDBg4J2/gpmxackCCU/HU UtbhOcP54Cp7MnLOjPHXhbhGlXLYYJJ7JWDXpD8laeEnLvZdlhegWymIdd6pSY7uupiNRP UgxS6BcyuWoNZ1jZgHKsttOImFKBe/rwu0cIPPZw7ClJRi/78jpXEXjRsYinYxXu8J+gbz V7DwME3wvhb6usymB7xT1ERm8hmfZakjDBg8AfmajoBZ3IjK+tSOtNVr0IURIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="U/GBOBYn"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692116169; a=rsa-sha256; cv=none; b=K3+hn+icXe9T8zheXhOevk3ZulHFvg8doUUvc/YM8LebYbh3gI2KaBMPiKbHVE025d9WWI tFU2xTmsZlhDtAK2LSToFX5ywdbY7WoE8kN3SyRU0UmlmEK4dbPdGUNjjakXqC5G64duH3 Gx3HmjhHyE8Sr1LTOw0dRrfDl/haNYK4gMwMUZKK+6b/1gabHCWEHd3QBIu66QDYwznVf7 20rDUX8B8fS8dvzWEgBGfTAFy3eXrb+yemsJi1gpwBqlb59UZ8SLmNDy1F/2dkEmT26nwi bvCLPPWBT9VUaRnDIhICykGtBOdLssu8385y/4pu7rZ0XXTREC1BJNgkew3GPQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVwiC-0004W7-EO; Tue, 15 Aug 2023 12:16:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVwiA-0004Vi-8O for guix-patches@gnu.org; Tue, 15 Aug 2023 12:16:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVwiA-0007h9-0F for guix-patches@gnu.org; Tue, 15 Aug 2023 12:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qVwi9-000204-RX for guix-patches@gnu.org; Tue, 15 Aug 2023 12:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Aug 2023 16:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64746 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus , 64746@debbugs.gnu.org Received: via spool by 64746-submit@debbugs.gnu.org id=B64746.16921161067623 (code B ref 64746); Tue, 15 Aug 2023 16:16:01 +0000 Received: (at 64746) by debbugs.gnu.org; 15 Aug 2023 16:15:06 +0000 Received: from localhost ([127.0.0.1]:36553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVwhF-0001yt-V6 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 12:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVwhD-0001xv-4Q for 64746@debbugs.gnu.org; Tue, 15 Aug 2023 12:15:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVwh5-0007BR-Vy; Tue, 15 Aug 2023 12:14:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6FGsvFLM24oHeGGt0O+QpUXL7NW0JlhNv0ofqDvx1n8=; b=U/GBOBYnj50VMsGB9rap cK1zWBv7RExcExc95PEBZ/FFjI/FGUW+mq0WDTFy1CeFVWkT7K4k4R7lisu52VQ9YYE/+AzKr3h6A YcNl1qeBZ+WKGgv+xp97W3X5PvIJtwpEB3zGAFwCsWuT690FotDLvhPvP55t8y5pM/r7ZvOaXmOUK ve55fbqkPDdufApil+TKqX4JloIuVW3ssN5eZ3HjDKA6lROlhiIvsUmIGcXrgyuenwUlU2K7VyrFG 8fPG6Qg/J10Z6chDiEq0FBXeFSrWaOB62h8qB8BOqmpirg5eD854y4KzWnkO1cegyipH+smL9Qr/s gqvDFmeb6cg1RQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Tue, 15 Aug 2023 18:14:51 +0200 In-Reply-To: (Maxim Cournoyer's message of "Thu, 20 Jul 2023 12:34:01 -0400") Message-ID: <87pm3o8epw.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.38 X-Spam-Score: -5.38 X-Migadu-Queue-Id: 64C2738F97 X-Migadu-Scanner: mx2.migadu.com X-TUID: //Sj6AdFTg4P Hello, Maxim Cournoyer skribis: > @@ -139,9 +149,20 @@ (define-command (guix-time-machine . args) > (with-git-error-handling > (let* ((opts (parse-args args)) > (channels (channel-list opts)) > + (guix-channel (find guix-channel? channels)) > (command-line (assoc-ref opts 'exec)) > + (ref (assoc-ref opts 'ref)) > + (checkout commit relation (update-cached-checkout > + (channel-url guix-channel) > + #:ref (or ref '()) > + #:starting-commit > + %oldest-possible-commit)) > (substitutes? (assoc-ref opts 'substitutes?)) > (authenticate? (assoc-ref opts 'authenticate-channels?))) Following your question earlier today on IRC, I realized that this would unconditionally add a Git checkout update every time =E2=80=98time-machine= =E2=80=99 is started. This would noticeably degrade performance in the cache-hit case (when running a cached channel set). Currently, on cache hits, =E2=80=98cached-channel-instance=E2=80=99 directly returns ~/.cache/guix/pr= ofiles/xyz without performing any Git or (guix store) operation. This is important because it guarantees that one can run =E2=80=98guix time-machine -C channels.scm -- COMMAND=E2=80=99 at pretty much the same sp= eed as =E2=80=98guix COMMAND=E2=80=99. Perhaps the solution would be for =E2=80=98cached-channel-instance=E2=80=99= to have a new #:validate-channel procedure (or similar) that would be passed channel/commit/relation and would have the opportunity to validate, before the thing is in cache. How does that sound? Ludo=E2=80=99.