tests/test-diff-color
author Patrick Mezard <pmezard@gmail.com>
Mon, 15 Jun 2009 00:03:26 +0200
changeset 8810 ac92775b3b80
parent 7458 03dd55115985
child 9579 c06e7581bbaa
permissions -rwxr-xr-x
Add patch.eol to ignore EOLs when patching (issue1019) The intent is to fix many issues involving patching when win32ext is enabled. With win32ext, the working directory and repository files EOLs are not the same which means that patches made on a non-win32ext host do not apply cleanly because of EOLs discrepancies. A theorically correct approach would be transform either the patched file or the patch content with the encoding/decoding filters used by win32ext. This solution is tricky to implement and invasive, instead we prefer to address the win32ext case, by offering a way to ignore input EOLs when patching and rewriting them when saving the patched result.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     2
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     4
echo "color=" >> $HGRCPATH
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     5
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     6
hg init repo
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     7
cd repo
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     8
cat > a <<EOF
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     9
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    10
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    11
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    12
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    13
b
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    14
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    15
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    16
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    17
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    18
EOF
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    19
hg ci -Am adda
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    20
cat > a <<EOF
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    21
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    22
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    23
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    24
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    25
dd
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    26
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    27
a
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    28
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    29
c
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    30
EOF
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    31
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    32
echo '% default context'
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    33
hg diff --nodates --color=always
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    34
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    35
echo '% --unified=2'
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    36
hg diff --nodates -U 2  --color=always