aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-30 01:05:07 +0200
committerPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-30 01:05:07 +0200
commit40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018 (patch)
tree0fcf9ea40b1c47439002b6c0b43fabd0b96aea0f
parent01df5cd564c3d70d2c5e8bd3f1a0ce5b747b42bb (diff)
downloadmgarepo-40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018.tar
mgarepo-40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018.tar.gz
mgarepo-40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018.tar.bz2
mgarepo-40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018.tar.xz
mgarepo-40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018.zip
support importing to github from local svn checkouts
-rw-r--r--MgaRepo/GitHub.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/MgaRepo/GitHub.py b/MgaRepo/GitHub.py
index d0bf998..8e73847 100644
--- a/MgaRepo/GitHub.py
+++ b/MgaRepo/GitHub.py
@@ -1,5 +1,5 @@
from MgaRepo import Error, config
-from MgaRepo.rpmutil import detectVCS, get_pkg_tag
+from MgaRepo.rpmutil import detectVCS, get_pkg_tag, clone
from MgaRepo.layout import package_name, remove_current
from MgaRepo.git import GIT
from MgaRepo.svn import SVN
@@ -79,6 +79,10 @@ class GitHub(object):
if status == 0:
print("Success!")
return True
+ elif isinstance(vcs, SVN):
+ clone(info["URL"], bindownload=False)
+ return self.import_package(pkgname)
+
else:
raise Error("GitHub repository already exists at " + repository.html_url)
raise Error("GitHub import failed...")