From 40c68f9aea2e3ae9d8a41b88f9626eb2f01f4018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Thu, 30 Jun 2016 01:05:07 +0200 Subject: support importing to github from local svn checkouts --- MgaRepo/GitHub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'MgaRepo') 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...") -- cgit v1.2.1