| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 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 """ | 6 """ |
| 7 Tool to perform checkouts in one easy command line! | 7 Tool to perform checkouts in one easy command line! |
| 8 | 8 |
| 9 Usage: | 9 Usage: |
| 10 fetch <recipe> [--property=value [--property2=value2 ...]] | 10 fetch <recipe> [--property=value [--property2=value2 ...]] |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 self.run_gclient('sync') | 117 self.run_gclient('sync') |
| 118 | 118 |
| 119 # Configure git. | 119 # Configure git. |
| 120 wd = os.path.join(self.base, self.root) | 120 wd = os.path.join(self.base, self.root) |
| 121 if self.options.dry_run: | 121 if self.options.dry_run: |
| 122 print 'cd %s' % wd | 122 print 'cd %s' % wd |
| 123 self.run_git( | 123 self.run_git( |
| 124 'submodule', 'foreach', | 124 'submodule', 'foreach', |
| 125 'git config -f $toplevel/.git/config submodule.$name.ignore all', | 125 'git config -f $toplevel/.git/config submodule.$name.ignore all', |
| 126 cwd=wd) | 126 cwd=wd) |
| 127 self.run_git( |
| 128 'config', '--add', 'remote.origin.fetch', |
| 129 '+refs/tags/*:refs/tags/*', cwd=wd) |
| 127 self.run_git('config', 'diff.ignoreSubmodules', 'all', cwd=wd) | 130 self.run_git('config', 'diff.ignoreSubmodules', 'all', cwd=wd) |
| 128 | 131 |
| 129 | 132 |
| 130 class GclientGitSvnCheckout(GclientGitCheckout, SvnCheckout): | 133 class GclientGitSvnCheckout(GclientGitCheckout, SvnCheckout): |
| 131 | 134 |
| 132 def __init__(self, options, spec, root): | 135 def __init__(self, options, spec, root): |
| 133 super(GclientGitSvnCheckout, self).__init__(options, spec, root) | 136 super(GclientGitSvnCheckout, self).__init__(options, spec, root) |
| 134 assert 'svn_url' in self.spec | 137 assert 'svn_url' in self.spec |
| 135 assert 'svn_branch' in self.spec | 138 assert 'svn_branch' in self.spec |
| 136 assert 'svn_ref' in self.spec | 139 assert 'svn_ref' in self.spec |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 290 |
| 288 | 291 |
| 289 def main(): | 292 def main(): |
| 290 options, recipe, props = handle_args(sys.argv) | 293 options, recipe, props = handle_args(sys.argv) |
| 291 spec, root = run_recipe_fetch(recipe, props) | 294 spec, root = run_recipe_fetch(recipe, props) |
| 292 return run(options, spec, root) | 295 return run(options, spec, root) |
| 293 | 296 |
| 294 | 297 |
| 295 if __name__ == '__main__': | 298 if __name__ == '__main__': |
| 296 sys.exit(main()) | 299 sys.exit(main()) |
| OLD | NEW |