summaryrefslogtreecommitdiffstats
path: root/tools/scripts/version_resolver.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-09-10 19:48:56 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-09-11 12:22:21 +0200
commitd741059422ebeb1613c767bdd318c87228ec2160 (patch)
treefca80cef23e13d828a65124f652bdfcb1a223535 /tools/scripts/version_resolver.py
parentde2d1a6d8ab61db7e6994c414a08f1a6ba7afb9b (diff)
init-repository: clean up upstream repository checkout even more
Remove unneeded codepaths now that we can trust the git shasums found in the .DEPS.git file. No need for parsing and verifying remote branches, we can simply fetch the specified sha1 from origin. This patch also unifies the 'shasum' and 'ref' members of the Submodule python class since the 'ref' member can represent both chromium's version tag and the sha1s of the submodules, there is no need for a separate codepath for these. Change-Id: I1300b5b74f4d2e6984943570963b2f813b1b1679 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tools/scripts/version_resolver.py')
-rw-r--r--tools/scripts/version_resolver.py19
1 files changed, 1 insertions, 18 deletions
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index d3d82094a..2430555d9 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -86,23 +86,6 @@ def readReleaseChannels():
channels[os].append({ 'channel': ver['channel'], 'version': ver['version'], 'branch': ver['true_branch'] })
return channels
-def sanityCheckModules(submodules):
- submodule_dict = {}
- sys.stdout.write('\nverifying submodule refs.')
- for submodule in submodules:
- sys.stdout.flush()
- if submodule.ref:
- sys.stdout.write('.')
- result = subprocess.check_output(['git', 'ls-remote', submodule.url, submodule.ref])
- if submodule.ref not in result:
- # We could fall back to the git shasum if the parsed remote ref does not exist in
- # the git repository but that would most certainly be outdated, so bail out here.
- sys.exit('\nERROR: No valid remote found!')
- sys.stdout.flush()
- submodule_dict[submodule.path] = submodule
- print('done.\n')
- return list(submodule_dict.values())
-
def readSubmodules():
git_deps = subprocess.check_output(['git', 'show', chromium_version +':.DEPS.git'])
@@ -119,7 +102,7 @@ def readSubmodules():
if path in submodule_dict:
del submodule_dict[path]
- return sanityCheckModules(submodule_dict.values())
+ return submodule_dict.values()
def findSnapshotBaselineSha1():
if not os.path.isdir(snapshot_src_dir):