chiark / gitweb /
Added importer support for bitbucket repos
authorCiaran Gultnieks <ciaran@ciarang.com>
Tue, 6 Mar 2012 19:43:29 +0000 (19:43 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Tue, 6 Mar 2012 19:43:29 +0000 (19:43 +0000)
docs/fdroid.texi
import.py

index 575c66204ada1a96a58305166ceb78206be5d653..ebc31bcc024959409a5ab8ff3b38fd4b1baa0c12 100644 (file)
@@ -336,6 +336,8 @@ Github - @code{https://github.com/USER/PROJECT}
 @item
 Google Code - @code{http://code.google.com/p/PROJECT/}
 (supports git, svn and hg repos)
+@item
+Bitbucket - @code{https://bitbucket.org/USER/PROJECT/}
 @end enumerate
 
 Depending on the project type, more or less information may be gathered. For
index 77c43db34a301c87ce8583afaba5069f52fa9311..33a704c5be34e5b82ec7ff935cb97bb277120aed 100755 (executable)
--- a/import.py
+++ b/import.py
@@ -67,10 +67,17 @@ def main():
         repo = 'https://git.gitorious.org/' + url[22:] + '.git'
         repotype = 'git'
         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/'):
         if not url.endswith('/'):
-            print "Expected format for googlecode url is http://code.google.com/p/PROJECT/"
-            sys.exit(1)
+            url += '/';
         projecttype = 'googlecode'
         sourcecode = url + 'source/checkout'
         issuetracker = url + 'issues/list'