# HG changeset patch # User Peter Hosey # Date 1218436189 25200 # Node ID 10948e4fd07037052f0812d5e738ad409f235451 # Parent 9eda9139d627daded5f74728fb5f3326481719cb Move the color constants above the format strings, since the color constants are more editable. diff --git a/diff-colorize.py b/diff-colorize.py --- a/diff-colorize.py +++ b/diff-colorize.py @@ -1,15 +1,15 @@ #!/usr/bin/env python -RESET_FORMAT = '\033[0m' -COLOR_FORMAT = '\033[38;5;%um' -BEGIN_REVERSE_FORMAT = '\033[7m' -END_REVERSE_FORMAT = '\033[27m' - INDEX_COLOR = 32 REMOVED_COLOR = 203 ADDED_COLOR = 2 HUNK_START_COLOR = 32 +RESET_FORMAT = '\033[0m' +COLOR_FORMAT = '\033[38;5;%um' +BEGIN_REVERSE_FORMAT = '\033[7m' +END_REVERSE_FORMAT = '\033[27m' + class OrderedDict(dict): def __init__(self, input=None): if input is None: