Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(973)

Side by Side Diff: testing_support/gerrit-init.sh

Issue 196063003: Don't use -rc versions of gerrit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: code doc Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 set -e 6 set -e
7 7
8 http_port=8080 8 http_port=8080
9 ssh_port=29418 9 ssh_port=29418
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 j = json.load(sys.stdin) 81 j = json.load(sys.stdin)
82 items = [(x, gerrit_re.match(x['name'])) for x in j['items']] 82 items = [(x, gerrit_re.match(x['name'])) for x in j['items']]
83 items = [(x, m.group(1), m.group(2)) for x, m in items if m] 83 items = [(x, m.group(1), m.group(2)) for x, m in items if m]
84 def _cmp(a, b): 84 def _cmp(a, b):
85 an = a[1].split('.') 85 an = a[1].split('.')
86 bn = b[1].split('.') 86 bn = b[1].split('.')
87 while len(an) < len(bn): 87 while len(an) < len(bn):
88 an.append('0') 88 an.append('0')
89 while len(bn) < len(an): 89 while len(bn) < len(an):
90 bn.append('0') 90 bn.append('0')
91 an.append(a[2][3:] if a[2] else '1000') 91 # Disable using -rc versions. This is a temporary hack to avoid
92 bn.append(b[2][3:] if b[2] else '1000') 92 # picking up version 2.9-rc0, which requires java 7. These lines
93 # should be un-commented after this bug is fixed:
94 # https://code.google.com/p/chromium/issues/detail?id=346369
95 # an.append(a[2][3:] if a[2] else '1000')
96 # bn.append(b[2][3:] if b[2] else '1000')
93 for i in range(len(an)): 97 for i in range(len(an)):
94 if an[i] != bn[i]: 98 if an[i] != bn[i]:
95 return -1 if int(an[i]) > int(bn[i]) else 1 99 return -1 if int(an[i]) > int(bn[i]) else 1
96 return 0 100 return 0
97 101
98 if requested_version: 102 if requested_version:
99 for info, version in items: 103 for info, version in items:
100 if version == requested_version: 104 if version == requested_version:
101 print '"%s" "%s"' % (info['name'], info['md5Hash']) 105 print '"%s" "%s"' % (info['name'], info['md5Hash'])
102 sys.exit(0) 106 sys.exit(0)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 To use SSH API: 203 To use SSH API:
200 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit 204 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit
201 205
202 To enable 'git push' without a password prompt: 206 To enable 'git push' without a password prompt:
203 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials' 207 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials'
204 208
205 To stop the server: 209 To stop the server:
206 ${rundir}/bin/gerrit.sh stop 210 ${rundir}/bin/gerrit.sh stop
207 211
208 EOF 212 EOF
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698