Page MenuHomeSoftware Heritage

CloneFailure on non-existent hg repo hosted on phabricator
Closed, MigratedEdits Locked

Description

CloneFailure: ('https://forge.softwareheritage.org/source/manframes/', '/tmp/swh.loader.mercurial.loaderotxg_7_r-687877', 'Traceback (most recent call last):\n  File "/usr/lib/python3/dist-packages/swh/loader/mercurial/hgutil.py", line 141, in _clone_task\n    update=False,\n  File "/usr/lib/python3/dist-packages/mercurial/hg.py", line 676, in clone\n    srcpeer = peer(ui, peeropts, source)\n  File "/usr/lib/python3/dist-packages/mercurial/hg.py", line 246, in peer\n    rui, path, create, intents=intents, createopts=c...
  File "swh/loader/core/loader.py", line 338, in load
    more_data_to_fetch = self.fetch_data()
  File "swh/loader/mercurial/loader.py", line 349, in fetch_data
    hgutil.clone(self.origin_url, self._repo_directory, self._clone_timeout)
  File "swh/loader/mercurial/hgutil.py", line 179, in clone
    raise CloneFailure(src, dest, errors.get())

SWH-LOADER-MERCURIAL-10

Event Timeline

vlorentz triaged this task as Normal priority.Oct 11 2021, 2:56 PM
vlorentz created this task.

Right, that is not cloneable [1].
So we need to handle this more properly and raise a NotFound.

[1]

$ hg clone https://forge.softwareheritage.org/source/manframes/
abort: HTTP Error 404: No such repository exists.