chiark / gitweb /
checkupdates: don't ignore repeated tags
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 16 Mar 2016 16:40:26 +0000 (16:40 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 16 Mar 2016 18:15:08 +0000 (18:15 +0000)
If multiple tags point at the same commit, limiting the regex search to
one tag per line would only catch one tag. This broke org.wikipedia's
update check.

fdroidserver/common.py

index 9b6f303d40a030a8894ab02e281e0f06e6239dda..725c79613fac98b6c62f14cddf9c79940fb0b45f 100644 (file)
@@ -705,7 +705,7 @@ class vcs_git(vcs):
         p = FDroidPopen(['git', 'tag'], cwd=self.local, output=False)
         return p.output.splitlines()
 
-    tag_format = re.compile(r'.*tag: ([^),]*).*')
+    tag_format = re.compile(r'tag: ([^),]*)')
 
     def latesttags(self):
         self.checkrepo()
@@ -714,11 +714,8 @@ class vcs_git(vcs):
                         cwd=self.local, output=False)
         tags = []
         for line in p.output.splitlines():
-            m = self.tag_format.match(line)
-            if not m:
-                continue
-            tag = m.group(1)
-            tags.append(tag)
+            for tag in self.tag_format.findall(line):
+                tags.append(tag)
         return tags