OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Swarming Authors. All rights reserved. | 2 # Copyright 2014 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Prints a short log from HEAD (or [end]) to a pseudo revision number.""" | 6 """Prints a short log from HEAD (or [end]) to a pseudo revision number.""" |
7 | 7 |
8 import optparse | 8 import optparse |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
11 | 11 |
12 import calculate_version # pylint: disable=W0403 | 12 import calculate_version # pylint: disable=W0403 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 except subprocess.CalledProcessError: | 93 except subprocess.CalledProcessError: |
94 print >> sys.stderr, ( | 94 print >> sys.stderr, ( |
95 '\nFailed to list files of last %d commits.' % nb_commits) | 95 '\nFailed to list files of last %d commits.' % nb_commits) |
96 return 1 | 96 return 1 |
97 | 97 |
98 return 0 | 98 return 0 |
99 | 99 |
100 | 100 |
101 if __name__ == '__main__': | 101 if __name__ == '__main__': |
102 sys.exit(main()) | 102 sys.exit(main()) |
OLD | NEW |