changeset 12942:05fffd665170 stable

tests: use (esc) for all non-ASCII test output
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 08 Nov 2010 01:41:41 +0100
parents b911cb80c671
children 7439ea4146f8
files tests/test-bookmarks-current.t tests/test-bookmarks.t tests/test-branch-option.t tests/test-branches.t tests/test-churn.t tests/test-convert-darcs.t tests/test-convert-svn-encoding.t tests/test-diff-color.t tests/test-diff-ignore-whitespace.t tests/test-diff-newlines.t tests/test-encoding.t tests/test-eolfilename.t tests/test-grep.t tests/test-http-branchmap.t tests/test-log.t tests/test-mq-guards.t tests/test-mq-qpush-fail.t tests/test-mq.t tests/test-patchbomb.t tests/test-progress.t tests/test-revset.t tests/test-status-color.t
diffstat 22 files changed, 276 insertions(+), 278 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bookmarks-current.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-bookmarks-current.t	Mon Nov 08 01:41:41 2010 +0100
@@ -24,7 +24,7 @@
 
   $ hg --config extensions.color= --config color.mode=ansi \
   >     bookmark --color=always
-   * X                         -1:000000000000
+  \x1b[0;32m * X                         -1:000000000000\x1b[0m (esc)
 
 update to bookmark X
 
--- a/tests/test-bookmarks.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-bookmarks.t	Mon Nov 08 01:41:41 2010 +0100
@@ -21,7 +21,7 @@
 
   $ hg --config extensions.color= --config color.mode=ansi \
   >    bookmarks --color=always
-   * X                         -1:000000000000
+  \x1b[0;32m * X                         -1:000000000000\x1b[0m (esc)
 
   $ echo a > a
   $ hg add a
--- a/tests/test-branch-option.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-branch-option.t	Mon Nov 08 01:41:41 2010 +0100
@@ -34,13 +34,13 @@
   $ hg up 0
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg --encoding utf-8 branch æ
-  marked working directory as branch æ
+  marked working directory as branch \xc3\xa6 (esc)
   $ echo ae1 > foo
   $ hg ci -d '0 0' -mae1
   $ hg up 0
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg --encoding utf-8 branch -f æ
-  marked working directory as branch æ
+  marked working directory as branch \xc3\xa6 (esc)
   $ echo ae2 > foo
   $ hg ci -d '0 0' -mae2
   created new head
--- a/tests/test-branches.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-branches.t	Mon Nov 08 01:41:41 2010 +0100
@@ -357,19 +357,19 @@
   $ hg up -C b
   2 files updated, 0 files merged, 3 files removed, 0 files unresolved
   $ hg branches --color=always
-  b                             13:6ac12926b8c3
-  a branch name much longer than the default justification used by branches 7:10ff5895aa57
-  a                              5:d8cbc61dbaa6 (inactive)
-  default                        0:19709c5a4e75 (inactive)
+  \x1b[0;32mb\x1b[0m \x1b[0;33m                            13:6ac12926b8c3\x1b[0m (esc)
+  \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;33m7:10ff5895aa57\x1b[0m (esc)
+  \x1b[0;0ma\x1b[0m \x1b[0;33m                             5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
+  \x1b[0;0mdefault\x1b[0m \x1b[0;33m                       0:19709c5a4e75\x1b[0m (inactive) (esc)
 
 default closed branch color:
 
   $ hg branches --color=always --closed
-  b                             13:6ac12926b8c3
-  a branch name much longer than the default justification used by branches 7:10ff5895aa57
-  c                             14:717d2e6fabe1 (closed)
-  a                              5:d8cbc61dbaa6 (inactive)
-  default                        0:19709c5a4e75 (inactive)
+  \x1b[0;32mb\x1b[0m \x1b[0;33m                            13:6ac12926b8c3\x1b[0m (esc)
+  \x1b[0;0ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;33m7:10ff5895aa57\x1b[0m (esc)
+  \x1b[0;30;1mc\x1b[0m \x1b[0;33m                            14:717d2e6fabe1\x1b[0m (closed) (esc)
+  \x1b[0;0ma\x1b[0m \x1b[0;33m                             5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
+  \x1b[0;0mdefault\x1b[0m \x1b[0;33m                       0:19709c5a4e75\x1b[0m (inactive) (esc)
 
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "color =" >> $HGRCPATH
@@ -383,16 +383,16 @@
 custom branch colors:
 
   $ hg branches --color=always
-  b                             13:6ac12926b8c3
-  a branch name much longer than the default justification used by branches 7:10ff5895aa57
-  a                              5:d8cbc61dbaa6 (inactive)
-  default                        0:19709c5a4e75 (inactive)
+  \x1b[0;31mb\x1b[0m \x1b[0;36m                            13:6ac12926b8c3\x1b[0m (esc)
+  \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;36m7:10ff5895aa57\x1b[0m (esc)
+  \x1b[0;35ma\x1b[0m \x1b[0;36m                             5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
+  \x1b[0;35mdefault\x1b[0m \x1b[0;36m                       0:19709c5a4e75\x1b[0m (inactive) (esc)
 
 custom closed branch color:
 
   $ hg branches --color=always --closed
-  b                             13:6ac12926b8c3
-  a branch name much longer than the default justification used by branches 7:10ff5895aa57
-  c                             14:717d2e6fabe1 (closed)
-  a                              5:d8cbc61dbaa6 (inactive)
-  default                        0:19709c5a4e75 (inactive)
+  \x1b[0;31mb\x1b[0m \x1b[0;36m                            13:6ac12926b8c3\x1b[0m (esc)
+  \x1b[0;32ma branch name much longer than the default justification used by branches\x1b[0m \x1b[0;36m7:10ff5895aa57\x1b[0m (esc)
+  \x1b[0;34mc\x1b[0m \x1b[0;36m                            14:717d2e6fabe1\x1b[0m (closed) (esc)
+  \x1b[0;35ma\x1b[0m \x1b[0;36m                             5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
+  \x1b[0;35mdefault\x1b[0m \x1b[0;36m                       0:19709c5a4e75\x1b[0m (inactive) (esc)
--- a/tests/test-churn.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-churn.t	Mon Nov 08 01:41:41 2010 +0100
@@ -102,9 +102,9 @@
 
   $ hg --config extensions.color= churn --config color.mode=ansi \
   >     --diffstat --color=always
-  user1           +3/-1 +++++++++++++++++++++++++++++++++++++++++--------------
-  user3           +3/-0 +++++++++++++++++++++++++++++++++++++++++
-  user2           +2/-0 +++++++++++++++++++++++++++
+  user1           +3/-1 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m\x1b[0;31m--------------\x1b[0m (esc)
+  user3           +3/-0 \x1b[0;32m+++++++++++++++++++++++++++++++++++++++++\x1b[0m (esc)
+  user2           +2/-0 \x1b[0;32m+++++++++++++++++++++++++++\x1b[0m (esc)
 
 
 changeset number churn
--- a/tests/test-convert-darcs.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-convert-darcs.t	Mon Nov 08 01:41:41 2010 +0100
@@ -82,7 +82,7 @@
 darcs is encoding agnostic, so it takes whatever bytes it's given
 
   $ darcs record -a -l -m 'p4: desc ñ' -A 'author ñ'
-  Finished recording patch 'p4: desc ñ'
+  Finished recording patch 'p4: desc \xc3\xb1' (esc)
 
 Test latin-1 commit message
 
@@ -90,7 +90,7 @@
   $ printf "p5: desc " > ../p5
   $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
   $ darcs record -a -l --logfile ../p5
-  Finished recording patch 'p5: desc '
+  Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc)
  
   $ glog()
   > {
--- a/tests/test-convert-svn-encoding.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-convert-svn-encoding.t	Mon Nov 08 01:41:41 2010 +0100
@@ -20,8 +20,8 @@
   found trunk at 'trunk'
   found tags at 'tags'
   found branches at 'branches'
-  found branch branché at 5
-  found branch branchée at 6
+  found branch branch\xc3\xa9 at 5 (esc)
+  found branch branch\xc3\xa9e at 6 (esc)
   scanning: 1 revisions
   reparent to file://*/svn-repo/trunk (glob)
   fetching revision log for "/trunk" from 4 to 0
@@ -34,18 +34,18 @@
   '/tags' is not under '/trunk', ignoring
   scanning: 2 revisions
   reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
-  fetching revision log for "/branches/branché" from 5 to 0
+  fetching revision log for "/branches/branch\xc3\xa9" from 5 to 0 (esc)
   parsing revision 5 (1 changes)
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
-  found parent of branch /branches/branché at 4: /trunk
+  found parent of branch /branches/branch\xc3\xa9 at 4: /trunk (esc)
   scanning: 3 revisions
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
-  fetching revision log for "/branches/branchée" from 6 to 0
+  fetching revision log for "/branches/branch\xc3\xa9e" from 6 to 0 (esc)
   parsing revision 6 (1 changes)
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
-  found parent of branch /branches/branchée at 5: /branches/branché
+  found parent of branch /branches/branch\xc3\xa9e at 5: /branches/branch\xc3\xa9 (esc)
   scanning: 4 revisions
   scanning: 5 revisions
   scanning: 6 revisions
@@ -58,63 +58,63 @@
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
   converting: 1/6 revisions (16.67%)
   reparent to file://*/svn-repo/trunk (glob)
-  scanning paths: /trunk/à 0/3 (0.00%)
-  scanning paths: /trunk/à/é 1/3 (33.33%)
-  scanning paths: /trunk/é 2/3 (66.67%)
-  à/é
-  getting files: à/é 1/2 (50.00%)
-  é
-  getting files: é 2/2 (100.00%)
+  scanning paths: /trunk/\xc3\xa0 0/3 (0.00%) (esc)
+  scanning paths: /trunk/\xc3\xa0/e\xcc\x81 1/3 (33.33%) (esc)
+  scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc)
+  \xc3\xa0/e\xcc\x81 (esc)
+  getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc)
+  \xc3\xa9 (esc)
+  getting files: \xc3\xa9 2/2 (100.00%) (esc)
   3 copy files
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
   converting: 2/6 revisions (33.33%)
-  scanning paths: /trunk/à 0/4 (0.00%)
+  scanning paths: /trunk/\xc3\xa0 0/4 (0.00%) (esc)
   gone from -1
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/trunk (glob)
-  scanning paths: /trunk/è 1/4 (25.00%)
-  copied to è from é@2
-  scanning paths: /trunk/é 2/4 (50.00%)
+  scanning paths: /trunk/\xc3\xa8 1/4 (25.00%) (esc)
+  copied to \xc3\xa8 from \xc3\xa9@2 (esc)
+  scanning paths: /trunk/\xc3\xa9 2/4 (50.00%) (esc)
   gone from -1
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/trunk (glob)
-  scanning paths: /trunk/ù 3/4 (75.00%)
-  mark /trunk/ù came from à:2
-  à/é
-  getting files: à/é 1/4 (25.00%)
-  è
-  getting files: è 2/4 (50.00%)
-   è: copy é:6b67ccefd5ce6de77e7ead4f5292843a0255329f
-  é
-  getting files: é 3/4 (75.00%)
-  ù/é
-  getting files: ù/é 4/4 (100.00%)
-   ù/é: copy à/é:a9092a3d84a37b9993b5c73576f6de29b7ea50f6
+  scanning paths: /trunk/\xc3\xb9 3/4 (75.00%) (esc)
+  mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc)
+  \xc3\xa0/e\xcc\x81 (esc)
+  getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc)
+  \xc3\xa8 (esc)
+  getting files: \xc3\xa8 2/4 (50.00%) (esc)
+   \xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc)
+  \xc3\xa9 (esc)
+  getting files: \xc3\xa9 3/4 (75.00%) (esc)
+  \xc3\xb9/e\xcc\x81 (esc)
+  getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc)
+   \xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
   2 remove files
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
   converting: 3/6 revisions (50.00%)
-  scanning paths: /trunk/è 0/2 (0.00%)
+  scanning paths: /trunk/\xc3\xa8 0/2 (0.00%) (esc)
   gone from -1
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/trunk (glob)
-  scanning paths: /trunk/ù 1/2 (50.00%)
+  scanning paths: /trunk/\xc3\xb9 1/2 (50.00%) (esc)
   gone from -1
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/trunk (glob)
-  è
-  getting files: è 1/2 (50.00%)
-  ù/é
-  getting files: ù/é 2/2 (100.00%)
+  \xc3\xa8 (esc)
+  getting files: \xc3\xa8 1/2 (50.00%) (esc)
+  \xc3\xb9/e\xcc\x81 (esc)
+  getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc)
   1 branch to branch?
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
   converting: 4/6 revisions (66.67%)
   reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
-  scanning paths: /branches/branché 0/1 (0.00%)
+  scanning paths: /branches/branch\xc3\xa9 0/1 (0.00%) (esc)
   0 branch to branch?e
   source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
   converting: 5/6 revisions (83.33%)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
-  scanning paths: /branches/branchée 0/1 (0.00%)
+  scanning paths: /branches/branch\xc3\xa9e 0/1 (0.00%) (esc)
   reparent to file://*/svn-repo (glob)
   reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
   reparent to file://*/svn-repo (glob)
--- a/tests/test-diff-color.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-diff-color.t	Mon Nov 08 01:41:41 2010 +0100
@@ -32,15 +32,15 @@
 default context
 
   $ hg diff --nodates --color=always
-  diff -r cf9f4ba66af2 a
-  --- a/a
-  +++ b/a
-  @@ -2,7 +2,7 @@
+  \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
+  \x1b[0;31;1m--- a/a\x1b[0m (esc)
+  \x1b[0;32;1m+++ b/a\x1b[0m (esc)
+  \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
    c
    a
    a
-  -b
-  +dd
+  \x1b[0;31m-b\x1b[0m (esc)
+  \x1b[0;32m+dd\x1b[0m (esc)
    a
    a
    c
@@ -48,21 +48,21 @@
 --unified=2
 
   $ hg diff --nodates -U 2  --color=always
-  diff -r cf9f4ba66af2 a
-  --- a/a
-  +++ b/a
-  @@ -3,5 +3,5 @@
+  \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
+  \x1b[0;31;1m--- a/a\x1b[0m (esc)
+  \x1b[0;32;1m+++ b/a\x1b[0m (esc)
+  \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc)
    a
    a
-  -b
-  +dd
+  \x1b[0;31m-b\x1b[0m (esc)
+  \x1b[0;32m+dd\x1b[0m (esc)
    a
    a
 
 diffstat
 
   $ hg diff --stat --color=always
-   a |  2 +-
+   a |  2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc)
    1 files changed, 1 insertions(+), 1 deletions(-)
   $ echo "record=" >> $HGRCPATH
   $ echo "[ui]" >> $HGRCPATH
@@ -77,17 +77,17 @@
   > y
   > y
   > EOF
-  diff --git a/a b/a
-  old mode 100644
-  new mode 100755
+  \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
+  \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?] 
-  @@ -2,7 +2,7 @@
+  \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
    c
    a
    a
-  -b
-  +dd
+  \x1b[0;31m-b\x1b[0m (esc)
+  \x1b[0;32m+dd\x1b[0m (esc)
    a
    a
    c
@@ -105,17 +105,17 @@
   > y
   > y
   > EOF
-  diff --git a/a b/a
-  old mode 100644
-  new mode 100755
+  \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
+  \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?] 
-  @@ -2,7 +2,7 @@
+  \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
    c
    a
    a
-  -b
-  +dd
+  \x1b[0;31m-b\x1b[0m (esc)
+  \x1b[0;32m+dd\x1b[0m (esc)
    a
    a
    c
--- a/tests/test-diff-ignore-whitespace.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-diff-ignore-whitespace.t	Mon Nov 08 01:41:41 2010 +0100
@@ -402,10 +402,9 @@
   @@ -1,2 +1,3 @@
   -hello world
   -goodbye world
-  +hello world
-  +
-  +goodbye
world
-world
+  +hello world\r (esc)
+  +\r (esc)
+  +goodbye\rworld (esc)
 
 No completely blank lines to ignore:
 
@@ -416,10 +415,9 @@
   @@ -1,2 +1,3 @@
   -hello world
   -goodbye world
-  +hello world
-  +
-  +goodbye
world
-world
+  +hello world\r (esc)
+  +\r (esc)
+  +goodbye\rworld (esc)
 
 Only new line noticed:
 
@@ -429,7 +427,7 @@
   +++ b/foo
   @@ -1,2 +1,3 @@
    hello world
-  +
+  +\r (esc)
    goodbye world
 
   $ hg ndiff --ignore-all-space
@@ -438,7 +436,7 @@
   +++ b/foo
   @@ -1,2 +1,3 @@
    hello world
-  +
+  +\r (esc)
    goodbye world
 
 New line not noticed when space change ignored:
--- a/tests/test-diff-newlines.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-diff-newlines.t	Mon Nov 08 01:41:41 2010 +0100
@@ -13,6 +13,6 @@
   +++ b/a	Thu Jan 01 00:00:02 1970 +0000
   @@ -1,2 +1,3 @@
    confuse str.splitlines
-   embedded
newline
+   embedded\rnewline (esc)
   +clean diff
 
--- a/tests/test-encoding.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-encoding.t	Mon Nov 08 01:41:41 2010 +0100
@@ -30,7 +30,7 @@
   $ HGENCODING=ascii hg ci -l latin-1
   transaction abort!
   rollback completed
-  abort: decoding near ' encoded: ': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)!
+  abort: decoding near ' encoded: \xe9': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! (esc)
   [255]
 
 these should work
@@ -41,7 +41,7 @@
   $ HGENCODING=utf-8 hg ci -l utf-8
   $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
   $ HGENCODING=latin-1 hg branch `cat latin-1-tag`
-  marked working directory as branch 
+  marked working directory as branch \xe9 (esc)
   $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
   $ rm .hg/branch
 
@@ -86,7 +86,7 @@
 
   $ hg --encoding latin-1 log
   changeset:   5:093c6077d1c8
-  branch:      
+  branch:      \xe9 (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -95,35 +95,35 @@
   changeset:   4:94db611b4196
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     Added tag  for changeset ca661e7520de
+  summary:     Added tag \xe9 for changeset ca661e7520de (esc)
   
   changeset:   3:ca661e7520de
-  tag:         
+  tag:         \xe9 (esc)
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     utf-8 e' encoded: 
+  summary:     utf-8 e' encoded: \xe9 (esc)
   
   changeset:   2:650c6f3d55dd
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     latin-1 e' encoded: 
+  summary:     latin-1 e' encoded: \xe9 (esc)
   
   changeset:   1:0e5b7e3f9c4a
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     koi8-r:  = u'\u0440\u0442\u0443\u0442\u044c'
+  summary:     koi8-r: \xd2\xd4\xd5\xd4\xd8 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
   
   changeset:   0:1e78a93102a3
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     latin-1 e':  = u'\xe9'
+  summary:     latin-1 e': \xe9 = u'\\xe9' (esc)
   
 
 hg log (utf-8)
 
   $ hg --encoding utf-8 log
   changeset:   5:093c6077d1c8
-  branch:      é
+  branch:      \xc3\xa9 (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -132,28 +132,28 @@
   changeset:   4:94db611b4196
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     Added tag é for changeset ca661e7520de
+  summary:     Added tag \xc3\xa9 for changeset ca661e7520de (esc)
   
   changeset:   3:ca661e7520de
-  tag:         é
+  tag:         \xc3\xa9 (esc)
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     utf-8 e' encoded: é
+  summary:     utf-8 e' encoded: \xc3\xa9 (esc)
   
   changeset:   2:650c6f3d55dd
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     latin-1 e' encoded: é
+  summary:     latin-1 e' encoded: \xc3\xa9 (esc)
   
   changeset:   1:0e5b7e3f9c4a
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     koi8-r: ÒÔÕÔØ = u'\u0440\u0442\u0443\u0442\u044c'
+  summary:     koi8-r: \xc3\x92\xc3\x94\xc3\x95\xc3\x94\xc3\x98 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
   
   changeset:   0:1e78a93102a3
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     latin-1 e': é = u'\xe9'
+  summary:     latin-1 e': \xc3\xa9 = u'\\xe9' (esc)
   
 
 hg tags (ascii)
@@ -166,13 +166,13 @@
 
   $ HGENCODING=latin-1 hg tags
   tip                                5:093c6077d1c8
-                                    3:ca661e7520de
+  \xe9                                  3:ca661e7520de (esc)
 
 hg tags (utf-8)
 
   $ HGENCODING=utf-8 hg tags
   tip                                5:093c6077d1c8
-  é                                  3:ca661e7520de
+  \xc3\xa9                                  3:ca661e7520de (esc)
 
 hg branches (ascii)
 
@@ -183,13 +183,13 @@
 hg branches (latin-1)
 
   $ HGENCODING=latin-1 hg branches
-                                5:093c6077d1c8
+  \xe9                              5:093c6077d1c8 (esc)
   default                        4:94db611b4196 (inactive)
 
 hg branches (utf-8)
 
   $ HGENCODING=utf-8 hg branches
-  é                              5:093c6077d1c8
+  \xc3\xa9                              5:093c6077d1c8 (esc)
   default                        4:94db611b4196 (inactive)
   $ echo '[ui]' >> .hg/hgrc
   $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
@@ -198,7 +198,7 @@
 
   $ HGENCODING=utf-8 hg log
   changeset:   5:093c6077d1c8
-  branch:      é
+  branch:      \xc3\xa9 (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -207,28 +207,28 @@
   changeset:   4:94db611b4196
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     Added tag é for changeset ca661e7520de
+  summary:     Added tag \xc3\xa9 for changeset ca661e7520de (esc)
   
   changeset:   3:ca661e7520de
-  tag:         é
+  tag:         \xc3\xa9 (esc)
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     utf-8 e' encoded: é
+  summary:     utf-8 e' encoded: \xc3\xa9 (esc)
   
   changeset:   2:650c6f3d55dd
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     latin-1 e' encoded: é
+  summary:     latin-1 e' encoded: \xc3\xa9 (esc)
   
   changeset:   1:0e5b7e3f9c4a
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     koi8-r: ртуть = u'\u0440\u0442\u0443\u0442\u044c'
+  summary:     koi8-r: \xd1\x80\xd1\x82\xd1\x83\xd1\x82\xd1\x8c = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
   
   changeset:   0:1e78a93102a3
   user:        test
   date:        Mon Jan 12 13:46:40 1970 +0000
-  summary:     latin-1 e': И = u'\xe9'
+  summary:     latin-1 e': \xd0\x98 = u'\\xe9' (esc)
   
 
 hg log (dolphin)
@@ -237,7 +237,7 @@
   abort: unknown encoding: dolphin, please check your locale settings
   [255]
   $ HGENCODING=ascii hg branch `cat latin-1-tag`
-  abort: decoding near '': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
+  abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
   [255]
   $ cp latin-1-tag .hg/branch
   $ HGENCODING=latin-1 hg ci -m 'should fail'
--- a/tests/test-eolfilename.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-eolfilename.t	Mon Nov 08 01:41:41 2010 +0100
@@ -9,11 +9,11 @@
   $ A=`printf 'he\rllo'`
   $ echo foo > "$A"
   $ hg add
-  adding he
llo
+  adding he\rllo (esc)
   abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
   [255]
   $ hg ci -A -m m
-  adding he
llo
+  adding he\rllo (esc)
   abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
   [255]
   $ rm "$A"
@@ -31,7 +31,7 @@
   [255]
   $ echo foo > "$A"
   $ hg debugwalk
-  f  he
llo  he
llo
+  f  he\rllo  he\rllo (esc)
   f  hell
   o  hell
   o
@@ -51,7 +51,7 @@
   $ touch "$A"
   $ touch "$B"
   $ hg status --color=always
-  ? foo
-  bar
-  ? foo
-  bar.baz
+  \x1b[0;35;1;4m? foo\x1b[0m (esc)
+  \x1b[0;35;1;4mbar\x1b[0m (esc)
+  \x1b[0;35;1;4m? foo\x1b[0m (esc)
+  \x1b[0;35;1;4mbar.baz\x1b[0m (esc)
--- a/tests/test-grep.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-grep.t	Mon Nov 08 01:41:41 2010 +0100
@@ -33,9 +33,9 @@
 
   $ hg --config extensions.color= grep --config color.mode=ansi \
   >     --color=always port port
-  port:4:export
-  port:4:vaportight
-  port:4:import/export
+  port:4:ex\x1b[0;31;1mport\x1b[0m (esc)
+  port:4:va\x1b[0;31;1mport\x1b[0might (esc)
+  port:4:im\x1b[0;31;1mport\x1b[0m/export (esc)
 
 all
 
--- a/tests/test-http-branchmap.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-http-branchmap.t	Mon Nov 08 01:41:41 2010 +0100
@@ -5,7 +5,7 @@
   > }
   $ hg init a
   $ hg --encoding utf-8 -R a branch æ
-  marked working directory as branch æ
+  marked working directory as branch \xc3\xa6 (esc)
   $ echo foo > a/foo
   $ hg -R a ci -Am foo
   adding foo
@@ -17,11 +17,11 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  updating to branch æ
+  updating to branch \xc3\xa6 (esc)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg --encoding utf-8 -R b log
   changeset:   0:867c11ce77b8
-  branch:      æ
+  branch:      \xc3\xa6 (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -38,14 +38,14 @@
   remote: added 1 changesets with 1 changes to 1 files
   $ hg -R a --encoding utf-8 log
   changeset:   1:58e7c90d67cb
-  branch:      æ
+  branch:      \xc3\xa6 (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     bar
   
   changeset:   0:867c11ce77b8
-  branch:      æ
+  branch:      \xc3\xa6 (esc)
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     foo
--- a/tests/test-log.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-log.t	Mon Nov 08 01:41:41 2010 +0100
@@ -523,31 +523,31 @@
 
   $ hg --config extensions.color= --config color.mode=ansi \
   >  log -p -l2 --color=always
-  changeset:   6:2404bbcab562
+  \x1b[0;33mchangeset:   6:2404bbcab562\x1b[0m (esc)
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
   summary:     b1.1
   
-  diff -r 302e9dd6890d -r 2404bbcab562 b1
-  --- a/b1	Thu Jan 01 00:00:01 1970 +0000
-  +++ b/b1	Thu Jan 01 00:00:01 1970 +0000
-  @@ -1,1 +1,2 @@
+  \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc)
+  \x1b[0;31;1m--- a/b1	Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
+  \x1b[0;32;1m+++ b/b1	Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
+  \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc)
    b1
-  +postm
+  \x1b[0;32m+postm\x1b[0m (esc)
   
-  changeset:   5:302e9dd6890d
+  \x1b[0;33mchangeset:   5:302e9dd6890d\x1b[0m (esc)
   parent:      3:e62f78d544b4
   parent:      4:ddb82e70d1a1
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
   summary:     m12
   
-  diff -r e62f78d544b4 -r 302e9dd6890d b2
-  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/b2	Thu Jan 01 00:00:01 1970 +0000
-  @@ -0,0 +1,1 @@
-  +b2
+  \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc)
+  \x1b[0;31;1m--- /dev/null	Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc)
+  \x1b[0;32;1m+++ b/b2	Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc)
+  \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc)
+  \x1b[0;32m+b2\x1b[0m (esc)
   
 
 
--- a/tests/test-mq-guards.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-mq-guards.t	Mon Nov 08 01:41:41 2010 +0100
@@ -218,9 +218,9 @@
 
   $ hg --config extensions.color= qguard --config color.mode=ansi \
   >     -l --color=always
-  a.patch: +1 +2 -3
-  b.patch: +2
-  c.patch: unguarded
+  \x1b[0;30;1ma.patch\x1b[0m: \x1b[0;33m+1\x1b[0m \x1b[0;33m+2\x1b[0m \x1b[0;31m-3\x1b[0m (esc)
+  \x1b[0;34;1;4mb.patch\x1b[0m: \x1b[0;33m+2\x1b[0m (esc)
+  \x1b[0;30;1mc.patch\x1b[0m: \x1b[0;32munguarded\x1b[0m (esc)
 
 should pop b.patch
 
@@ -310,10 +310,10 @@
 qseries again, but with color
 
   $ hg --config extensions.color= qseries -v --color=always
-  0 G new.patch
-  1 G b.patch
-  2 A c.patch
-  3 U d.patch
+  0 G \x1b[0;30;1mnew.patch\x1b[0m (esc)
+  1 G \x1b[0;30;1mb.patch\x1b[0m (esc)
+  2 A \x1b[0;34;1;4mc.patch\x1b[0m (esc)
+  3 U \x1b[0;30;1md.patch\x1b[0m (esc)
 
   $ hg qguard d.patch +2
 
@@ -433,4 +433,4 @@
 hg qseries -m with color
 
   $ hg --config extensions.color= qseries -m --color=always
-  b.patch
+  \x1b[0;31;1mb.patch\x1b[0m (esc)
--- a/tests/test-mq-qpush-fail.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-mq-qpush-fail.t	Mon Nov 08 01:41:41 2010 +0100
@@ -41,7 +41,7 @@
   transaction abort!
   rollback completed
   cleaning up working directory...done
-  abort: decoding near '': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
+  abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
   [255]
   $ hg parents
   changeset:   0:bbd179dfa0a7
--- a/tests/test-mq.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-mq.t	Mon Nov 08 01:41:41 2010 +0100
@@ -178,11 +178,11 @@
 status --mq with color (issue2096)
 
   $ hg status --mq --config extensions.color= --color=always
-  A .hgignore
-  A A
-  A B
-  A series
-  ? flaf
+  \x1b[0;32;1mA .hgignore\x1b[0m (esc)
+  \x1b[0;32;1mA A\x1b[0m (esc)
+  \x1b[0;32;1mA B\x1b[0m (esc)
+  \x1b[0;32;1mA series\x1b[0m (esc)
+  \x1b[0;35;1;4m? flaf\x1b[0m (esc)
 
 try the --mq option on a command provided by an extension
 
--- a/tests/test-patchbomb.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-patchbomb.t	Mon Nov 08 01:41:41 2010 +0100
@@ -1925,7 +1925,7 @@
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/utf	Thu Jan 01 00:00:04 1970 +0000
   @@ -0,0 +1,1 @@
-  +hömma!
+  +h\xc3\xb6mma! (esc)
   
   Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
   Content-Type: text/plain; charset="us-ascii"
@@ -1996,7 +1996,7 @@
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/isolatin	Thu Jan 01 00:00:05 1970 +0000
   @@ -0,0 +1,1 @@
-  +hmma!
+  +h\xf6mma! (esc)
   
   Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
   Content-Type: text/plain; charset="us-ascii"
--- a/tests/test-progress.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-progress.t	Mon Nov 08 01:41:41 2010 +0100
@@ -51,7 +51,7 @@
   loop [                                                                    ] 0/3
   loop [=====================>                                              ] 1/3
   loop [============================================>                       ] 2/3
-                                                                                  
+                                                                                  \r (esc)
 
 test refresh is taken in account
 
@@ -64,7 +64,7 @@
   
   0/2 loop lo
   1/2 loop lo
-                                                                                  
+                                                                                  \r (esc)
 
 test format options 2
 
@@ -72,7 +72,7 @@
   
   0/2 p.0 [                                                                     ]
   1/2 p.1 [=================================>                                   ]
-                                                                                  
+                                                                                  \r (esc)
 
 test format options and indeterminate progress
 
@@ -80,7 +80,7 @@
   
   0 loop.0               [ <=>                                                  ]
   1 loop.1               [  <=>                                                 ]
-                                                                                  
+                                                                                  \r (esc)
 
 make sure things don't fall over if count > total
 
@@ -92,7 +92,7 @@
   loop [==================================================>                 ] 3/4
   loop [===================================================================>] 4/4
   loop [ <=>                                                                ] 5/4
-                                                                                  
+                                                                                  \r (esc)
 
 test immediate progress completion
 
--- a/tests/test-revset.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-revset.t	Mon Nov 08 01:41:41 2010 +0100
@@ -66,7 +66,7 @@
   $ hg co 4
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg branch é
-  marked working directory as branch é
+  marked working directory as branch \xc3\xa9 (esc)
   $ hg ci -Aqm9
 
   $ hg tag -r6 1.0
--- a/tests/test-status-color.t	Mon Nov 08 01:35:41 2010 +0100
+++ b/tests/test-status-color.t	Mon Nov 08 01:41:41 2010 +0100
@@ -11,100 +11,100 @@
 hg status in repo root:
 
   $ hg status --color=always
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
 
 hg status . in repo root:
 
   $ hg status --color=always .
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
 
   $ hg status --color=always --cwd a
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
   $ hg status --color=always --cwd a .
-  ? 1/in_a_1
-  ? in_a
+  \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_a\x1b[0m (esc)
   $ hg status --color=always --cwd a ..
-  ? 1/in_a_1
-  ? in_a
-  ? ../b/1/in_b_1
-  ? ../b/2/in_b_2
-  ? ../b/in_b
-  ? ../in_root
+  \x1b[0;35;1;4m? 1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
 
   $ hg status --color=always --cwd b
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
   $ hg status --color=always --cwd b .
-  ? 1/in_b_1
-  ? 2/in_b_2
-  ? in_b
+  \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_b\x1b[0m (esc)
   $ hg status --color=always --cwd b ..
-  ? ../a/1/in_a_1
-  ? ../a/in_a
-  ? 1/in_b_1
-  ? 2/in_b_2
-  ? in_b
-  ? ../in_root
+  \x1b[0;35;1;4m? ../a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? 1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? 2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../in_root\x1b[0m (esc)
 
   $ hg status --color=always --cwd a/1
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
   $ hg status --color=always --cwd a/1 .
-  ? in_a_1
+  \x1b[0;35;1;4m? in_a_1\x1b[0m (esc)
   $ hg status --color=always --cwd a/1 ..
-  ? in_a_1
-  ? ../in_a
+  \x1b[0;35;1;4m? in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../in_a\x1b[0m (esc)
 
   $ hg status --color=always --cwd b/1
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
   $ hg status --color=always --cwd b/1 .
-  ? in_b_1
+  \x1b[0;35;1;4m? in_b_1\x1b[0m (esc)
   $ hg status --color=always --cwd b/1 ..
-  ? in_b_1
-  ? ../2/in_b_2
-  ? ../in_b
+  \x1b[0;35;1;4m? in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
 
   $ hg status --color=always --cwd b/2
-  ? a/1/in_a_1
-  ? a/in_a
-  ? b/1/in_b_1
-  ? b/2/in_b_2
-  ? b/in_b
-  ? in_root
+  \x1b[0;35;1;4m? a/1/in_a_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? a/in_a\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/2/in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? b/in_b\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_root\x1b[0m (esc)
   $ hg status --color=always --cwd b/2 .
-  ? in_b_2
+  \x1b[0;35;1;4m? in_b_2\x1b[0m (esc)
   $ hg status --color=always --cwd b/2 ..
-  ? ../1/in_b_1
-  ? in_b_2
-  ? ../in_b
+  \x1b[0;35;1;4m? ../1/in_b_1\x1b[0m (esc)
+  \x1b[0;35;1;4m? in_b_2\x1b[0m (esc)
+  \x1b[0;35;1;4m? ../in_b\x1b[0m (esc)
   $ cd ..
 
   $ hg init repo2
@@ -124,44 +124,44 @@
 hg status:
 
   $ hg status --color=always
-  A added
-  R removed
-  ! deleted
-  ? unknown
+  \x1b[0;32;1mA added\x1b[0m (esc)
+  \x1b[0;31;1mR removed\x1b[0m (esc)
+  \x1b[0;36;1;4m! deleted\x1b[0m (esc)
+  \x1b[0;35;1;4m? unknown\x1b[0m (esc)
 
 hg status modified added removed deleted unknown never-existed ignored:
 
   $ hg status --color=always modified added removed deleted unknown never-existed ignored
   never-existed: No such file or directory
-  A added
-  R removed
-  ! deleted
-  ? unknown
+  \x1b[0;32;1mA added\x1b[0m (esc)
+  \x1b[0;31;1mR removed\x1b[0m (esc)
+  \x1b[0;36;1;4m! deleted\x1b[0m (esc)
+  \x1b[0;35;1;4m? unknown\x1b[0m (esc)
 
   $ hg copy modified copied
 
 hg status -C:
 
   $ hg status --color=always -C
-  A added
-  A copied
-    modified
-  R removed
-  ! deleted
-  ? unknown
+  \x1b[0;32;1mA added\x1b[0m (esc)
+  \x1b[0;32;1mA copied\x1b[0m (esc)
+  \x1b[0;0m  modified\x1b[0m (esc)
+  \x1b[0;31;1mR removed\x1b[0m (esc)
+  \x1b[0;36;1;4m! deleted\x1b[0m (esc)
+  \x1b[0;35;1;4m? unknown\x1b[0m (esc)
 
 hg status -A:
 
   $ hg status --color=always -A
-  A added
-  A copied
-    modified
-  R removed
-  ! deleted
-  ? unknown
-  I ignored
-  C .hgignore
-  C modified
+  \x1b[0;32;1mA added\x1b[0m (esc)
+  \x1b[0;32;1mA copied\x1b[0m (esc)
+  \x1b[0;0m  modified\x1b[0m (esc)
+  \x1b[0;31;1mR removed\x1b[0m (esc)
+  \x1b[0;36;1;4m! deleted\x1b[0m (esc)
+  \x1b[0;35;1;4m? unknown\x1b[0m (esc)
+  \x1b[0;30;1mI ignored\x1b[0m (esc)
+  \x1b[0;0mC .hgignore\x1b[0m (esc)
+  \x1b[0;0mC modified\x1b[0m (esc)
 
 
   $ echo "^ignoreddir$" > .hgignore
@@ -175,7 +175,7 @@
 hg status -i ignoreddir/file:
 
   $ hg status --color=always -i ignoreddir/file
-  I ignoreddir/file
+  \x1b[0;30;1mI ignoreddir/file\x1b[0m (esc)
   $ cd ..
 
 check 'status -q' and some combinations
@@ -201,11 +201,11 @@
   $ hg --config color.status.modified=periwinkle status --color=always
   ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
   M modified
-  A added
-  A copied
-  R removed
-  ! deleted
-  ? unknown
+  \x1b[0;32;1mA added\x1b[0m (esc)
+  \x1b[0;32;1mA copied\x1b[0m (esc)
+  \x1b[0;31;1mR removed\x1b[0m (esc)
+  \x1b[0;36;1;4m! deleted\x1b[0m (esc)
+  \x1b[0;35;1;4m? unknown\x1b[0m (esc)
 
 Run status with 2 different flags.
 Check if result is the same or different.
@@ -275,5 +275,5 @@
 hg resolve with one unresolved, one resolved:
 
   $ hg resolve --color=always -l
-  U a
-  R b
+  \x1b[0;31;1mU a\x1b[0m (esc)
+  \x1b[0;32;1mR b\x1b[0m (esc)