unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50026: Specify a pull-request in --with-branch package transformations
@ 2021-08-12  9:38 Philippe SWARTVAGHER
  2021-08-12 15:30 ` raingloom
  2021-09-14  7:43 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Philippe SWARTVAGHER @ 2021-08-12  9:38 UTC (permalink / raw)
  To: 50026

Hello,

A nice feature would be to be able to use a pull-request as branch to
specify in the `--with-branch` transformation option.

A use-case is to use a pull-request coming from a private fork, thus we
can't use the combination `--with-git-url= with-branch=`.


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:

```bash

guix build chameleon --with-branch=chameleon=merge-requests/262/head

```

(with 262 being the pull-request I'm interested in) However, this fails:

```

guix build: erreur : impossible de récupérer la branche «
merge-requests/262/head » depuis
https://gitlab.inria.fr/solverstack/chameleon : cannot locate
remote-tracking branch 'origin/merge-requests/262/head'
```

While commands stated in the documentation work well:

```bash

git clone https://gitlab.inria.fr/solverstack/chameleon && cd chameleon

git fetch origin merge-requests/262/head:mr-262

git checkout mr-262

```

I guess the fetch step is lacking in the way Guix handles the
`--with-branch` transformation.


FYI, Ansible is able to do things like that (see
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html),
by combining options `refspec` and `version`.


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 !

Thanks,

-- 
Philippe SWARTVAGHER

PhD Student
TADaaM team, Inria Bordeaux Sud-Ouest






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-14  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  9:38 bug#50026: Specify a pull-request in --with-branch package transformations Philippe SWARTVAGHER
2021-08-12 15:30 ` raingloom
2021-08-12 20:06   ` Philippe SWARTVAGHER
2021-09-14  7:43 ` Ludovic Courtès
2021-09-14  8:12   ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).