软件传统Mercurial加载器

swh.loader.mercurial的Python项目详细描述


SWH装载机Mercurial

配置文件

在加载程序的通常位置,{/etc/softwarehitage/~/.swh/| ~/.config/swh/}加载程序/hg.yml

storage:cls:remoteargs:url:http://localhost:5002/

基本用途

导入Mercurial存储库的主要入口点是main函数 在swh.loader.mercurial.cli模块中定义:

python3 -m swh.loader.mercurial.cli

如果python包是通过pip安装的,那么您应该能够 键入:

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.

例如:

user@host:~$ swh-loader-hg https://www.mercurial-scm.org/repo/hello
[...]

来自python

来自python3的顶层:

遥控器

project='hello'# remote repositoryorigin_url='https://www.mercurial-scm.org/repo/%s'%project# local clonedirectory='/home/storage/hg/repo/%s'%projectimportlogginglogging.basicConfig(level=logging.DEBUG)fromswh.loader.mercurial.tasksimportLoadMercurialt=LoadMercurial()t.run(origin_url=origin_url,directory=directory,visit_date='2016-05-03T15:16:32+00:00')

本地目录

到目前为止,只填充了源、内容和目录。

其余对象为空(修订、发布、引用)。

project='756015-ipv6'directory='/home/storage/hg/repo/%s'%projectorigin_url='https://%s.googlecode.com'%projectimportlogginglogging.basicConfig(level=logging.DEBUG)fromswh.loader.mercurial.tasksimportLoadMercurialt=LoadMercurial()t.run(origin_url=origin_url,directory=directory,visit_date='2016-05-03T15:16:32+00:00')

本地存档

project='756015-ipv6-source-archive.zip'archive_path='/home/storage/hg/repo/%s'%projectorigin_url='https://%s-archive.googlecode.com'%projectimportlogginglogging.basicConfig(level=logging.DEBUG)fromswh.loader.mercurial.tasksimportLoadArchiveMercurialt=LoadArchiveMercurial()t.run(origin_url=origin_url,archive_path=archive_path,visit_date='2016-05-03T15:16:32+00:00')

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java创建一个数组和一个函数,允许从数组中删除零   java仅为一个函数使用后台   java为什么我看不到Android应用程序的布局?   如何使用Java通过重定向到SAML登录   java从列表中获取连续对   java在spring的构造函数中使用自动连线依赖项   java Libgdx如何设置复选框和文本标签之间的空间   xml-java。util。日期至xmlgoriancalendar   用ddlutils转换数据库的java问题   java我能在main方法中写“public int I=0”吗?   java JPA模拟hibernate的LobCreator?   使用本地变量的单例java安全发布   java videoview未在设备上显示,也未进行xml设计,   spring boot测试如何使用java api将Ldif文件中的默认数据添加到Ldap服务器?   如何在java中获取XML文件中节点的完整路径?   java只使用不同ArrayList中的一个字段搜索具有多个字段的ArrayList