OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Applies an issue from Rietveld. | 6 """Applies an issue from Rietveld. |
7 """ | 7 """ |
8 | 8 |
9 import getpass | 9 import getpass |
10 import logging | 10 import logging |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 options.issue, options.patchset, | 137 options.issue, options.patchset, |
138 options.server, options.issue) | 138 options.server, options.issue) |
139 return 1 | 139 return 1 |
140 for patch in patchset.patches: | 140 for patch in patchset.patches: |
141 print(patch) | 141 print(patch) |
142 full_dir = os.path.abspath(options.root_dir) | 142 full_dir = os.path.abspath(options.root_dir) |
143 scm_type = scm.determine_scm(full_dir) | 143 scm_type = scm.determine_scm(full_dir) |
144 if scm_type == 'svn': | 144 if scm_type == 'svn': |
145 scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None) | 145 scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None) |
146 elif scm_type == 'git': | 146 elif scm_type == 'git': |
147 scm_obj = checkout.GitCheckout(full_dir, None, None) | 147 scm_obj = checkout.GitCheckout(full_dir, None, None, None, None) |
iannucci
2013/10/03 17:50:01
blarg, we should really call these by kwarg. I hav
| |
148 elif scm_type == None: | 148 elif scm_type == None: |
149 scm_obj = checkout.RawCheckout(full_dir, None, None) | 149 scm_obj = checkout.RawCheckout(full_dir, None, None) |
150 else: | 150 else: |
151 parser.error('Couldn\'t determine the scm') | 151 parser.error('Couldn\'t determine the scm') |
152 | 152 |
153 # TODO(maruel): HACK, remove me. | 153 # TODO(maruel): HACK, remove me. |
154 # When run a build slave, make sure buildbot knows that the checkout was | 154 # When run a build slave, make sure buildbot knows that the checkout was |
155 # modified. | 155 # modified. |
156 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot': | 156 if options.root_dir == 'src' and getpass.getuser() == 'chrome-bot': |
157 # See sourcedirIsPatched() in: | 157 # See sourcedirIsPatched() in: |
(...skipping 27 matching lines...) Expand all Loading... | |
185 '--nohooks', | 185 '--nohooks', |
186 '--delete_unversioned_trees', | 186 '--delete_unversioned_trees', |
187 ], | 187 ], |
188 cwd=gclient_root) | 188 cwd=gclient_root) |
189 return 0 | 189 return 0 |
190 | 190 |
191 | 191 |
192 if __name__ == "__main__": | 192 if __name__ == "__main__": |
193 fix_encoding.fix_encoding() | 193 fix_encoding.fix_encoding() |
194 sys.exit(main()) | 194 sys.exit(main()) |
OLD | NEW |