Mercurial > hg-stable
changeset 19078:5506e97e8298 stable
merge with i18n
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 21 Apr 2013 17:33:51 -0500 |
parents | 93493746c89a (diff) 331edfe229e0 (current diff) |
children | 1e433b5457fd |
files | |
diffstat | 6 files changed, 39 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sat Apr 20 19:01:36 2013 -0300 +++ b/hgext/color.py Sun Apr 21 17:33:51 2013 -0500 @@ -317,6 +317,9 @@ class colorui(uimod.ui): def popbuffer(self, labeled=False): + if self._colormode is None: + return super(colorui, self).popbuffer(labeled) + if labeled: return ''.join(self.label(a, label) for a, label in self._buffers.pop()) @@ -324,6 +327,9 @@ _colormode = 'ansi' def write(self, *args, **opts): + if self._colormode is None: + return super(colorui, self).write(*args, **opts) + label = opts.get('label', '') if self._buffers: self._buffers[-1].extend([(str(a), label) for a in args]) @@ -335,6 +341,9 @@ *[self.label(str(a), label) for a in args], **opts) def write_err(self, *args, **opts): + if self._colormode is None: + return super(colorui, self).write_err(*args, **opts) + label = opts.get('label', '') if self._colormode == 'win32': for a in args: @@ -344,6 +353,9 @@ *[self.label(str(a), label) for a in args], **opts) def label(self, msg, label): + if self._colormode is None: + return super(colorui, self).label(msg, label) + effects = [] for l in label.split(): s = _styles.get(l, '') @@ -386,8 +398,8 @@ ui.__class__ = colorui def colorcmd(orig, ui_, opts, cmd, cmdfunc): mode = _modesetup(ui_, opts) + colorui._colormode = mode if mode: - colorui._colormode = mode extstyles() configstyles(ui_) return orig(ui_, opts, cmd, cmdfunc)
--- a/mercurial/templates/static/style-gitweb.css Sat Apr 20 19:01:36 2013 -0300 +++ b/mercurial/templates/static/style-gitweb.css Sun Apr 21 17:33:51 2013 -0500 @@ -1,4 +1,4 @@ -body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; } +body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; } a { color:#0000cc; } a:hover, a:visited, a:active { color:#880000; } div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
--- a/mercurial/templates/static/style.css Sat Apr 20 19:01:36 2013 -0300 +++ b/mercurial/templates/static/style.css Sun Apr 21 17:33:51 2013 -0500 @@ -14,13 +14,13 @@ background-color: #666; padding: 2pt; color: white; - font-family: sans; + font-family: sans-serif; font-weight: bold; } .navigate a { background-color: #ccc; padding: 2pt; - font-family: sans; + font-family: sans-serif; color: black; }
--- a/tests/test-hgweb-commands.t Sat Apr 20 19:01:36 2013 -0300 +++ b/tests/test-hgweb-commands.t Sun Apr 21 17:33:51 2013 -0500 @@ -1178,13 +1178,13 @@ background-color: #666; padding: 2pt; color: white; - font-family: sans; + font-family: sans-serif; font-weight: bold; } .navigate a { background-color: #ccc; padding: 2pt; - font-family: sans; + font-family: sans-serif; color: black; }
--- a/tests/test-hgweb.t Sat Apr 20 19:01:36 2013 -0300 +++ b/tests/test-hgweb.t Sun Apr 21 17:33:51 2013 -0500 @@ -312,10 +312,10 @@ $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server 200 Script output follows - content-length: 4619 + content-length: 4607 content-type: text/css - body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; } + body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; } a { color:#0000cc; } a:hover, a:visited, a:active { color:#880000; } div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
--- a/tests/test-status-color.t Sat Apr 20 19:01:36 2013 -0300 +++ b/tests/test-status-color.t Sun Apr 21 17:33:51 2013 -0500 @@ -109,6 +109,25 @@ \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) + +Make sure --color=never works + $ hg status --color=never + ? a/1/in_a_1 + ? a/in_a + ? b/1/in_b_1 + ? b/2/in_b_2 + ? b/in_b + ? in_root + +Make sure ui.formatted=False works + $ hg status --config ui.formatted=False + ? a/1/in_a_1 + ? a/in_a + ? b/1/in_b_1 + ? b/2/in_b_2 + ? b/in_b + ? in_root + $ cd .. $ hg init repo2