Search code examples
mercurialtortoisehg

404 when trying to clone geckodriver


I am trying to clone this project with mercurial:

https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver

I have downloaded TortoiseHg and selected clone repository.

tortoisehg

It gives 404 error:

% hg clone --verbose https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver "D:\Projects\gecko"
HTTP Error: 404 (Not Found)
[command returned code 255 Mon Oct 17 23:12:18 2022]

What is the correct path I should be trying to clone?


Solution

    1. The URL used everywhere is just the URL of page in some Web-frontend for the some repository in some state, loosely connected to real URL of repository

    2. I don't know the internal structure of Mozilla Central (they can use subrepos for separate projects or have one giant monorepo), but by inspecting changesets, which affected geckodriver dir in tree, I see modified files with path testing/geckodriver/ in names, based on which I assume that the project of interest is not an independent entity, but only a subtree in a large repository. Thus, because with HG you can't clone just part of tree (contrary to SVN, f.e.), you, maybe, have to clone the whole Mozilla Central repository in worst case


    PS: hg clone -v https://hg.mozilla.org/mozilla-central/testing/geckodriver will not work, don't waste time on it

    PPS: If I grok docs correctly (NB: it's not guaranteed!!!) you can enable (still experimental, but bundled for years) sparse extension, prepare sparse-config and try to clone needed subtree testing/geckodriver (it will be not dumb hg clone, but hg init, hack-hack hgrc, hg pull https://hg.mozilla.org/mozilla-central in order to have limiting sparse-profile in game on getting sources)