tests/test-win32text
author Shun-ichi GOTO <shunichi.goto@gmail.com>
Fri, 18 Sep 2009 21:25:47 +0900
changeset 9463 bd017f359c08
parent 8759 f584d63c49c3
permissions -rwxr-xr-x
win32mbcs: util.normpath should be wrapped. It is because util.normpath() finally calls windows.pconvert() which is not wrapped (by changeset:25c41ddb3978).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
     1
#!/bin/sh
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
     2
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
     3
hg init t
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
     4
cd t
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
     5
6210
942287cb1f57 Removed trailing spaces from everything except test output
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5967
diff changeset
     6
cat > unix2dos.py <<EOF
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
     7
import sys
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
     8
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
     9
for path in sys.argv[1:]:
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    10
    data = file(path, 'rb').read()
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    11
    data = data.replace('\n', '\r\n')
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    12
    file(path, 'wb').write(data)
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    13
EOF
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    14
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    15
cat > print.py <<EOF
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    16
import sys
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    17
print(sys.stdin.read().replace('\n', '<LF>').replace('\r', '<CR>').replace('\0', '<NUL>'))
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    18
EOF
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    19
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    20
echo '[hooks]' >> .hg/hgrc
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    21
echo 'pretxncommit.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    22
echo 'pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    23
cat .hg/hgrc
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    24
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    25
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    26
echo hello > f
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    27
hg add f
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    28
echo commit should succeed
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    29
hg ci -m 1
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    30
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    31
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    32
hg clone . ../zoz
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    33
cp .hg/hgrc ../zoz/.hg
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    34
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    35
python unix2dos.py f
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    36
echo commit should fail
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    37
hg ci -m 2.1
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    38
echo
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    39
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    40
mv .hg/hgrc .hg/hgrc.bak
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    41
echo commits should succeed
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    42
hg ci -m 2
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    43
hg cp f g
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    44
hg ci -m 2.2
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    45
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    46
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    47
echo push should fail
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    48
hg push ../zoz
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    49
echo
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    50
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    51
mv .hg/hgrc.bak .hg/hgrc
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    52
echo hello > f
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    53
hg rm g
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    54
echo commit should succeed
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    55
hg ci -m 2.3
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    56
echo
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    57
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    58
echo push should succeed
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    59
hg push ../zoz
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    60
echo
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    61
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
    62
echo and now for something completely different
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    63
mkdir d
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    64
echo hello > d/f2
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    65
python unix2dos.py d/f2
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    66
hg add d/f2
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    67
hg ci -m 3
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    68
hg revert -a
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    69
rm d/f2
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    70
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    71
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    72
hg rem f
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    73
hg ci -m 4
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    74
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    75
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    76
python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")'
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    77
hg add bin
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    78
hg ci -m 5
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    79
hg log -v
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    80
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    81
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    82
hg clone . dupe
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    83
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    84
for x in a b c d; do echo content > dupe/$x; done
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    85
hg -R dupe add
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
    86
python unix2dos.py dupe/b dupe/c dupe/d
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    87
hg -R dupe ci -m a dupe/a
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    88
hg -R dupe ci -m b/c dupe/[bc]
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
    89
hg -R dupe ci -m d dupe/d
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    90
hg -R dupe log -v
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    91
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    92
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    93
hg pull dupe
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    94
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    95
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    96
hg log -v
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    97
echo
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
    98
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
    99
rm .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   100
(echo some; echo text) > f3
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   101
python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")'
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   102
hg add f3 f4.bat
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
   103
hg ci -m 6
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   104
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   105
python print.py < bin
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   106
python print.py < f3
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   107
python print.py < f4.bat
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   108
echo
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   109
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   110
echo '[extensions]' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   111
echo 'win32text = ' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   112
echo '[decode]' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   113
echo '** = cleverdecode:' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   114
echo '[encode]' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   115
echo '** = cleverencode:' >> .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   116
cat .hg/hgrc
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   117
echo
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   118
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   119
rm f3 f4.bat bin
8742
a964ab624385 merge: allow merging going backwards
Matt Mackall <mpm@selenic.com>
parents: 8167
diff changeset
   120
hg co -C 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))'
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   121
python print.py < bin
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   122
python print.py < f3
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   123
python print.py < f4.bat
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   124
echo
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   125
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   126
python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")'
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   127
hg add f5.sh
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8147
diff changeset
   128
hg ci -m 7
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   129
python print.py < f5.sh
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
   130
hg cat f5.sh | python print.py
6299
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   131
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   132
echo '% just linefeed' > linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   133
hg ci -qAm 8 linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   134
python print.py < linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   135
hg cat linefeed | python print.py
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   136
hg st -q
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   137
hg revert -a linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   138
python print.py < linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   139
hg st -q
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   140
echo modified >> linefeed
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   141
hg st -q
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   142
hg revert -a
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   143
hg st -q
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6210
diff changeset
   144
python print.py < linefeed