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

Side by Side Diff: tools/git-sync-deps

Issue 1646863002: tools/git-sync-deps: fix error in git syntax for changing origin (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2014 Google Inc. 2 # Copyright 2014 Google Inc.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 7
8 """Parse a DEPS file and git checkout all of the dependencies. 8 """Parse a DEPS file and git checkout all of the dependencies.
9 9
10 Args: 10 Args:
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 [git, 'checkout', '--quiet', checkoutable], cwd=directory): 137 [git, 'checkout', '--quiet', checkoutable], cwd=directory):
138 # if this succeeds, skip slow `git fetch`. 138 # if this succeeds, skip slow `git fetch`.
139 if verbose: 139 if verbose:
140 sys.stdout.write('%s\n @ %s\n' % (directory, checkoutable)) 140 sys.stdout.write('%s\n @ %s\n' % (directory, checkoutable))
141 return 141 return
142 142
143 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory) 143 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
144 144
145 if 0 != subprocess.call( 145 if 0 != subprocess.call(
146 [git, 'checkout', '--quiet', checkoutable], cwd=directory): 146 [git, 'checkout', '--quiet', checkoutable], cwd=directory):
147 subprocess.check_call([git, 'remote', 'set-url', repo], cwd=directory) 147 subprocess.check_call(
148 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
148 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory) 149 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
149 subprocess.check_call([git, 'checkout', '--quiet'], cwd=directory) 150 subprocess.check_call([git, 'checkout', '--quiet'], cwd=directory)
150 151
151 if verbose: 152 if verbose:
152 sys.stdout.write('%s\n @ %s\n' % (directory, checkoutable)) # Success. 153 sys.stdout.write('%s\n @ %s\n' % (directory, checkoutable)) # Success.
153 154
154 155
155 def parse_file_to_dict(path): 156 def parse_file_to_dict(path):
156 dictionary = {} 157 dictionary = {}
157 execfile(path, dictionary) 158 execfile(path, dictionary)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if '--help' in argv or '-h' in argv: 221 if '--help' in argv or '-h' in argv:
221 usage(deps_file_path) 222 usage(deps_file_path)
222 return 1 223 return 1
223 224
224 git_sync_deps(deps_file_path, argv, verbose) 225 git_sync_deps(deps_file_path, argv, verbose)
225 return 0 226 return 0
226 227
227 228
228 if __name__ == '__main__': 229 if __name__ == '__main__':
229 exit(main(sys.argv[1:])) 230 exit(main(sys.argv[1:]))
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