https://bz.mercurial-scm.org/show_bug.cgi?id=6051

            Bug ID: 6051
           Summary: Color on stderr falls back to ANSI on Windows with
                    stdout redirected to N
           Product: Mercurial
           Version: 4.8.1
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: bug
          Priority: normal
         Component: color
          Assignee: bugzi...@mercurial-scm.org
          Reporter: matt_harbi...@yahoo.com
                CC: mercurial-devel@mercurial-scm.org

$ hg log -r 100000000
abort: unknown revision '100000000'!   <-- text in red

$ ../hg log -r 100000000 >/dev/null
←[0;31mabort: unknown revision '100000000'!←[0m

Interestingly, the error text is also mangled on Windows 10.  There must be
more to it than only checking stdout in win32.enablevtmode(), because changing
that to stderr has no effect.

If the redirect is to a file, there are no ANSI codes in the output, but no
color either (on either Win7 or Win10).  Maybe it's related to NUL being
reported as a tty?  But I'm not sure why it wouldn't stick with win32 color
mode.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to