chiark / gitweb /
Add support for UCM:Tags in bzr
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 30 Oct 2013 20:54:09 +0000 (21:54 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 30 Oct 2013 20:54:09 +0000 (21:54 +0100)
docs/fdroid.texi
fdroidserver/checkupdates.py
fdroidserver/common.py

index 80d0abd6b39b475a5eee93a5a5ff958e111ea781..052ff3fe8c4f397ff725f08dd407b94869480a38 100644 (file)
@@ -1111,9 +1111,9 @@ are known to forget to tag releases. Like RepoManifest, it will not return the
 correct value if the directory containing the AndroidManifest.xml has moved.
 Despite these caveats, it is the often the favourite update check mode. 
 
-It currently only works for git, hg and git-svn repositories. In the case of
-the latter, the repo URL must encode the path to the trunk and tags or else no
-tags will be found.
+It currently only works for git, hg, bzr and git-svn repositories. In the case
+of the latter, the repo URL must encode the path to the trunk and tags or else
+no tags will be found.
 @item
 @code{HTTP} - HTTP requests are used to determine the current version code and
 version name. This is controlled by the @code{Update Check Data} field, which
index b8a0d124553e854ce3d6ab1cfcdd420d64c732b0..99051c0a0eb1f38025d0b47a2dbbd68500688b8b 100644 (file)
@@ -93,8 +93,8 @@ def check_tags(app, sdk_path):
             build_dir = os.path.join('build/', app['id'])
             repotype = app['Repo Type']
 
-        if repotype not in ('git', 'git-svn', 'hg'):
-            return (None, 'Tags update mode only works for git, hg and git-svn repositories currently')
+        if repotype not in ('git', 'git-svn', 'hg', 'bzr'):
+            return (None, 'Tags update mode only works for git, hg, bzr and git-svn repositories currently', None)
 
         # Set up vcs interface and make sure we have the latest code...
         vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir, sdk_path)
index a21281aa6cf9affee4e81ce9417a5cb2189c1f11..a0d8da94c3afded08e0fe549b1f8495553f3efd4 100644 (file)
@@ -415,6 +415,12 @@ class vcs_bzr(vcs):
         self.refreshed = False
         self.srclib = None
 
+    def gettags(self):
+        p = subprocess.Popen(['bzr', 'tags'],
+                stdout=subprocess.PIPE, cwd=self.local)
+        return [tag.split('   ')[0].strip() for tag in
+                p.communicate()[0].splitlines()]
+
 
 # Get the type expected for a given metadata field.
 def metafieldtype(name):