diff options
author | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-06-29 01:43:19 +0200 |
---|---|---|
committer | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-06-29 01:43:19 +0200 |
commit | a9f46e21adb501e15850b2bb0f80c1803a694acb (patch) | |
tree | e3026df9190d881bac5be56d22a5f069fb31b7de /MgaRepo/commands | |
parent | 6b8d185a6389614ce30b829ac550d8fef13da91a (diff) | |
download | mgarepo-a9f46e21adb501e15850b2bb0f80c1803a694acb.tar mgarepo-a9f46e21adb501e15850b2bb0f80c1803a694acb.tar.gz mgarepo-a9f46e21adb501e15850b2bb0f80c1803a694acb.tar.bz2 mgarepo-a9f46e21adb501e15850b2bb0f80c1803a694acb.tar.xz mgarepo-a9f46e21adb501e15850b2bb0f80c1803a694acb.zip |
start on github ~bridge, so far only local git-svn repo import
Diffstat (limited to 'MgaRepo/commands')
-rw-r--r-- | MgaRepo/commands/githubimport.py | 33 |
1 files changed, 33 insertions, 0 deletions
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 |