chiark / gitweb /
Added support for mercurial
authorCiaran Gultnieks <ciaran@ciarang.com>
Mon, 3 Jan 2011 10:55:18 +0000 (10:55 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Mon, 3 Jan 2011 10:55:18 +0000 (10:55 +0000)
README
build.py

diff --git a/README b/README
index 8258772dc6f085fec706a6d28f701a1191974450..24be3d705ab86768933d1c773ab59cb00d68d79a 100644 (file)
--- a/README
+++ b/README
@@ -68,7 +68,7 @@ The type of repository - for automatic building from source. If this is not
 specified, automatic building is disabled for this application. Possible
 values are:
 
-  git, svn
+  git, svn, hg
 
 ==Repo==
 
index 87b891490a772ba061c3530b112c56bad0013ee7..ec7ce1c1ddad67e8d4ef241a5382baddf32b4fc3 100644 (file)
--- a/build.py
+++ b/build.py
@@ -65,7 +65,7 @@ for app in apps:
 
         # Get the source code...
         if app['repotype'] == 'git':
-            if subprocess.call(['git', 'clone',app['repo'], build_dir]) != 0:
+            if subprocess.call(['git', 'clone', app['repo'], build_dir]) != 0:
                 print "Git clone failed"
                 sys.exit(1)
         elif app['repotype'] == 'svn':
@@ -73,6 +73,10 @@ for app in apps:
                 if subprocess.call(['svn', 'checkout', app['repo'], build_dir]) != 0:
                     print "Svn checkout failed"
                     sys.exit(1)
+        elif app['repotype'] == 'hg':
+            if subprocess.call(['hg', 'clone', app['repo'], build_dir]) !=0:
+                print "Hg clone failed"
+                sys.exit(1)
         else:
             print "Invalid repo type " + app['repotype'] + " in " + app['id']
             sys.exit(1)
@@ -105,6 +109,12 @@ for app in apps:
                         cwd=build_dir) != 0:
                     print "Svn update failed"
                     sys.exit(1)
+            elif app['repotype'] == 'hg':
+                if subprocess.call(['hg', 'checkout', thisbuild['commit']],
+                        cwd=build_dir) != 0:
+                    print "Hg checkout failed"
+                    sys.exit(1)
+
             else:
                 print "Invalid repo type " + app['repotype']
                 sys.exit(1)