OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 """git drover: A tool for merging changes to release branches.""" | 5 """git drover: A tool for merging changes to release branches.""" |
6 | 6 |
7 import argparse | 7 import argparse |
8 import cPickle | 8 import cPickle |
9 import functools | 9 import functools |
10 import logging | 10 import logging |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 FILES_TO_LINK = [ | 207 FILES_TO_LINK = [ |
208 'refs', | 208 'refs', |
209 'logs/refs', | 209 'logs/refs', |
210 'info/refs', | 210 'info/refs', |
211 'info/exclude', | 211 'info/exclude', |
212 'objects', | 212 'objects', |
213 'hooks', | 213 'hooks', |
214 'packed-refs', | 214 'packed-refs', |
215 'remotes', | 215 'remotes', |
216 'rr-cache', | 216 'rr-cache', |
217 'svn', | |
218 ] | 217 ] |
219 FILES_TO_COPY = ['config', 'HEAD'] | 218 FILES_TO_COPY = ['config', 'HEAD'] |
220 | 219 |
221 def _create_checkout(self): | 220 def _create_checkout(self): |
222 """Creates a checkout to use for cherry-picking. | 221 """Creates a checkout to use for cherry-picking. |
223 | 222 |
224 This creates a checkout similarly to git-new-workdir. Most of the .git | 223 This creates a checkout similarly to git-new-workdir. Most of the .git |
225 directory is shared with the |self._parent_repo| using symlinks. This | 224 directory is shared with the |self._parent_repo| using symlinks. This |
226 differs from git-new-workdir in that the config is forked instead of shared. | 225 differs from git-new-workdir in that the config is forked instead of shared. |
227 This is so the new workdir can be a sparse checkout without affecting | 226 This is so the new workdir can be a sparse checkout without affecting |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 cherry_pick_change(options.branch, options.cherry_pick, | 441 cherry_pick_change(options.branch, options.cherry_pick, |
443 options.parent_checkout, options.dry_run, | 442 options.parent_checkout, options.dry_run, |
444 options.verbose) | 443 options.verbose) |
445 except Error as e: | 444 except Error as e: |
446 print 'Error:', e.message | 445 print 'Error:', e.message |
447 sys.exit(128) | 446 sys.exit(128) |
448 | 447 |
449 | 448 |
450 if __name__ == '__main__': | 449 if __name__ == '__main__': |
451 main() | 450 main() |
OLD | NEW |