From a9f46e21adb501e15850b2bb0f80c1803a694acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Wed, 29 Jun 2016 01:43:19 +0200 Subject: start on github ~bridge, so far only local git-svn repo import --- MgaRepo/commands/githubimport.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 MgaRepo/commands/githubimport.py (limited to 'MgaRepo/commands') diff --git a/MgaRepo/commands/githubimport.py b/MgaRepo/commands/githubimport.py new file mode 100644 index 0000000..afc73c5 --- /dev/null +++ b/MgaRepo/commands/githubimport.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +from MgaRepo import Error +from MgaRepo.command import * +from MgaRepo.GitHub import GitHub +import getopt +import sys + +HELP = """\ +Usage: mgarepo github-import [OPTIONS] URL + +Import a git-svn cloned repository to github + +Options: + -h Show this message + +Examples: + mgarepo githubimport existingpkg + mgarepo githubimport svn+ssh://svn.mageia.org/svn/packages/cauldron/existingpkg +""" + +def githubimport(target="."): + github = GitHub() + github.import_package(target) + +def parse_options(): + parser = OptionParser(help=HELP) + opts, args = parser.parse_args() + return opts + +def main(): + do_command(parse_options, githubimport) + +# vim:et:ts=4:sw=4 -- cgit v1.2.1