Page MenuHomeSoftware Heritage

No OneTemporary

diff --git a/PKG-INFO b/PKG-INFO
index fa102fb..96cc48b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,132 +1,132 @@
Metadata-Version: 2.1
Name: swh.loader.mercurial
-Version: 0.2.0
+Version: 0.2.1
Summary: Software Heritage Mercurial Loader
Home-page: https://forge.softwareheritage.org/diffusion/DLDHG/
Author: Software Heritage developers
Author-email: swh-devel@inria.fr
License: UNKNOWN
Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Source, https://forge.softwareheritage.org/source/swh-loader-mercurial
Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
Description: swh-loader-mercurial
=========================
# Configuration file
In usual location for a loader, *{/etc/softwareheritage/ | ~/.swh/ |
~/.config/swh/}loader/hg.yml*:
``` YAML
storage:
cls: remote
args:
url: http://localhost:5002/
```
# Basic use
The main entry point to import a Mercurial repository is the `main` function
defined in the `swh.loader.mercurial.cli` module:
``` bash
python3 -m swh.loader.mercurial.cli
```
If the Python package has been installed via `pip`, you should be able
to type:
``` bash
user@host:~$ swh-loader-hg --help
Usage: swh-loader-hg [OPTIONS] ORIGIN_URL
Options:
-d, --hg-directory TEXT Path to the hg (local) directory to load
from. If unset, the hg repo will ben cloned
from the given (origin) url
-a, --hg-archive TEXT Path to the hg (local) archive file to load
from.
-D, --visit-date TEXT Visit date (defaults to now)
-l, --log-level [NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL]
Log level
--help Show this message and exit.
```
For example:
``` bash
user@host:~$ swh-loader-hg https://www.mercurial-scm.org/repo/hello
[...]
```
# From Python
From python3's toplevel:
## Remote
``` Python
project = 'hello'
# remote repository
origin_url = 'https://www.mercurial-scm.org/repo/%s' % project
# local clone
directory = '/home/storage/hg/repo/%s' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadMercurial
t = LoadMercurial()
t.run(origin_url=origin_url, directory=directory, visit_date='2016-05-03T15:16:32+00:00')
```
## local directory
Only origin, contents, and directories are filled so far.
Remaining objects are empty (revision, release, occurrence).
``` Python
project = '756015-ipv6'
directory = '/home/storage/hg/repo/%s' % project
origin_url = 'https://%s.googlecode.com' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadMercurial
t = LoadMercurial()
t.run(origin_url=origin_url, directory=directory, visit_date='2016-05-03T15:16:32+00:00')
```
## local archive
``` Python
project = '756015-ipv6-source-archive.zip'
archive_path = '/home/storage/hg/repo/%s' % project
origin_url = 'https://%s-archive.googlecode.com' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadArchiveMercurial
t = LoadArchiveMercurial()
t.run(origin_url=origin_url, archive_path=archive_path, visit_date='2016-05-03T15:16:32+00:00')
```
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: testing
diff --git a/conftest.py b/conftest.py
index a74eea4..4f2d021 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,19 +1,20 @@
# Copyright (C) 2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import pytest
pytest_plugins = [
"swh.scheduler.pytest_plugin",
"swh.storage.pytest_plugin",
"swh.loader.pytest_plugin",
]
@pytest.fixture(scope="session")
def swh_scheduler_celery_includes(swh_scheduler_celery_includes):
return swh_scheduler_celery_includes + [
"swh.loader.mercurial.tasks",
+ "swh.loader.mercurial.tasks_from_disk",
]
diff --git a/swh.loader.mercurial.egg-info/PKG-INFO b/swh.loader.mercurial.egg-info/PKG-INFO
index fa102fb..96cc48b 100644
--- a/swh.loader.mercurial.egg-info/PKG-INFO
+++ b/swh.loader.mercurial.egg-info/PKG-INFO
@@ -1,132 +1,132 @@
Metadata-Version: 2.1
Name: swh.loader.mercurial
-Version: 0.2.0
+Version: 0.2.1
Summary: Software Heritage Mercurial Loader
Home-page: https://forge.softwareheritage.org/diffusion/DLDHG/
Author: Software Heritage developers
Author-email: swh-devel@inria.fr
License: UNKNOWN
Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Source, https://forge.softwareheritage.org/source/swh-loader-mercurial
Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
Description: swh-loader-mercurial
=========================
# Configuration file
In usual location for a loader, *{/etc/softwareheritage/ | ~/.swh/ |
~/.config/swh/}loader/hg.yml*:
``` YAML
storage:
cls: remote
args:
url: http://localhost:5002/
```
# Basic use
The main entry point to import a Mercurial repository is the `main` function
defined in the `swh.loader.mercurial.cli` module:
``` bash
python3 -m swh.loader.mercurial.cli
```
If the Python package has been installed via `pip`, you should be able
to type:
``` bash
user@host:~$ swh-loader-hg --help
Usage: swh-loader-hg [OPTIONS] ORIGIN_URL
Options:
-d, --hg-directory TEXT Path to the hg (local) directory to load
from. If unset, the hg repo will ben cloned
from the given (origin) url
-a, --hg-archive TEXT Path to the hg (local) archive file to load
from.
-D, --visit-date TEXT Visit date (defaults to now)
-l, --log-level [NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL]
Log level
--help Show this message and exit.
```
For example:
``` bash
user@host:~$ swh-loader-hg https://www.mercurial-scm.org/repo/hello
[...]
```
# From Python
From python3's toplevel:
## Remote
``` Python
project = 'hello'
# remote repository
origin_url = 'https://www.mercurial-scm.org/repo/%s' % project
# local clone
directory = '/home/storage/hg/repo/%s' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadMercurial
t = LoadMercurial()
t.run(origin_url=origin_url, directory=directory, visit_date='2016-05-03T15:16:32+00:00')
```
## local directory
Only origin, contents, and directories are filled so far.
Remaining objects are empty (revision, release, occurrence).
``` Python
project = '756015-ipv6'
directory = '/home/storage/hg/repo/%s' % project
origin_url = 'https://%s.googlecode.com' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadMercurial
t = LoadMercurial()
t.run(origin_url=origin_url, directory=directory, visit_date='2016-05-03T15:16:32+00:00')
```
## local archive
``` Python
project = '756015-ipv6-source-archive.zip'
archive_path = '/home/storage/hg/repo/%s' % project
origin_url = 'https://%s-archive.googlecode.com' % project
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.mercurial.tasks import LoadArchiveMercurial
t = LoadArchiveMercurial()
t.run(origin_url=origin_url, archive_path=archive_path, visit_date='2016-05-03T15:16:32+00:00')
```
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: testing

File Metadata

Mime Type
text/x-diff
Expires
Mon, Aug 18, 7:13 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3332113

Event Timeline