guix download does not support Mercurial

  • Open
  • quality assurance status badge
Details
4 participants
  • Ludovic Courtès
  • Ludovic Courtès
  • PIERRE AUGIER
  • Simon Tournier
Owner
unassigned
Submitted by
PIERRE AUGIER
Severity
wishlist
P
P
PIERRE AUGIER wrote on 18 Jul 11:04 +0200
(address . bug-guix@gnu.org)
1753693157.3691505.1721293480459.JavaMail.zimbra@univ-grenoble-alpes.fr

```
guix download --commit=62c4dbe4f786 https://foss.heptapod.net/fluiddyn/fluidsim
```

fails with:

```
SWH: revision "62c4dbe4f786" originating from https://foss.heptapod.net/fluiddyn/fluidsimcould not be found
guix download: warning: revision 62c4dbe4f786 of https://foss.heptapod.net/fluiddyn/fluidsimcould not be fetched from Software Heritage
guix download: error: Git error: unexpected http status code: 404
```

I studied `guix download -h` which shows that `guix download` only supports Git repositories. Since there is `hg-download`, it would make sense that the command `guix download` support Mercurial.

--
Pierre Augier - CR CNRS http://www.legi.grenoble-inp.fr
LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
BP53, 38041 Grenoble Cedex, France tel:+33.4.56.52.86.16
L
L
Ludovic Courtès wrote on 22 Jul 09:11 +0200
(name . PIERRE AUGIER)(address . pierre.augier@univ-grenoble-alpes.fr)(address . 72174@debbugs.gnu.org)
878qxtlx42.fsf@gnu.org
Hi,

PIERRE AUGIER <pierre.augier@univ-grenoble-alpes.fr> skribis:

Toggle quote (2 lines)
> I studied `guix download -h` which shows that `guix download` only supports Git repositories. Since there is `hg-download`, it would make sense that the command `guix download` support Mercurial.

Indeed, only Git is supported at this point. Supporting Mercurial and
other VCSes would be nice though there’s no plan to do so at this point
(Git support was a low-hanging fruit since Git is already tightly
integrated).

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 22 Jul 09:11 +0200
control message for bug #72174
(address . control@debbugs.gnu.org)
877cddlx3x.fsf@gnu.org
severity 72174 wishlist
quit
S
S
Simon Tournier wrote on 22 Jul 17:51 +0200
Re: bug#72174: guix download does not support Mercurial
(address . 72174@debbugs.gnu.org)
87ttghfmrz.fsf@gmail.com
Hi,

On Mon, 22 Jul 2024 at 09:11, Ludovic Courtès <ludovic.courtes@inria.fr> wrote:

Toggle quote (9 lines)
>> I studied `guix download -h` which shows that `guix download` only
>> supports Git repositories. Since there is `hg-download`, it would
>> make sense that the command `guix download` support Mercurial.
>
> Indeed, only Git is supported at this point. Supporting Mercurial and
> other VCSes would be nice though there’s no plan to do so at this point
> (Git support was a low-hanging fruit since Git is already tightly
> integrated).

Somehow, “guix download” does not rely on the module ’(guix
git-download)’ that provides ’git-fetch’ but it relies on the module
’(guix git)’. Therefore, “hg-download” is not helpful here and somehow
a brick seems lacking. :-)

Maybe I misread, my understanding in short is that “git-download” or
“hg-download” works with fixed-output derivations, hence the hash must
be known beforehand; source code is fetched via a derivation that the
guix-daemon processes.

Instead, “guix download” fetches using code from user side and not from
guix-daemon side and the source is fetched inside some user’s cache that
is then copied to the store. This way there is no hash check.

The code behind “guix download” supporting Git is implemented with
guile-libgit2 – tightly integrated ;-); see latest-repository-commit
calling update-cached-checkout from (guix git). It would be possible to
implement the equivalent for Mercurial or redesign “guix download”; in
both cases, todo. :-)

HTH

Cheers,
simon
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72174@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72174
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch