use BUILD REVISION if the BUILD COMMIT REVISION has not been found
authorMatthieu Patou <mat@matws.net>
Sun, 7 Nov 2010 03:12:08 +0000 (06:12 +0300)
committerMatthieu Patou <mat@matws.net>
Sun, 7 Nov 2010 04:35:18 +0000 (07:35 +0300)
Quite often BUILD REVISION hold a timestamp not a git/svn revision

buildfarm/data.py

index b6cdc59a40e622100f6a7968d2d381f285a39e8c..ca1fe28bb1312e03859dbbc89f8a9ce071371938 100644 (file)
@@ -191,7 +191,7 @@ class Build(object):
             for l in f.readlines():
                 if l.startswith("BUILD COMMIT REVISION: "):
                     revid = l.split(":", 1)[1].strip()
-                elif l.startswith("BUILD REVISION: "):
+                elif l.startswith("BUILD REVISION: ") and not revid:
                     revid = l.split(":", 1)[1].strip()
                 elif l.startswith("BUILD COMMIT TIME"):
                     timestamp = l.split(":", 1)[1].strip()