loader: rename bundle20_loader.py as loader.py
cli: add a sw-loader-hg entry point
doc: document new cli command in the README file
Details
Details
Diff Detail
Diff Detail
- Repository
- rDLDHG Mercurial loader
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Thanks.
I like the cli.
For example, it will help simplify issue reporting to reproduce (instead of using the toplevel as i do).
swh/loader/mercurial/cli.py | ||
---|---|---|
44 ↗ | (On Diff #1406) | I don't know what's better... Something like: if hg_archive: from .loader import HgArchiveBundle20Loader as HgLoader kwargs['archive_path'] = hg_archive else: from .loader import HgBundle20Loader as HgLoader kwargs['directory'] = hg_archive (and then remove the global import at the top of the file). I guess importing at the top can break sooner than at runtime... (with the import from within the call). |