aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/rewrite-manifest.py
diff options
context:
space:
mode:
authorDanilo Šegan <danilo.segan@linaro.org>2012-11-22 10:36:42 +0100
committerDanilo Šegan <danilo.segan@linaro.org>2012-11-22 10:36:42 +0100
commit6002b6c8f6f4639272d7361a2481e4758a3cd60a (patch)
tree062ecca4694432b1b9277d1cdf5ef6f853d62264 /build-scripts/rewrite-manifest.py
parent0b3ed677c170bd2dda6321fa9c1d903fd791fb8d (diff)
Support all git URL variants in existence.
Diffstat (limited to 'build-scripts/rewrite-manifest.py')
-rwxr-xr-xbuild-scripts/rewrite-manifest.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/build-scripts/rewrite-manifest.py b/build-scripts/rewrite-manifest.py
index ebf5f7e..c9344a3 100755
--- a/build-scripts/rewrite-manifest.py
+++ b/build-scripts/rewrite-manifest.py
@@ -6,7 +6,6 @@ from xml.etree.cElementTree import (
)
import sys
-
et = ElementTree()
doc = open(sys.argv[1])
root = et.parse(doc)
@@ -18,15 +17,23 @@ for remote in root.findall("remote"):
if default_remote is None:
default_remote = remote.get('name')
- if remote.get('fetch').startswith('git://git.linaro.org'):
+ # Replace git://git.linaro.org/ and http://git.linaro.org/git/ base URLs
+ # with the scalable http://git.linaro.org/git-ro/.
+ if remote.get('fetch') in (
+ 'git://git.linaro.org', 'git://git.linaro.org/',
+ 'http://git.linaro.org/git', 'http://git.linaro.org/git/'):
remote.set('fetch', 'http://git.linaro.org/git-ro/')
remotes_to_handle.add(remote.get('name'))
- elif remote.get('fetch').startswith('git://android.git.linaro.org'):
+ # Replace git://android.git.linaro.org/ and
+ # http://android.git.linaro.org/git/ base URLs with the scalable
+ # http://git.linaro.org/git-ro/.
+ elif remote.get('fetch') in (
+ 'git://android.git.linaro.org', 'git://android.git.linaro.org/',
+ 'http://android.git.linaro.org/git',
+ 'http://android.git.linaro.org/git/'):
remote.set('fetch', 'http://android.git.linaro.org/git-ro/')
remotes_to_handle.add(remote.get('name'))
-remotes_to_handle.remove(default_remote)
-
for project in root.findall("project"):
if (project.get('remote') in remotes_to_handle or
project.get('remote') is None and default_remote in remotes_to_handle):