Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: git_map_branches.py

Issue 1851283002: Fix coloring madness in depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Improve logic a bit Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_common.py ('k') | setup_color.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_map_branches.py
diff --git a/git_map_branches.py b/git_map_branches.py
index 50b403d4c9637f49a48f549166d57bf5ec541f15..016a0330f732a9e76286c79fdea08ef4ed10ec33 100755
--- a/git_map_branches.py
+++ b/git_map_branches.py
@@ -28,16 +28,17 @@ Branches are colorized as follows:
import argparse
import collections
import os
-import sys
import subprocess2
-
-from third_party import colorama
-from third_party.colorama import Fore, Style
+import sys
from git_common import current_branch, upstream, tags, get_branches_info
from git_common import get_git_version, MIN_UPSTREAM_TRACK_GIT_VERSION, hash_one
from git_common import run
+import setup_color
+
+from third_party.colorama import Fore, Style
+
DEFAULT_SEPARATOR = ' ' * 4
@@ -272,7 +273,7 @@ class BranchMapper(object):
def main(argv):
- colorama.init(wrap="TERM" not in os.environ)
+ setup_color.init()
if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
print >> sys.stderr, (
'This tool will not show all tracking information for git version '
« no previous file with comments | « git_common.py ('k') | setup_color.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698