| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Writes the most recent "Cr-Commit-Position" value on the master branch | 5 """Writes the most recent "Cr-Commit-Position" value on the master branch |
| 6 to a C header file. | 6 to a C header file. |
| 7 | 7 |
| 8 Usage: last_commit_position.py <dir> <outfile> <headerguard> | 8 Usage: last_commit_position.py <dir> <outfile> <headerguard> |
| 9 | 9 |
| 10 <dir> | 10 <dir> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if len(sys.argv) != 4: | 88 if len(sys.argv) != 4: |
| 89 print "Wrong number of arguments" | 89 print "Wrong number of arguments" |
| 90 sys.exit(1) | 90 sys.exit(1) |
| 91 | 91 |
| 92 git_directory = sys.argv[1] | 92 git_directory = sys.argv[1] |
| 93 output_file = sys.argv[2] | 93 output_file = sys.argv[2] |
| 94 header_guard = sys.argv[3] | 94 header_guard = sys.argv[3] |
| 95 | 95 |
| 96 value = FetchCommitPosition(git_directory) | 96 value = FetchCommitPosition(git_directory) |
| 97 if not value: | 97 if not value: |
| 98 print "Could not get last commit position." | 98 value = 'UNKNOWN' |
| 99 sys.exit(1) | |
| 100 | 99 |
| 101 WriteHeader(output_file, header_guard, value) | 100 WriteHeader(output_file, header_guard, value) |
| OLD | NEW |