Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9340874
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0ff3b7d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+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/
+
+send_contents: True
+send_directories: True
+send_revisions: True
+send_releases: True
+send_occurrences: True
+content_packet_size: 1000
+content_packet_size_bytes: 1073741824
+directory_packet_size: 2500
+revision_packet_size: 1000
+release_packet_size: 1000
+occurrence_packet_size: 1000
+```
+
+# Basic use
+
+From python3's toplevel:
+
+``` 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 LoadMercurialTsk
+
+t = LoadMercurialTsk()
+t.run(origin_url=origin_url, directory=directory, visit_date='2016-05-03T15:16:32+00:00')
+```
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 11:16 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3214668
Attached To
rDLDHG Mercurial loader
Event Timeline
Log In to Comment