# HG changeset patch # User Martin Geisler # Date 1301223565 -7200 # Node ID 1ce0e80799c081be3267b4a67a42bbd72f2215c1 # Parent e5390a8b56db021b47660910532ba6b3cceb6407 ui: label prompts, default to yellow prompts diff -r e5390a8b56db -r 1ce0e80799c0 hgext/color.py --- a/hgext/color.py Sun Mar 27 12:41:55 2011 +0200 +++ b/hgext/color.py Sun Mar 27 12:59:25 2011 +0200 @@ -107,6 +107,7 @@ 'diff.trailingwhitespace': 'bold red_background', 'diffstat.deleted': 'red', 'diffstat.inserted': 'green', + 'ui.prompt': 'yellow', 'log.changeset': 'yellow', 'resolve.resolved': 'green bold', 'resolve.unresolved': 'red bold', diff -r e5390a8b56db -r 1ce0e80799c0 mercurial/ui.py --- a/mercurial/ui.py Sun Mar 27 12:41:55 2011 +0200 +++ b/mercurial/ui.py Sun Mar 27 12:59:25 2011 +0200 @@ -483,7 +483,7 @@ self.write(msg, ' ', default, "\n") return default try: - r = self._readline(msg + ' ') + r = self._readline(self.label(msg, 'ui.prompt') + ' ') if not r: return default return r diff -r e5390a8b56db -r 1ce0e80799c0 tests/test-diff-color.t --- a/tests/test-diff-color.t Sun Mar 27 12:41:55 2011 +0200 +++ b/tests/test-diff-color.t Sun Mar 27 12:59:25 2011 +0200 @@ -81,7 +81,7 @@ \x1b[0;36;1mold mode 100644\x1b[0m (esc) \x1b[0;36;1mnew mode 100755\x1b[0m (esc) 1 hunks, 1 lines changed - examine changes to 'a'? [Ynsfdaq?] + \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) c a @@ -91,7 +91,7 @@ a a c - record this change to 'a'? [Ynsfdaq?] + \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) $ echo $ echo "[extensions]" >> $HGRCPATH @@ -110,7 +110,7 @@ \x1b[0;36;1mold mode 100644\x1b[0m (esc) \x1b[0;36;1mnew mode 100755\x1b[0m (esc) 1 hunks, 1 lines changed - examine changes to 'a'? [Ynsfdaq?] + \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc) \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) c a @@ -120,6 +120,6 @@ a a c - record this change to 'a'? [Ynsfdaq?] + \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc) $ echo