| 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 |
| 11 import os | 11 import os |
| 12 import shutil | 12 import shutil |
| 13 import subprocess | 13 import subprocess |
| 14 import sys | 14 import sys |
| 15 import tempfile | 15 import tempfile |
| 16 | 16 |
| 17 import git_common | 17 import git_common |
| 18 | 18 |
| 19 | 19 |
| 20 class Error(Exception): | 20 class Error(Exception): |
| 21 pass | 21 pass |
| 22 | 22 |
| 23 | 23 |
| 24 |
| 24 _PATCH_ERROR_MESSAGE = """Patch failed to apply. | 25 _PATCH_ERROR_MESSAGE = """Patch failed to apply. |
| 25 | 26 |
| 26 A workdir for this cherry-pick has been created in | 27 A workdir for this cherry-pick has been created in |
| 27 {0} | 28 {0} |
| 28 | 29 |
| 29 To continue, resolve the conflicts there and run | 30 To continue, resolve the conflicts there and run |
| 30 git drover --continue {0} | 31 git drover --continue {0} |
| 31 | 32 |
| 32 To abort this cherry-pick run | 33 To abort this cherry-pick run |
| 33 git drover --abort {0} | 34 git drover --abort {0} |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 cherry_pick_change(options.branch, options.cherry_pick, | 416 cherry_pick_change(options.branch, options.cherry_pick, |
| 416 options.parent_checkout, options.dry_run, | 417 options.parent_checkout, options.dry_run, |
| 417 options.verbose) | 418 options.verbose) |
| 418 except Error as e: | 419 except Error as e: |
| 419 print 'Error:', e.message | 420 print 'Error:', e.message |
| 420 sys.exit(128) | 421 sys.exit(128) |
| 421 | 422 |
| 422 | 423 |
| 423 if __name__ == '__main__': | 424 if __name__ == '__main__': |
| 424 main() | 425 main() |
| OLD | NEW |