| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """ | 6 """ |
| 7 Provides an augmented `git log --graph` view. In particular, it also annotates | 7 Provides an augmented `git log --graph` view. In particular, it also annotates |
| 8 commits with branches + tags that point to them. Items are colorized as follows: | 8 commits with branches + tags that point to them. Items are colorized as follows: |
| 9 * Cyan - Currently checked out branch | 9 * Cyan - Currently checked out branch |
| 10 * Green - Local branch | 10 * Green - Local branch |
| 11 * Red - Remote branches | 11 * Red - Remote branches |
| 12 * Magenta - Tags | 12 * Magenta - Tags |
| 13 * Blue background - The currently checked out commit | 13 * Blue background - The currently checked out commit |
| 14 """ | 14 """ |
| 15 |
| 15 import sys | 16 import sys |
| 16 | 17 |
| 17 import subprocess2 | 18 import subprocess2 |
| 18 | 19 |
| 19 from git_common import current_branch, branches, tags, config_list, GIT_EXE | 20 from git_common import current_branch, branches, tags, config_list, GIT_EXE |
| 20 | 21 |
| 21 from third_party import colorama | 22 from third_party import colorama |
| 22 | 23 |
| 23 CYAN = colorama.Fore.CYAN | 24 CYAN = colorama.Fore.CYAN |
| 24 GREEN = colorama.Fore.GREEN | 25 GREEN = colorama.Fore.GREEN |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 pass | 82 pass |
| 82 finally: | 83 finally: |
| 83 sys.stderr.close() | 84 sys.stderr.close() |
| 84 sys.stdout.close() | 85 sys.stdout.close() |
| 85 return 0 | 86 return 0 |
| 86 | 87 |
| 87 | 88 |
| 88 if __name__ == '__main__': | 89 if __name__ == '__main__': |
| 89 sys.exit(main()) | 90 sys.exit(main()) |
| 90 | 91 |
| OLD | NEW |