1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 11:00:10 +01:00

Added importer support for bitbucket repos

This commit is contained in:
Ciaran Gultnieks 2012-03-06 19:43:29 +00:00
parent a35d31aa21
commit c08f5d7e5f
2 changed files with 11 additions and 2 deletions

View File

@ -336,6 +336,8 @@ Github - @code{https://github.com/USER/PROJECT}
@item @item
Google Code - @code{http://code.google.com/p/PROJECT/} Google Code - @code{http://code.google.com/p/PROJECT/}
(supports git, svn and hg repos) (supports git, svn and hg repos)
@item
Bitbucket - @code{https://bitbucket.org/USER/PROJECT/}
@end enumerate @end enumerate
Depending on the project type, more or less information may be gathered. For Depending on the project type, more or less information may be gathered. For

View File

@ -67,10 +67,17 @@ def main():
repo = 'https://git.gitorious.org/' + url[22:] + '.git' repo = 'https://git.gitorious.org/' + url[22:] + '.git'
repotype = 'git' repotype = 'git'
sourcecode = url sourcecode = url
elif url.startswith('https://bitbucket.org/'):
if url.endswith('/'):
url = url[:-1]
projecttype = 'bitbucket'
sourcecode = url + '/src'
issuetracker = url + '/issues'
repotype = 'hg'
repo = url
elif url.startswith('http://code.google.com/p/'): elif url.startswith('http://code.google.com/p/'):
if not url.endswith('/'): if not url.endswith('/'):
print "Expected format for googlecode url is http://code.google.com/p/PROJECT/" url += '/';
sys.exit(1)
projecttype = 'googlecode' projecttype = 'googlecode'
sourcecode = url + 'source/checkout' sourcecode = url + 'source/checkout'
issuetracker = url + 'issues/list' issuetracker = url + 'issues/list'