summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-11-09 13:16:18 -0800
committerMark Palange (Mani) <palange@lindenlab.com>2009-11-09 13:16:18 -0800
commitb34b82f7fea702b7cb4309195314c45fd3d2e630 (patch)
tree8af0d2b7f2670902d9b3d7cf878081ffd7aacab7 /scripts
parent06ba4927aa8d288b843ed1380132c14938708707 (diff)
parentdc5db676efd340bccd2c6f376c0bcba77e0507c4 (diff)
Automated merge with ssh://hg.lindenlab.com/brad/brad-parabuild
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update_version_files.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py
index ee1ce69a15..da60fd105a 100755
--- a/scripts/update_version_files.py
+++ b/scripts/update_version_files.py
@@ -47,6 +47,9 @@ def usage():
Options:
--version
Specify the version string to replace current version.
+ --revision
+ Specify the revision to replace the last digit of the version.
+ By default, revision is computed from the version control system.
--skip-on-branch
Specify a regular expression against which the current branch
is matched. If it matches, then leave version strings alone.
@@ -161,6 +164,7 @@ def main():
opts, args = getopt.getopt(sys.argv[1:],
"",
['version=',
+ 'revision=',
'channel=',
'server_channel=',
'skip-on-branch=',
@@ -171,12 +175,15 @@ def main():
update_server = False
update_viewer = False
new_version = None
+ new_revision = None
new_viewer_channel = None
new_server_channel = None
skip_on_branch_re = None
for o,a in opts:
if o in ('--version'):
new_version = a
+ if o in ('--revision'):
+ new_revision = a
if o in ('--skip-on-branch'):
skip_on_branch_re = re.compile(a)
if o in ('--channel'):
@@ -243,11 +250,20 @@ def main():
else:
if llversion.using_svn():
- revision = llversion.get_svn_revision()
+ if new_revision:
+ revision = new_revision
+ else:
+ revision = llversion.get_svn_revision()
branch = llversion.get_svn_branch()
elif llversion.using_hg():
- revision = llversion.get_hg_changeset()
+ if new_revision:
+ revision = new_revision
+ else:
+ revision = llversion.get_hg_changeset()
branch = llversion.get_hg_repo()
+ elif new_revision:
+ revision = new_revision
+ branch = "unknown"
else:
print >>sys.stderr, "ERROR: could not determine revision and branch"
return -1