diff --git a/README b/README index 213f8fae..5e3f485e 100644 --- a/README +++ b/README @@ -74,6 +74,13 @@ values are: The repository location. Usually a git: or svn: URL. +Normally the repository is checked out once for the application, then moved +to a particular revision/commit/tag for each build version. For an SVN +repository though, this behaviour can be changed by appending a * to the +repository URL - in this case the repository is checked out once per build +version, with the subdir parameter in place of the *. This can be beneficial +when dealing with very large SVN repositories. + ==Build Version== Any number of these fields can be present, each specifying a version to @@ -90,10 +97,13 @@ In addition to the three, always required, parameters described above, further parameters can be added (in name=value format) to apply further configuration to the build. These are: - subdir= - specifies to build from a subdirectory of the checked out - source code - oldsdkloc=yes - the sdk location in the repo is in an old format - target= - specifies a particular SDK target, when the source doesn't + subdir= - Specifies to build from a subdirectory of the checked out + source code. Normally this directory is changed to before + building, but there is a special case for SVN repositories + where the URL is specified with a * at the end. See the + documentation for the Repo field for more information. + oldsdkloc=yes - The sdk location in the repo is in an old format + target= - Specifies a particular SDK target, when the source doesn't Another example, using extra parameters: diff --git a/build.py b/build.py index 55c71919..38cdb4a7 100644 --- a/build.py +++ b/build.py @@ -68,9 +68,10 @@ for app in apps: print "Git clone failed" sys.exit(1) elif app['repotype'] == 'svn': - if subprocess.call(['svn', 'checkout', app['repo'], build_dir]) != 0: - print "Svn checkout failed" - sys.exit(1) + if not app['repo'].endswith("*"): + if subprocess.call(['svn', 'checkout', app['repo'], build_dir]) != 0: + print "Svn checkout failed" + sys.exit(1) else: print "Invalid repo type " + app['repotype'] + " in " + app['id'] sys.exit(1) @@ -81,7 +82,15 @@ for app in apps: # Optionally, the actual app source can be in a subdirectory... if thisbuild.has_key('subdir'): - root_dir = os.path.join(build_dir, thisbuild['subdir']) + if app['repotype'] == 'svn' and app['repo'].endswith("*"): + root_dir = build_dir + if subprocess.call(['svn', 'checkout', + app['repo'][:-1] + thisbuild['subdir'], + build_dir]) != 0: + print "Svn checkout failed" + sys.exit(1) + else: + root_dir = os.path.join(build_dir, thisbuild['subdir']) else: root_dir = build_dir