Show More
@@ -1,223 +1,225 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg add -n |
|
4 | $ hg add -n | |
5 | adding a |
|
5 | adding a | |
6 | $ hg st |
|
6 | $ hg st | |
7 | ? a |
|
7 | ? a | |
8 | $ hg add |
|
8 | $ hg add | |
9 | adding a |
|
9 | adding a | |
10 | $ hg st |
|
10 | $ hg st | |
11 | A a |
|
11 | A a | |
12 | $ hg forget a |
|
12 | $ hg forget a | |
13 | $ hg add |
|
13 | $ hg add | |
14 | adding a |
|
14 | adding a | |
15 | $ hg st |
|
15 | $ hg st | |
16 | A a |
|
16 | A a | |
17 |
|
17 | |||
18 | $ echo b > b |
|
18 | $ echo b > b | |
19 | $ hg add -n b |
|
19 | $ hg add -n b | |
20 | $ hg st |
|
20 | $ hg st | |
21 | A a |
|
21 | A a | |
22 | ? b |
|
22 | ? b | |
23 | $ hg add b |
|
23 | $ hg add b | |
24 | $ hg st |
|
24 | $ hg st | |
25 | A a |
|
25 | A a | |
26 | A b |
|
26 | A b | |
27 |
|
27 | |||
28 | should fail |
|
28 | should fail | |
29 |
|
29 | |||
30 | $ hg add b |
|
30 | $ hg add b | |
31 | b already tracked! |
|
31 | b already tracked! | |
32 | $ hg st |
|
32 | $ hg st | |
33 | A a |
|
33 | A a | |
34 | A b |
|
34 | A b | |
35 |
|
35 | |||
36 | #if no-windows |
|
36 | #if no-windows | |
37 | $ echo foo > con.xml |
|
37 | $ echo foo > con.xml | |
38 | $ hg --config ui.portablefilenames=jump add con.xml |
|
38 | $ hg --config ui.portablefilenames=jump add con.xml | |
39 | abort: ui.portablefilenames value is invalid ('jump') |
|
39 | abort: ui.portablefilenames value is invalid ('jump') | |
40 | [255] |
|
40 | [255] | |
41 | $ hg --config ui.portablefilenames=abort add con.xml |
|
41 | $ hg --config ui.portablefilenames=abort add con.xml | |
42 | abort: filename contains 'con', which is reserved on Windows: 'con.xml' |
|
42 | abort: filename contains 'con', which is reserved on Windows: 'con.xml' | |
43 | [255] |
|
43 | [255] | |
44 | $ hg st |
|
44 | $ hg st | |
45 | A a |
|
45 | A a | |
46 | A b |
|
46 | A b | |
47 | ? con.xml |
|
47 | ? con.xml | |
48 | $ hg add con.xml |
|
48 | $ hg add con.xml | |
49 | warning: filename contains 'con', which is reserved on Windows: 'con.xml' |
|
49 | warning: filename contains 'con', which is reserved on Windows: 'con.xml' | |
50 | $ hg st |
|
50 | $ hg st | |
51 | A a |
|
51 | A a | |
52 | A b |
|
52 | A b | |
53 | A con.xml |
|
53 | A con.xml | |
54 | $ hg forget con.xml |
|
54 | $ hg forget con.xml | |
55 | $ rm con.xml |
|
55 | $ rm con.xml | |
56 | #endif |
|
56 | #endif | |
57 |
|
57 | |||
58 | #if eol-in-paths |
|
58 | #if eol-in-paths | |
59 | $ echo bla > 'hello:world' |
|
59 | $ echo bla > 'hello:world' | |
60 | $ hg --config ui.portablefilenames=abort add |
|
60 | $ hg --config ui.portablefilenames=abort add | |
61 | adding hello:world |
|
61 | adding hello:world | |
62 | abort: filename contains ':', which is reserved on Windows: 'hello:world' |
|
62 | abort: filename contains ':', which is reserved on Windows: 'hello:world' | |
63 | [255] |
|
63 | [255] | |
64 | $ hg st |
|
64 | $ hg st | |
65 | A a |
|
65 | A a | |
66 | A b |
|
66 | A b | |
67 | ? hello:world |
|
67 | ? hello:world | |
68 | $ hg --config ui.portablefilenames=ignore add |
|
68 | $ hg --config ui.portablefilenames=ignore add | |
69 | adding hello:world |
|
69 | adding hello:world | |
70 | $ hg st |
|
70 | $ hg st | |
71 | A a |
|
71 | A a | |
72 | A b |
|
72 | A b | |
73 | A hello:world |
|
73 | A hello:world | |
74 | #endif |
|
74 | #endif | |
75 |
|
75 | |||
76 | $ hg ci -m 0 --traceback |
|
76 | $ hg ci -m 0 --traceback | |
77 |
|
77 | |||
78 | should fail |
|
78 | should fail | |
79 |
|
79 | |||
80 | $ hg add a |
|
80 | $ hg add a | |
81 | a already tracked! |
|
81 | a already tracked! | |
82 |
|
82 | |||
83 | $ echo aa > a |
|
83 | $ echo aa > a | |
84 | $ hg ci -m 1 |
|
84 | $ hg ci -m 1 | |
85 | $ hg up 0 |
|
85 | $ hg up 0 | |
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 | $ echo aaa > a |
|
87 | $ echo aaa > a | |
88 | $ hg ci -m 2 |
|
88 | $ hg ci -m 2 | |
89 | created new head |
|
89 | created new head | |
90 |
|
90 | |||
91 | $ hg merge |
|
91 | $ hg merge | |
92 | merging a |
|
92 | merging a | |
93 | warning: conflicts during merge. |
|
93 | warning: conflicts during merge. | |
94 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
94 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
95 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
95 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
96 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
96 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
97 | [1] |
|
97 | [1] | |
98 | $ hg st |
|
98 | $ hg st | |
99 | M a |
|
99 | M a | |
100 | ? a.orig |
|
100 | ? a.orig | |
101 |
|
101 | |||
102 | should fail |
|
102 | should fail | |
103 |
|
103 | |||
104 | $ hg add a |
|
104 | $ hg add a | |
105 | a already tracked! |
|
105 | a already tracked! | |
106 | $ hg st |
|
106 | $ hg st | |
107 | M a |
|
107 | M a | |
108 | ? a.orig |
|
108 | ? a.orig | |
109 | $ hg resolve -m a |
|
109 | $ hg resolve -m a | |
110 | (no more unresolved files) |
|
110 | (no more unresolved files) | |
111 | $ hg ci -m merge |
|
111 | $ hg ci -m merge | |
112 |
|
112 | |||
113 | Issue683: peculiarity with hg revert of an removed then added file |
|
113 | Issue683: peculiarity with hg revert of an removed then added file | |
114 |
|
114 | |||
115 | $ hg forget a |
|
115 | $ hg forget a | |
116 | $ hg add a |
|
116 | $ hg add a | |
117 | $ hg st |
|
117 | $ hg st | |
118 | ? a.orig |
|
118 | ? a.orig | |
119 | $ hg rm a |
|
119 | $ hg rm a | |
120 | $ hg st |
|
120 | $ hg st | |
121 | R a |
|
121 | R a | |
122 | ? a.orig |
|
122 | ? a.orig | |
123 | $ echo a > a |
|
123 | $ echo a > a | |
124 | $ hg add a |
|
124 | $ hg add a | |
125 | $ hg st |
|
125 | $ hg st | |
126 | M a |
|
126 | M a | |
127 | ? a.orig |
|
127 | ? a.orig | |
128 |
|
128 | |||
129 | Forgotten file can be added back (as either clean or modified) |
|
129 | Forgotten file can be added back (as either clean or modified) | |
130 |
|
130 | |||
131 | $ hg forget b |
|
131 | $ hg forget b | |
132 | $ hg add b |
|
132 | $ hg add b | |
133 | $ hg st -A b |
|
133 | $ hg st -A b | |
134 | C b |
|
134 | C b | |
135 | $ hg forget b |
|
135 | $ hg forget b | |
136 | $ echo modified > b |
|
136 | $ echo modified > b | |
137 | $ hg add b |
|
137 | $ hg add b | |
138 | $ hg st -A b |
|
138 | $ hg st -A b | |
139 | M b |
|
139 | M b | |
140 | $ hg revert -qC b |
|
140 | $ hg revert -qC b | |
141 |
|
141 | |||
142 | $ hg add c && echo "unexpected addition of missing file" |
|
142 | $ hg add c && echo "unexpected addition of missing file" | |
143 | c: * (glob) |
|
143 | c: * (glob) | |
144 | [1] |
|
144 | [1] | |
145 | $ echo c > c |
|
145 | $ echo c > c | |
146 | $ hg add d c && echo "unexpected addition of missing file" |
|
146 | $ hg add d c && echo "unexpected addition of missing file" | |
147 | d: * (glob) |
|
147 | d: * (glob) | |
148 | [1] |
|
148 | [1] | |
149 | $ hg st |
|
149 | $ hg st | |
150 | M a |
|
150 | M a | |
151 | A c |
|
151 | A c | |
152 | ? a.orig |
|
152 | ? a.orig | |
153 | $ hg up -C |
|
153 | $ hg up -C | |
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 |
|
155 | |||
156 | forget and get should have the right order: added but missing dir should be |
|
156 | forget and get should have the right order: added but missing dir should be | |
157 | forgotten before file with same name is added |
|
157 | forgotten before file with same name is added | |
158 |
|
158 | |||
159 | $ echo file d > d |
|
159 | $ echo file d > d | |
160 | $ hg add d |
|
160 | $ hg add d | |
161 | $ hg ci -md |
|
161 | $ hg ci -md | |
162 | $ hg rm d |
|
162 | $ hg rm d | |
163 | $ mkdir d |
|
163 | $ mkdir d | |
164 | $ echo a > d/a |
|
164 | $ echo a > d/a | |
165 | $ hg add d/a |
|
165 | $ hg add d/a | |
166 | $ rm -r d |
|
166 | $ rm -r d | |
167 | $ hg up -C |
|
167 | $ hg up -C | |
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 | $ cat d |
|
169 | $ cat d | |
170 | file d |
|
170 | file d | |
171 |
|
171 | |||
172 | Test that adding a directory doesn't require case matching (issue4578) |
|
172 | Test that adding a directory doesn't require case matching (issue4578) | |
173 | #if icasefs |
|
173 | #if icasefs | |
174 | $ mkdir -p CapsDir1/CapsDir |
|
174 | $ mkdir -p CapsDir1/CapsDir | |
175 | $ echo abc > CapsDir1/CapsDir/AbC.txt |
|
175 | $ echo abc > CapsDir1/CapsDir/AbC.txt | |
176 | $ mkdir CapsDir1/CapsDir/SubDir |
|
176 | $ mkdir CapsDir1/CapsDir/SubDir | |
177 | $ echo def > CapsDir1/CapsDir/SubDir/Def.txt |
|
177 | $ echo def > CapsDir1/CapsDir/SubDir/Def.txt | |
178 |
|
178 | |||
179 | $ hg add capsdir1/capsdir |
|
179 | $ hg add capsdir1/capsdir | |
180 | adding CapsDir1/CapsDir/AbC.txt (glob) |
|
180 | adding CapsDir1/CapsDir/AbC.txt (glob) | |
181 | adding CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
181 | adding CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
182 |
|
182 | |||
183 | $ hg forget capsdir1/capsdir/abc.txt |
|
183 | $ hg forget capsdir1/capsdir/abc.txt | |
184 | removing CapsDir1/CapsDir/AbC.txt (glob) |
|
184 | removing CapsDir1/CapsDir/AbC.txt (glob) | |
185 |
|
185 | |||
186 | $ hg forget capsdir1/capsdir |
|
186 | $ hg forget capsdir1/capsdir | |
187 | removing CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
187 | removing CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
188 |
|
188 | |||
189 | $ hg add capsdir1 |
|
189 | $ hg add capsdir1 | |
190 | adding CapsDir1/CapsDir/AbC.txt (glob) |
|
190 | adding CapsDir1/CapsDir/AbC.txt (glob) | |
191 | adding CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
191 | adding CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
192 |
|
192 | |||
193 | $ hg ci -m "AbCDef" capsdir1/capsdir |
|
193 | $ hg ci -m "AbCDef" capsdir1/capsdir | |
194 |
|
194 | |||
195 | $ hg status -A capsdir1/capsdir |
|
195 | $ hg status -A capsdir1/capsdir | |
196 | C CapsDir1/CapsDir/AbC.txt |
|
196 | C CapsDir1/CapsDir/AbC.txt | |
197 | C CapsDir1/CapsDir/SubDir/Def.txt |
|
197 | C CapsDir1/CapsDir/SubDir/Def.txt | |
198 |
|
198 | |||
199 | $ hg files capsdir1/capsdir |
|
199 | $ hg files capsdir1/capsdir | |
200 | CapsDir1/CapsDir/AbC.txt (glob) |
|
200 | CapsDir1/CapsDir/AbC.txt (glob) | |
201 | CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
201 | CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
202 |
|
202 | |||
203 | $ echo xyz > CapsDir1/CapsDir/SubDir/Def.txt |
|
203 | $ echo xyz > CapsDir1/CapsDir/SubDir/Def.txt | |
204 | $ hg ci -m xyz capsdir1/capsdir/subdir/def.txt |
|
204 | $ hg ci -m xyz capsdir1/capsdir/subdir/def.txt | |
205 |
|
205 | |||
206 | $ hg revert -r '.^' capsdir1/capsdir |
|
206 | $ hg revert -r '.^' capsdir1/capsdir | |
207 | reverting CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
207 | reverting CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
208 |
|
208 | |||
|
209 | The conditional tests above mean the hash on the diff line differs on Windows | |||
|
210 | and OS X | |||
209 | $ hg diff capsdir1/capsdir |
|
211 | $ hg diff capsdir1/capsdir | |
210 |
diff -r |
|
212 | diff -r * CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
211 | --- a/CapsDir1/CapsDir/SubDir/Def.txt Thu Jan 01 00:00:00 1970 +0000 |
|
213 | --- a/CapsDir1/CapsDir/SubDir/Def.txt Thu Jan 01 00:00:00 1970 +0000 | |
212 | +++ b/CapsDir1/CapsDir/SubDir/Def.txt * +0000 (glob) |
|
214 | +++ b/CapsDir1/CapsDir/SubDir/Def.txt * +0000 (glob) | |
213 | @@ -1,1 +1,1 @@ |
|
215 | @@ -1,1 +1,1 @@ | |
214 | -xyz |
|
216 | -xyz | |
215 | +def |
|
217 | +def | |
216 |
|
218 | |||
217 | $ hg remove -f 'glob:**.txt' -X capsdir1/capsdir |
|
219 | $ hg remove -f 'glob:**.txt' -X capsdir1/capsdir | |
218 | $ hg remove -f 'glob:**.txt' -I capsdir1/capsdir |
|
220 | $ hg remove -f 'glob:**.txt' -I capsdir1/capsdir | |
219 | removing CapsDir1/CapsDir/AbC.txt (glob) |
|
221 | removing CapsDir1/CapsDir/AbC.txt (glob) | |
220 | removing CapsDir1/CapsDir/SubDir/Def.txt (glob) |
|
222 | removing CapsDir1/CapsDir/SubDir/Def.txt (glob) | |
221 | #endif |
|
223 | #endif | |
222 |
|
224 | |||
223 | $ cd .. |
|
225 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now