annotate tests/test-win32text.t @ 14481:b2ee161328e0

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 31 May 2011 15:28:23 -0500
parents 5ac9c903e7d2
children 1e9451476bf8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5680
963c516bb38c test-win32text: avoid unix2dos, printf extensions
Patrick Mezard <pmezard@gmail.com>
parents: 5675
diff changeset
1
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
2 $ hg init t
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
3 $ cd t
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
4 $ cat > unix2dos.py <<EOF
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
5 > import sys
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
6 >
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
7 > for path in sys.argv[1:]:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
8 > data = file(path, 'rb').read()
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
9 > data = data.replace('\n', '\r\n')
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
10 > file(path, 'wb').write(data)
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
11 > EOF
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
12 $ echo '[hooks]' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
13 $ echo 'pretxncommit.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
14 $ echo 'pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
15 $ cat .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
16 [hooks]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
17 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
18 pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
19 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
20
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
21 $ echo hello > f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
22 $ hg add f
5967
f8ad3b76e923 Provide better context for custom Python encode/decode filters.
Jesse Glick <jesse.glick@sun.com>
parents: 5680
diff changeset
23
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
24 commit should succeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
25
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
26 $ hg ci -m 1
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
27 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
28
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
29 $ hg clone . ../zoz
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
30 updating to branch default
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
32 $ cp .hg/hgrc ../zoz/.hg
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
33 $ python unix2dos.py f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
34
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
35 commit should fail
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
36
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
37 $ hg ci -m 2.1
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
38 Attempt to commit or push text file(s) using CRLF line endings
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
39 in f583ea08d42a: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
40 transaction abort!
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
41 rollback completed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
42 abort: pretxncommit.crlf hook failed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
43 [255]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
44 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
45
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
46 $ mv .hg/hgrc .hg/hgrc.bak
5675
a5fe27b83a4a Issue 882: add standard hook to reject text files with CRLF.
Jesse Glick <jesse.glick@sun.com>
parents:
diff changeset
47
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
48 commits should succeed
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
49
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
50 $ hg ci -m 2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
51 $ hg cp f g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
52 $ hg ci -m 2.2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
53 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
54
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
55
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
56 push should fail
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
57
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
58 $ hg push ../zoz
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
59 pushing to ../zoz
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
60 searching for changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
61 adding changesets
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
62 adding manifests
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
63 adding file changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
64 added 2 changesets with 2 changes to 2 files
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
65 Attempt to commit or push text file(s) using CRLF line endings
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
66 in bc2d09796734: g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
67 in b1aa5cde7ff4: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
68
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
69 To prevent this mistake in your local repository,
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
70 add to Mercurial.ini or .hg/hgrc:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
71
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
72 [hooks]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
73 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
74
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
75 and also consider adding:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
76
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
77 [extensions]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
78 win32text =
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
79 [encode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
80 ** = cleverencode:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
81 [decode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
82 ** = cleverdecode:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
83 transaction abort!
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
84 rollback completed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
85 abort: pretxnchangegroup.crlf hook failed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
86 [255]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
87 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
88
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
89 $ mv .hg/hgrc.bak .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
90 $ echo hello > f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
91 $ hg rm g
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
92
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
93 commit should succeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
94
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
95 $ hg ci -m 2.3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
96 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
97
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
98
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
99 push should succeed
8147
441dc7becd43 win32text: be more careful about rejecting violating changesets
Bryan O'Sullivan <bos@serpentine.com>
parents: 7226
diff changeset
100
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
101 $ hg push ../zoz
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
102 pushing to ../zoz
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
103 searching for changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
104 adding changesets
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
105 adding manifests
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
106 adding file changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
107 added 3 changesets with 3 changes to 2 files
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
108 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
109
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
110
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
111 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
112
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
113 $ mkdir d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
114 $ echo hello > d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
115 $ python unix2dos.py d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
116 $ hg add d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
117 $ hg ci -m 3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
118 Attempt to commit or push text file(s) using CRLF line endings
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
119 in 053ba1a3035a: d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
120 transaction abort!
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
121 rollback completed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
122 abort: pretxncommit.crlf hook failed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
123 [255]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
124 $ hg revert -a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
125 forgetting d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
126 $ rm d/f2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
127 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
128
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
129 $ hg rem f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
130 $ hg ci -m 4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
131 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
132
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
133 $ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")'
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
134 $ hg add bin
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
135 $ hg ci -m 5
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
136 $ hg log -v
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
137 changeset: 5:f0b1c8d75fce
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
138 tag: tip
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
139 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
140 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
141 files: bin
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
142 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
143 5
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
144
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
145
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
146 changeset: 4:77796dbcd4ad
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
147 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
148 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
149 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
150 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
151 4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
152
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
153
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
154 changeset: 3:7c1b5430b350
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
155 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
156 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
157 files: f g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
158 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
159 2.3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
160
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
161
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
162 changeset: 2:bc2d09796734
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
163 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
164 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
165 files: g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
166 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
167 2.2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
168
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
169
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
170 changeset: 1:b1aa5cde7ff4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
171 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
172 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
173 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
174 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
175 2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
176
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
177
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
178 changeset: 0:fcf06d5c4e1d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
179 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
180 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
181 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
182 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
183 1
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
184
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
185
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
186 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
187
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
188 $ hg clone . dupe
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
189 updating to branch default
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
190 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
191 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
192
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
193 $ for x in a b c d; do echo content > dupe/$x; done
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
194 $ hg -R dupe add
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
195 adding dupe/a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
196 adding dupe/b
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
197 adding dupe/c
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
198 adding dupe/d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
199 $ python unix2dos.py dupe/b dupe/c dupe/d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
200 $ hg -R dupe ci -m a dupe/a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
201 $ hg -R dupe ci -m b/c dupe/[bc]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
202 $ hg -R dupe ci -m d dupe/d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
203 $ hg -R dupe log -v
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
204 changeset: 8:67ac5962ab43
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
205 tag: tip
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
206 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
207 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
208 files: d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
209 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
210 d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
211
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
212
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
213 changeset: 7:68c127d1834e
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
214 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
215 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
216 files: b c
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
217 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
218 b/c
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
219
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
220
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
221 changeset: 6:adbf8bf7f31d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
222 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
223 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
224 files: a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
225 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
226 a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
227
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
228
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
229 changeset: 5:f0b1c8d75fce
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
230 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
231 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
232 files: bin
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
233 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
234 5
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
235
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
236
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
237 changeset: 4:77796dbcd4ad
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
238 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
239 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
240 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
241 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
242 4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
243
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
244
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
245 changeset: 3:7c1b5430b350
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
246 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
247 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
248 files: f g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
249 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
250 2.3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
251
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
252
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
253 changeset: 2:bc2d09796734
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
254 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
255 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
256 files: g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
257 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
258 2.2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
259
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
260
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
261 changeset: 1:b1aa5cde7ff4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
262 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
263 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
264 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
265 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
266 2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
267
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
268
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
269 changeset: 0:fcf06d5c4e1d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
270 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
271 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
272 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
273 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
274 1
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
275
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
276
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
277 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
278
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
279 $ hg pull dupe
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
280 pulling from dupe
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
281 searching for changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
282 adding changesets
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
283 adding manifests
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
284 adding file changes
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
285 added 3 changesets with 4 changes to 4 files
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
286 Attempt to commit or push text file(s) using CRLF line endings
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
287 in 67ac5962ab43: d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
288 in 68c127d1834e: b
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
289 in 68c127d1834e: c
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
290
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
291 To prevent this mistake in your local repository,
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
292 add to Mercurial.ini or .hg/hgrc:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
293
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
294 [hooks]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
295 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
296
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
297 and also consider adding:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
298
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
299 [extensions]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
300 win32text =
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
301 [encode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
302 ** = cleverencode:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
303 [decode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
304 ** = cleverdecode:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
305 transaction abort!
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
306 rollback completed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
307 abort: pretxnchangegroup.crlf hook failed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
308 [255]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
309 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
310
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
311 $ hg log -v
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
312 changeset: 5:f0b1c8d75fce
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
313 tag: tip
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
314 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
315 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
316 files: bin
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
317 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
318 5
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
319
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
320
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
321 changeset: 4:77796dbcd4ad
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
322 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
323 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
324 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
325 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
326 4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
327
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
328
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
329 changeset: 3:7c1b5430b350
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
330 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
331 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
332 files: f g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
333 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
334 2.3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
335
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
336
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
337 changeset: 2:bc2d09796734
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
338 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
339 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
340 files: g
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
341 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
342 2.2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
343
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
344
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
345 changeset: 1:b1aa5cde7ff4
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
346 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
347 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
348 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
349 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
350 2
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
351
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
352
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
353 changeset: 0:fcf06d5c4e1d
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
354 user: test
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
355 date: Thu Jan 01 00:00:00 1970 +0000
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
356 files: f
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
357 description:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
358 1
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
359
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
360
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
361 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
362
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
363 $ rm .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
364 $ (echo some; echo text) > f3
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
365 $ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")'
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
366 $ hg add f3 f4.bat
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
367 $ hg ci -m 6
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
368 $ cat bin
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
369 hello\x00\r (esc)
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
370 $ cat f3
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
371 some
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
372 text
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
373 $ cat f4.bat
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
374 rem empty\r (esc)
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
375 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
376
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
377 $ echo '[extensions]' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
378 $ echo 'win32text = ' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
379 $ echo '[decode]' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
380 $ echo '** = cleverdecode:' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
381 $ echo '[encode]' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
382 $ echo '** = cleverencode:' >> .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
383 $ cat .hg/hgrc
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
384 [extensions]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
385 win32text =
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
386 [decode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
387 ** = cleverdecode:
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
388 [encode]
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
389 ** = cleverencode:
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
390
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
391 Trigger deprecation warning:
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
392
12853
13984e96cb09 test-win32text.t: stabilize test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12843
diff changeset
393 $ hg id -t
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
394 win32text is deprecated: http://mercurial.selenic.com/wiki/Win32TextExtension
12853
13984e96cb09 test-win32text.t: stabilize test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12843
diff changeset
395 tip
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
396
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
397 Disable warning:
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
398
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
399 $ echo '[win32text]' >> .hg/hgrc
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
400 $ echo 'warn = no' >> .hg/hgrc
12853
13984e96cb09 test-win32text.t: stabilize test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12843
diff changeset
401 $ hg id -t
13984e96cb09 test-win32text.t: stabilize test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12843
diff changeset
402 tip
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12494
diff changeset
403
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
404 $ rm f3 f4.bat bin
12978
5ac9c903e7d2 test-win32text: use $TESTTMP in output
Martin Geisler <mg@lazybytes.net>
parents: 12977
diff changeset
405 $ hg co -C
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
406 WARNING: f4.bat already has CRLF line endings
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
407 and does not need EOL conversion by the win32text plugin.
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
408 Before your next commit, please reconsider your encode/decode settings in
12978
5ac9c903e7d2 test-win32text: use $TESTTMP in output
Martin Geisler <mg@lazybytes.net>
parents: 12977
diff changeset
409 Mercurial.ini or $TESTTMP/t/.hg/hgrc.
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
410 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
411 $ cat bin
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
412 hello\x00\r (esc)
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
413 $ cat f3
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
414 some\r (esc)
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
415 text\r (esc)
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
416 $ cat f4.bat
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
417 rem empty\r (esc)
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
418 $ echo
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
419
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
420 $ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")'
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
421 $ hg add f5.sh
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
422 $ hg ci -m 7
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
423 $ cat f5.sh
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
424 # empty\r (esc)
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
425 $ hg cat f5.sh
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
426 # empty
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
427 $ echo '% just linefeed' > linefeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
428 $ hg ci -qAm 8 linefeed
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
429 $ cat linefeed
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
430 % just linefeed
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
431 $ hg cat linefeed
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
432 % just linefeed
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
433 $ hg st -q
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
434 $ hg revert -a linefeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
435 no changes needed to linefeed
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
436 $ cat linefeed
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
437 % just linefeed
12494
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
438 $ hg st -q
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
439 $ echo modified >> linefeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
440 $ hg st -q
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
441 M linefeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
442 $ hg revert -a
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
443 reverting linefeed
f18fd371ecbd tests: unify test-win32text
Matt Mackall <mpm@selenic.com>
parents: 8759
diff changeset
444 $ hg st -q
12977
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
445 $ cat linefeed
a1a50567b5d2 test-win32text: use (esc) lines instead of Python script
Martin Geisler <mg@lazybytes.net>
parents: 12853
diff changeset
446 % just linefeed\r (esc)