Changeset View
Changeset View
Standalone View
Standalone View
README.md
swh-loader-mercurial | swh-loader-mercurial | ||||
========================= | ========================= | ||||
The Software Heritage Mercurial Loader is a tool and a library to walk a local mercurial | The Software Heritage Mercurial Loader is a tool and a library to walk a local mercurial | ||||
repository and inject into the SWH dataset all contained files that weren't known | repository and inject into the SWH dataset all contained files that weren't known | ||||
before. | before. | ||||
The main entry points are: | The main entry points are: | ||||
- :class:`swh.loader.mercurial.from_disk.HgLoaderFromDisk` which reads and loads a local | - :class:`swh.loader.mercurial.loader.HgLoader` which reads and loads a local | ||||
repository into an SWH archive. | repository into an SWH archive. | ||||
- :class:`swh.loader.mercurial.from_disk.HgArchiveLoaderFromDisk` which reads and loads | - :class:`swh.loader.mercurial.loader.HgArchiveLoader` which reads and loads | ||||
a local repository wrapped within a tarball | a local repository wrapped within a tarball | ||||
# CLI run | # CLI run | ||||
## Configuration file | ## Configuration file | ||||
/tmp/mercurial.yml: | /tmp/mercurial.yml: | ||||
``` YAML | ``` YAML | ||||
storage: | storage: | ||||
cls: remote | cls: remote | ||||
args: | args: | ||||
url: http://localhost:5002/ | url: http://localhost:5002/ | ||||
``` | ``` | ||||
## Basic use | ## Basic use | ||||
``` bash | ``` bash | ||||
swh loader --C /tmp/mercurial.yml run mercurial_from_disk https://www.mercurial-scm.org/repo/hello | swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello | ||||
``` | ``` |