From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 3KxsM7E/FWHlBgEAgWs5BA (envelope-from ) for ; Thu, 12 Aug 2021 17:35:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uEFaLrE/FWERWQAAbx9fmQ (envelope-from ) for ; Thu, 12 Aug 2021 15:35:13 +0000 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 3FDB92E964 for ; Thu, 12 Aug 2021 17:35:13 +0200 (CEST) Received: from localhost ([::1]:51160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mECje-00009h-UV for larch@yhetil.org; Thu, 12 Aug 2021 11:35:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mECjW-00009J-Hj for bug-guix@gnu.org; Thu, 12 Aug 2021 11:35:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mECjW-0002QK-Ap for bug-guix@gnu.org; Thu, 12 Aug 2021 11:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mECjV-0001O7-U9 for bug-guix@gnu.org; Thu, 12 Aug 2021 11:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50026: Specify a pull-request in --with-branch package transformations Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 12 Aug 2021 15:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50026 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Philippe SWARTVAGHER Received: via spool by 50026-submit@debbugs.gnu.org id=B50026.16287824525271 (code B ref 50026); Thu, 12 Aug 2021 15:35:01 +0000 Received: (at 50026) by debbugs.gnu.org; 12 Aug 2021 15:34:12 +0000 Received: from localhost ([127.0.0.1]:39768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mECie-0001Mr-Ds for submit@debbugs.gnu.org; Thu, 12 Aug 2021 11:34:12 -0400 Received: from mx1.riseup.net ([198.252.153.129]:59906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mECiY-0001MH-O8 for 50026@debbugs.gnu.org; Thu, 12 Aug 2021 11:34:07 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4GlrM86LFGzDrkw; Thu, 12 Aug 2021 08:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1628782436; bh=7CKq7PbFNTZwuzxdgQutKlIJ2GoRq68gj5p4tVF7+OI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ORLo9ouOfIywUZXX2eflqbI4n7pR+0anvGro4q3x4/461cKIkdjP/a8yZ2LF+tWgw xZrvnK9aPca0C+WExSyl7/jkd/Z2VYSy/5kbSpmQADz3TBfe4HWAmzf0dAz4rmqeqT ar+zTIDn1FwgdMt7nqmIDA9dMm8bwqDetYcUesB8= X-Riseup-User-ID: B8590AA4F9D44EFC9615A75419DD3960843D740AA89DAB29A9084409E61E589F Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4GlrM80V6Hz5vY8; Thu, 12 Aug 2021 08:33:55 -0700 (PDT) Date: Thu, 12 Aug 2021 17:30:46 +0200 From: raingloom Message-ID: <20210812173046.53151677@riseup.net> In-Reply-To: <29e470a4-89a3-2ac1-1fbd-f4a747443fb9@inria.fr> References: <29e470a4-89a3-2ac1-1fbd-f4a747443fb9@inria.fr> 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: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50026@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628782513; 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=7CKq7PbFNTZwuzxdgQutKlIJ2GoRq68gj5p4tVF7+OI=; b=cgCfEczSJrCWQxL1yO91xy0k/+8Mh7qg7IlVriukC42/rIeB+zSqUKSo+ax3nHZ5r3TNdQ P1PtnkyLM5qLox1+1n3AiIogT6QkVRQ7lq/ZcHC2Mvjwwem0R6KnFEPsc3bHu+ZA8+Ctl5 1zCtNawdL4lA2Ku3HqTRMuM+pgpLad4/F7/wCN3Sbt0wmJE4nWEqJcfcuXTvNwc4gVKk3J 7xXx1XLBIz6FrMCkhcFPrIPe0/c/B7GorHRYNfzZFNdQuIRE/bb0im7uYpu7+AjCkqCqip ifyU4Wiz3idNoyeoW2VMMxwgjlnbL4UsxDWM0uFDIS/Us1UiWx+rRvAocb/kZw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628782513; a=rsa-sha256; cv=none; b=dDH7cddj+Tn113Zb4btTXIi78VOqaGrgi689bJ6o8YJCEK9TIJhoN3uCJJMA+xq2cOTXZ7 vyv4tdEmdiGwmPHp009xCZBAX/H6UJAHOZHmE1SuM1ZgLWTEM3jFfM/IK37Al16v3TTIzh D8OIq1OKq/rPKuHd17Z3lW3pNpus4NhQTYfab+vHy9VQbMZ00PeTE32EecreXKXeQ8TRbP TuMqJUCK565xrn/311IWNnJu9lMlF9wTYnZ0NxxWcPVN1qq/afZSvHy9HW6V4uSPQW5DDY D0zOSL4xqj+7fs4wJUl9PIlOIjFustzOaiLb7E8DNepqGZDdaybHAnIxi0p0ow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=ORLo9ouO; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=ORLo9ouO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 3FDB92E964 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2Uc+kBOg7vIq On Thu, 12 Aug 2021 11:38:38 +0200 Philippe SWARTVAGHER wrote: > Hello, >=20 > A nice feature would be to be able to use a pull-request as branch to > specify in the `--with-branch` transformation option. >=20 > A use-case is to use a pull-request coming from a private fork, thus > we can't use the combination `--with-git-url=3D with-branch=3D`. >=20 >=20 > As an example, if I follow > https://gitlab.inria.fr/help/user/project/merge_requests/reviews/index.md= #checkout-merge-requests-locally-through-the-head-ref, > I should be able to do something like: >=20 > ```bash >=20 > guix build chameleon --with-branch=3Dchameleon=3Dmerge-requests/262/head >=20 > ``` >=20 > (with 262 being the pull-request I'm interested in) However, this > fails: >=20 > ``` >=20 > guix build: erreur : impossible de r=C3=A9cup=C3=A9rer la branche =C2=AB > merge-requests/262/head =C2=BB depuis > https://gitlab.inria.fr/solverstack/chameleon : cannot locate > remote-tracking branch 'origin/merge-requests/262/head' > ``` >=20 > While commands stated in the documentation work well: >=20 > ```bash >=20 > git clone https://gitlab.inria.fr/solverstack/chameleon && cd > chameleon >=20 > git fetch origin merge-requests/262/head:mr-262 >=20 > git checkout mr-262 >=20 > ``` >=20 > I guess the fetch step is lacking in the way Guix handles the > `--with-branch` transformation. >=20 >=20 > FYI, Ansible is able to do things like that (see > https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_m= odule.html), > by combining options `refspec` and `version`. >=20 >=20 > I'm aware a workaround is to download the patch corresponding to the > pull-request and using `--with-patch`, however handling it directly > with `--with-branch` would be more handy ! >=20 > Thanks, >=20 How is this different compared to just using the git URL and branch that the pull request is from? For example, here we have a merge request: https://gitlab.com/guile-git/guile-git/-/merge_requests/30 =46rom this repo: https://gitlab.com/plattfot/guile-git and this branch: git_ignore_path_is_ignored This is how merge requests work, there is always a (pretty easy to find) source repo and branch that should be merged into a branch of the target repo. This is how you would build it in this case: guix build \ --with-git-url=3Dguile-git=3Dhttps://gitlab.com/plattfot/guile-git \ --with-branch=3Dguile-git=3Dgit_ignore_path_is_ignored guile-git Someone could make a script that extracts this information from the various git forges (Gitea, GitLab, GitHub, etc), but all you get is that you can copy one URL instead of one URL and one branch name. I'm not aware of any standard way to access merge requests that would work across all git forges, so IMHO the implementation complexity is not worth it for such a tiny improvement. There is more important work.