Show More
@@ -1,284 +1,287 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ . "$TESTDIR/bzr-definitions" | |
4 |
|
2 | |||
5 | create and rename on the same file in the same step |
|
3 | create and rename on the same file in the same step | |
6 |
|
4 | |||
7 | $ mkdir test-createandrename |
|
5 | $ mkdir test-createandrename | |
8 | $ cd test-createandrename |
|
6 | $ cd test-createandrename | |
9 | $ bzr init -q source |
|
7 | $ bzr init -q source | |
10 |
|
8 | |||
11 | test empty repo conversion (issue3233) |
|
9 | test empty repo conversion (issue3233) | |
12 |
|
10 | |||
13 | $ hg convert source source-hg |
|
11 | $ hg convert source source-hg | |
14 | initializing destination source-hg repository |
|
12 | initializing destination source-hg repository | |
15 | scanning source... |
|
13 | scanning source... | |
16 | sorting... |
|
14 | sorting... | |
17 | converting... |
|
15 | converting... | |
18 |
|
16 | |||
19 | back to the rename stuff |
|
17 | back to the rename stuff | |
20 |
|
18 | |||
21 | $ cd source |
|
19 | $ cd source | |
22 | $ echo a > a |
|
20 | $ echo a > a | |
23 | $ echo c > c |
|
21 | $ echo c > c | |
24 | $ echo e > e |
|
22 | $ echo e > e | |
25 | $ bzr add -q a c e |
|
23 | $ bzr add -q a c e | |
26 | $ bzr commit -q -m 'Initial add: a, c, e' |
|
24 | $ bzr commit -q -m 'Initial add: a, c, e' | |
27 | $ bzr mv a b |
|
25 | $ bzr mv a b | |
28 | a => b |
|
26 | a => b | |
29 | $ bzr mv c d |
|
27 | $ bzr mv c d | |
30 | c => d |
|
28 | c => d | |
31 | $ bzr mv e f |
|
29 | $ bzr mv e f | |
32 | e => f |
|
30 | e => f | |
33 | $ echo a2 >> a |
|
31 | $ echo a2 >> a | |
34 | $ mkdir e |
|
32 | $ mkdir e | |
35 | $ bzr add -q a e |
|
33 | $ bzr add -q a e | |
36 | $ bzr commit -q -m 'rename a into b, create a, rename c into d' |
|
34 | $ bzr commit -q -m 'rename a into b, create a, rename c into d' | |
37 | $ cd .. |
|
35 | $ cd .. | |
38 | $ hg convert source source-hg |
|
36 | $ hg convert source source-hg | |
39 | scanning source... |
|
37 | scanning source... | |
40 | sorting... |
|
38 | sorting... | |
41 | converting... |
|
39 | converting... | |
42 | 1 Initial add: a, c, e |
|
40 | 1 Initial add: a, c, e | |
43 | 0 rename a into b, create a, rename c into d |
|
41 | 0 rename a into b, create a, rename c into d | |
44 | $ glog -R source-hg |
|
42 | $ glog -R source-hg | |
45 | o 1@source "rename a into b, create a, rename c into d" files: a b c d e f |
|
43 | o 1@source "rename a into b, create a, rename c into d" files: a b c d e f | |
46 | | |
|
44 | | | |
47 | o 0@source "Initial add: a, c, e" files: a c e |
|
45 | o 0@source "Initial add: a, c, e" files: a c e | |
48 |
|
46 | |||
49 |
|
47 | |||
50 | manifest |
|
48 | manifest | |
51 |
|
49 | |||
52 | $ hg manifest -R source-hg -r tip |
|
50 | $ hg manifest -R source-hg -r tip | |
53 | a |
|
51 | a | |
54 | b |
|
52 | b | |
55 | d |
|
53 | d | |
56 | f |
|
54 | f | |
57 |
|
55 | |||
58 | test --rev option |
|
56 | test --rev option | |
59 |
|
57 | |||
60 | $ hg convert -r 1 source source-1-hg |
|
58 | $ hg convert -r 1 source source-1-hg | |
61 | initializing destination source-1-hg repository |
|
59 | initializing destination source-1-hg repository | |
62 | scanning source... |
|
60 | scanning source... | |
63 | sorting... |
|
61 | sorting... | |
64 | converting... |
|
62 | converting... | |
65 | 0 Initial add: a, c, e |
|
63 | 0 Initial add: a, c, e | |
66 | $ glog -R source-1-hg |
|
64 | $ glog -R source-1-hg | |
67 | o 0@source "Initial add: a, c, e" files: a c e |
|
65 | o 0@source "Initial add: a, c, e" files: a c e | |
68 |
|
66 | |||
69 |
|
67 | |||
70 | test with filemap |
|
68 | test with filemap | |
71 |
|
69 | |||
72 | $ cat > filemap <<EOF |
|
70 | $ cat > filemap <<EOF | |
73 | > exclude a |
|
71 | > exclude a | |
74 | > EOF |
|
72 | > EOF | |
75 | $ hg convert --filemap filemap source source-filemap-hg |
|
73 | $ hg convert --filemap filemap source source-filemap-hg | |
76 | initializing destination source-filemap-hg repository |
|
74 | initializing destination source-filemap-hg repository | |
77 | scanning source... |
|
75 | scanning source... | |
78 | sorting... |
|
76 | sorting... | |
79 | converting... |
|
77 | converting... | |
80 | 1 Initial add: a, c, e |
|
78 | 1 Initial add: a, c, e | |
81 | 0 rename a into b, create a, rename c into d |
|
79 | 0 rename a into b, create a, rename c into d | |
82 | $ hg -R source-filemap-hg manifest -r tip |
|
80 | $ hg -R source-filemap-hg manifest -r tip | |
83 | b |
|
81 | b | |
84 | d |
|
82 | d | |
85 | f |
|
83 | f | |
86 |
|
84 | |||
87 | convert from lightweight checkout |
|
85 | convert from lightweight checkout | |
88 |
|
86 | |||
89 | $ bzr checkout --lightweight source source-light |
|
87 | $ bzr checkout --lightweight source source-light | |
90 | $ hg convert -s bzr source-light source-light-hg |
|
88 | $ hg convert -s bzr source-light source-light-hg | |
91 | initializing destination source-light-hg repository |
|
89 | initializing destination source-light-hg repository | |
92 | warning: lightweight checkouts may cause conversion failures, try with a regular branch instead. |
|
90 | warning: lightweight checkouts may cause conversion failures, try with a regular branch instead. | |
93 | $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository |
|
91 | $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository | |
94 | abort: source-light: missing or unsupported repository |
|
92 | abort: source-light: missing or unsupported repository | |
95 | [255] |
|
93 | [255] | |
96 |
|
94 | |||
97 | extract timestamps that look just like hg's {date|isodate}: |
|
95 | extract timestamps that look just like hg's {date|isodate}: | |
98 | yyyy-mm-dd HH:MM zzzz (no seconds!) |
|
96 | yyyy-mm-dd HH:MM zzzz (no seconds!) | |
99 | compare timestamps |
|
97 | compare timestamps | |
100 |
|
98 | |||
101 | $ cd source |
|
99 | $ cd source | |
102 | $ bzr log | \ |
|
100 | $ bzr log | \ | |
103 | > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \ |
|
101 | > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \ | |
104 | > > ../bzr-timestamps |
|
102 | > > ../bzr-timestamps | |
105 | $ cd .. |
|
103 | $ cd .. | |
106 | $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps |
|
104 | $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps | |
107 | $ diff -u bzr-timestamps hg-timestamps |
|
105 | $ diff -u bzr-timestamps hg-timestamps | |
108 | $ cd .. |
|
106 | $ cd .. | |
109 |
|
107 | |||
110 | merge |
|
108 | merge | |
111 |
|
109 | |||
112 | $ mkdir test-merge |
|
110 | $ mkdir test-merge | |
113 | $ cd test-merge |
|
111 | $ cd test-merge | |
114 | $ cat > helper.py <<EOF |
|
112 | $ cat > helper.py <<EOF | |
115 | > import sys |
|
113 | > import sys | |
116 | > from bzrlib import workingtree |
|
114 | > from bzrlib import workingtree | |
117 | > wt = workingtree.WorkingTree.open('.') |
|
115 | > wt = workingtree.WorkingTree.open('.') | |
118 | > |
|
116 | > | |
119 | > message, stamp = sys.argv[1:] |
|
117 | > message, stamp = sys.argv[1:] | |
120 | > wt.commit(message, timestamp=int(stamp)) |
|
118 | > wt.commit(message, timestamp=int(stamp)) | |
121 | > EOF |
|
119 | > EOF | |
122 | $ bzr init -q source |
|
120 | $ bzr init -q source | |
123 | $ cd source |
|
121 | $ cd source | |
124 | $ echo content > a |
|
122 | $ echo content > a | |
125 | $ echo content2 > b |
|
123 | $ echo content2 > b | |
126 | $ bzr add -q a b |
|
124 | $ bzr add -q a b | |
127 | $ bzr commit -q -m 'Initial add' |
|
125 | $ bzr commit -q -m 'Initial add' | |
128 | $ cd .. |
|
126 | $ cd .. | |
129 | $ bzr branch -q source source-improve |
|
127 | $ bzr branch -q source source-improve | |
130 | $ cd source |
|
128 | $ cd source | |
131 | $ echo more >> a |
|
129 | $ echo more >> a | |
132 | $ python ../helper.py 'Editing a' 100 |
|
130 | $ python ../helper.py 'Editing a' 100 | |
133 | $ cd ../source-improve |
|
131 | $ cd ../source-improve | |
134 | $ echo content3 >> b |
|
132 | $ echo content3 >> b | |
135 | $ python ../helper.py 'Editing b' 200 |
|
133 | $ python ../helper.py 'Editing b' 200 | |
136 | $ cd ../source |
|
134 | $ cd ../source | |
137 | $ bzr merge -q ../source-improve |
|
135 | $ bzr merge -q ../source-improve | |
138 | $ bzr commit -q -m 'Merged improve branch' |
|
136 | $ bzr commit -q -m 'Merged improve branch' | |
139 | $ cd .. |
|
137 | $ cd .. | |
140 | $ hg convert --datesort source source-hg |
|
138 | $ hg convert --datesort source source-hg | |
141 | initializing destination source-hg repository |
|
139 | initializing destination source-hg repository | |
142 | scanning source... |
|
140 | scanning source... | |
143 | sorting... |
|
141 | sorting... | |
144 | converting... |
|
142 | converting... | |
145 | 3 Initial add |
|
143 | 3 Initial add | |
146 | 2 Editing a |
|
144 | 2 Editing a | |
147 | 1 Editing b |
|
145 | 1 Editing b | |
148 | 0 Merged improve branch |
|
146 | 0 Merged improve branch | |
149 | $ glog -R source-hg |
|
147 | $ glog -R source-hg | |
150 | o 3@source "Merged improve branch" files: |
|
148 | o 3@source "Merged improve branch" files: | |
151 | |\ |
|
149 | |\ | |
152 | | o 2@source-improve "Editing b" files: b |
|
150 | | o 2@source-improve "Editing b" files: b | |
153 | | | |
|
151 | | | | |
154 | o | 1@source "Editing a" files: a |
|
152 | o | 1@source "Editing a" files: a | |
155 | |/ |
|
153 | |/ | |
156 | o 0@source "Initial add" files: a b |
|
154 | o 0@source "Initial add" files: a b | |
157 |
|
155 | |||
158 | $ cd .. |
|
156 | $ cd .. | |
159 |
|
157 | |||
|
158 | #if symlink execbit | |||
|
159 | ||||
160 | symlinks and executable files |
|
160 | symlinks and executable files | |
161 |
|
161 | |||
162 | $ mkdir test-symlinks |
|
162 | $ mkdir test-symlinks | |
163 | $ cd test-symlinks |
|
163 | $ cd test-symlinks | |
164 | $ bzr init -q source |
|
164 | $ bzr init -q source | |
165 | $ cd source |
|
165 | $ cd source | |
166 | $ touch program |
|
166 | $ touch program | |
167 | $ chmod +x program |
|
167 | $ chmod +x program | |
168 | $ ln -s program altname |
|
168 | $ ln -s program altname | |
169 | $ mkdir d |
|
169 | $ mkdir d | |
170 | $ echo a > d/a |
|
170 | $ echo a > d/a | |
171 | $ ln -s a syma |
|
171 | $ ln -s a syma | |
172 | $ bzr add -q altname program syma d/a |
|
172 | $ bzr add -q altname program syma d/a | |
173 | $ bzr commit -q -m 'Initial setup' |
|
173 | $ bzr commit -q -m 'Initial setup' | |
174 | $ touch newprog |
|
174 | $ touch newprog | |
175 | $ chmod +x newprog |
|
175 | $ chmod +x newprog | |
176 | $ rm altname |
|
176 | $ rm altname | |
177 | $ ln -s newprog altname |
|
177 | $ ln -s newprog altname | |
178 | $ chmod -x program |
|
178 | $ chmod -x program | |
179 | $ bzr add -q newprog |
|
179 | $ bzr add -q newprog | |
180 | $ bzr commit -q -m 'Symlink changed, x bits changed' |
|
180 | $ bzr commit -q -m 'Symlink changed, x bits changed' | |
181 | $ cd .. |
|
181 | $ cd .. | |
182 | $ hg convert source source-hg |
|
182 | $ hg convert source source-hg | |
183 | initializing destination source-hg repository |
|
183 | initializing destination source-hg repository | |
184 | scanning source... |
|
184 | scanning source... | |
185 | sorting... |
|
185 | sorting... | |
186 | converting... |
|
186 | converting... | |
187 | 1 Initial setup |
|
187 | 1 Initial setup | |
188 | 0 Symlink changed, x bits changed |
|
188 | 0 Symlink changed, x bits changed | |
189 | $ manifest source-hg 0 |
|
189 | $ manifest source-hg 0 | |
190 | % manifest of 0 |
|
190 | % manifest of 0 | |
191 | 644 @ altname |
|
191 | 644 @ altname | |
192 | 644 d/a |
|
192 | 644 d/a | |
193 | 755 * program |
|
193 | 755 * program | |
194 | 644 @ syma |
|
194 | 644 @ syma | |
195 | $ manifest source-hg tip |
|
195 | $ manifest source-hg tip | |
196 | % manifest of tip |
|
196 | % manifest of tip | |
197 | 644 @ altname |
|
197 | 644 @ altname | |
198 | 644 d/a |
|
198 | 644 d/a | |
199 | 755 * newprog |
|
199 | 755 * newprog | |
200 | 644 program |
|
200 | 644 program | |
201 | 644 @ syma |
|
201 | 644 @ syma | |
202 | $ cd source-hg |
|
|||
203 |
|
202 | |||
204 | test the symlinks can be recreated |
|
203 | test the symlinks can be recreated | |
205 |
|
204 | |||
|
205 | $ cd source-hg | |||
206 | $ hg up |
|
206 | $ hg up | |
207 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
208 | $ hg cat syma; echo |
|
208 | $ hg cat syma; echo | |
209 | a |
|
209 | a | |
|
210 | $ cd ../.. | |||
|
211 | ||||
|
212 | #endif | |||
210 |
|
213 | |||
211 | Multiple branches |
|
214 | Multiple branches | |
212 |
|
215 | |||
213 | $ bzr init-repo -q --no-trees repo |
|
216 | $ bzr init-repo -q --no-trees repo | |
214 | $ bzr init -q repo/trunk |
|
217 | $ bzr init -q repo/trunk | |
215 | $ bzr co repo/trunk repo-trunk |
|
218 | $ bzr co repo/trunk repo-trunk | |
216 | $ cd repo-trunk |
|
219 | $ cd repo-trunk | |
217 | $ echo a > a |
|
220 | $ echo a > a | |
218 | $ bzr add a |
|
221 | $ bzr add a | |
219 | adding a |
|
222 | adding a | |
220 | $ bzr ci -qm adda --commit-time '2012-01-01 00:00:01 +0000' |
|
223 | $ bzr ci -qm adda --commit-time '2012-01-01 00:00:01 +0000' | |
221 | $ bzr tag trunk-tag |
|
224 | $ bzr tag trunk-tag | |
222 | Created tag trunk-tag. |
|
225 | Created tag trunk-tag. | |
223 | $ bzr switch -b branch |
|
226 | $ bzr switch -b branch | |
224 | Tree is up to date at revision 1. |
|
227 | Tree is up to date at revision 1. | |
225 | Switched to branch: *repo/branch/ (glob) |
|
228 | Switched to branch: *repo/branch/ (glob) | |
226 | $ echo b > b |
|
229 | $ echo b > b | |
227 | $ bzr add b |
|
230 | $ bzr add b | |
228 | adding b |
|
231 | adding b | |
229 | $ bzr ci -qm addb --commit-time '2012-01-01 00:00:02 +0000' |
|
232 | $ bzr ci -qm addb --commit-time '2012-01-01 00:00:02 +0000' | |
230 | $ bzr tag branch-tag |
|
233 | $ bzr tag branch-tag | |
231 | Created tag branch-tag. |
|
234 | Created tag branch-tag. | |
232 | $ bzr switch --force ../repo/trunk |
|
235 | $ bzr switch --force ../repo/trunk | |
233 | Updated to revision 1. |
|
236 | Updated to revision 1. | |
234 | Switched to branch: */repo/trunk/ (glob) |
|
237 | Switched to branch: */repo/trunk/ (glob) | |
235 | $ echo a >> a |
|
238 | $ echo a >> a | |
236 | $ bzr ci -qm changea --commit-time '2012-01-01 00:00:03 +0000' |
|
239 | $ bzr ci -qm changea --commit-time '2012-01-01 00:00:03 +0000' | |
237 | $ cd .. |
|
240 | $ cd .. | |
238 | $ hg convert --datesort repo repo-bzr |
|
241 | $ hg convert --datesort repo repo-bzr | |
239 | initializing destination repo-bzr repository |
|
242 | initializing destination repo-bzr repository | |
240 | scanning source... |
|
243 | scanning source... | |
241 | sorting... |
|
244 | sorting... | |
242 | converting... |
|
245 | converting... | |
243 | 2 adda |
|
246 | 2 adda | |
244 | 1 addb |
|
247 | 1 addb | |
245 | 0 changea |
|
248 | 0 changea | |
246 | updating tags |
|
249 | updating tags | |
247 | $ (cd repo-bzr; glog) |
|
250 | $ (cd repo-bzr; glog) | |
248 | o 3@default "update tags" files: .hgtags |
|
251 | o 3@default "update tags" files: .hgtags | |
249 | | |
|
252 | | | |
250 | o 2@default "changea" files: a |
|
253 | o 2@default "changea" files: a | |
251 | | |
|
254 | | | |
252 | | o 1@branch "addb" files: b |
|
255 | | o 1@branch "addb" files: b | |
253 | |/ |
|
256 | |/ | |
254 | o 0@default "adda" files: a |
|
257 | o 0@default "adda" files: a | |
255 |
|
258 | |||
256 |
|
259 | |||
257 | Test tags (converted identifiers are not stable because bzr ones are |
|
260 | Test tags (converted identifiers are not stable because bzr ones are | |
258 | not and get incorporated in extra fields). |
|
261 | not and get incorporated in extra fields). | |
259 |
|
262 | |||
260 | $ hg -R repo-bzr tags |
|
263 | $ hg -R repo-bzr tags | |
261 | tip 3:* (glob) |
|
264 | tip 3:* (glob) | |
262 | branch-tag 1:* (glob) |
|
265 | branch-tag 1:* (glob) | |
263 | trunk-tag 0:* (glob) |
|
266 | trunk-tag 0:* (glob) | |
264 |
|
267 | |||
265 | Nested repositories (issue3254) |
|
268 | Nested repositories (issue3254) | |
266 |
|
269 | |||
267 | $ bzr init-repo -q --no-trees repo/inner |
|
270 | $ bzr init-repo -q --no-trees repo/inner | |
268 | $ bzr init -q repo/inner/trunk |
|
271 | $ bzr init -q repo/inner/trunk | |
269 | $ bzr co repo/inner/trunk inner-trunk |
|
272 | $ bzr co repo/inner/trunk inner-trunk | |
270 | $ cd inner-trunk |
|
273 | $ cd inner-trunk | |
271 | $ echo b > b |
|
274 | $ echo b > b | |
272 | $ bzr add b |
|
275 | $ bzr add b | |
273 | adding b |
|
276 | adding b | |
274 | $ bzr ci -qm addb |
|
277 | $ bzr ci -qm addb | |
275 | $ cd .. |
|
278 | $ cd .. | |
276 | $ hg convert --datesort repo noinner-bzr |
|
279 | $ hg convert --datesort repo noinner-bzr | |
277 | initializing destination noinner-bzr repository |
|
280 | initializing destination noinner-bzr repository | |
278 | scanning source... |
|
281 | scanning source... | |
279 | sorting... |
|
282 | sorting... | |
280 | converting... |
|
283 | converting... | |
281 | 2 adda |
|
284 | 2 adda | |
282 | 1 addb |
|
285 | 1 addb | |
283 | 0 changea |
|
286 | 0 changea | |
284 | updating tags |
|
287 | updating tags |
@@ -1,140 +1,149 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
2 | > [extensions] | |
5 | > convert= |
|
3 | > convert= | |
6 | > [convert] |
|
4 | > [convert] | |
7 | > hg.saverev=False |
|
5 | > hg.saverev=False | |
8 | > EOF |
|
6 | > EOF | |
9 | $ hg init orig |
|
7 | $ hg init orig | |
10 | $ cd orig |
|
8 | $ cd orig | |
11 | $ echo foo > foo |
|
9 | $ echo foo > foo | |
12 | $ echo bar > bar |
|
10 | $ echo bar > bar | |
13 | $ hg ci -qAm 'add foo bar' -d '0 0' |
|
11 | $ hg ci -qAm 'add foo bar' -d '0 0' | |
14 | $ echo >> foo |
|
12 | $ echo >> foo | |
15 | $ hg ci -m 'change foo' -d '1 0' |
|
13 | $ hg ci -m 'change foo' -d '1 0' | |
16 | $ hg up -qC 0 |
|
14 | $ hg up -qC 0 | |
17 | $ hg copy --after --force foo bar |
|
15 | $ hg copy --after --force foo bar | |
18 | $ hg copy foo baz |
|
16 | $ hg copy foo baz | |
19 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' |
|
17 | $ hg ci -m 'make bar and baz copies of foo' -d '2 0' | |
20 | created new head |
|
18 | created new head | |
21 | $ hg bookmark premerge1 |
|
19 | $ hg bookmark premerge1 | |
22 | $ hg merge -r 1 |
|
20 | $ hg merge -r 1 | |
23 | merging baz and foo to baz |
|
21 | merging baz and foo to baz | |
24 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
22 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
25 | (branch merge, don't forget to commit) |
|
23 | (branch merge, don't forget to commit) | |
26 | $ hg ci -m 'merge local copy' -d '3 0' |
|
24 | $ hg ci -m 'merge local copy' -d '3 0' | |
27 | $ hg up -C 1 |
|
25 | $ hg up -C 1 | |
28 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
26 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
29 | $ hg bookmark premerge2 |
|
27 | $ hg bookmark premerge2 | |
30 | $ hg merge 2 |
|
28 | $ hg merge 2 | |
31 | merging foo and baz to baz |
|
29 | merging foo and baz to baz | |
32 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
30 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
33 | (branch merge, don't forget to commit) |
|
31 | (branch merge, don't forget to commit) | |
34 | $ hg ci -m 'merge remote copy' -d '4 0' |
|
32 | $ hg ci -m 'merge remote copy' -d '4 0' | |
35 | created new head |
|
33 | created new head | |
|
34 | #if execbit | |||
36 | $ chmod +x baz |
|
35 | $ chmod +x baz | |
|
36 | #else | |||
|
37 | $ echo some other change to make sure we get a rev 5 > baz | |||
|
38 | #endif | |||
37 | $ hg ci -m 'mark baz executable' -d '5 0' |
|
39 | $ hg ci -m 'mark baz executable' -d '5 0' | |
38 | $ cd .. |
|
40 | $ cd .. | |
39 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
41 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
40 | initializing destination new repository |
|
42 | initializing destination new repository | |
41 | scanning source... |
|
43 | scanning source... | |
42 | sorting... |
|
44 | sorting... | |
43 | converting... |
|
45 | converting... | |
44 | 5 add foo bar |
|
46 | 5 add foo bar | |
45 | 4 change foo |
|
47 | 4 change foo | |
46 | 3 make bar and baz copies of foo |
|
48 | 3 make bar and baz copies of foo | |
47 | 2 merge local copy |
|
49 | 2 merge local copy | |
48 | 1 merge remote copy |
|
50 | 1 merge remote copy | |
49 | 0 mark baz executable |
|
51 | 0 mark baz executable | |
50 | updating bookmarks |
|
52 | updating bookmarks | |
51 | $ cd new |
|
53 | $ cd new | |
52 | $ hg out ../orig |
|
54 | $ hg out ../orig | |
53 | comparing with ../orig |
|
55 | comparing with ../orig | |
54 | searching for changes |
|
56 | searching for changes | |
55 | no changes found |
|
57 | no changes found | |
56 | [1] |
|
58 | [1] | |
|
59 | #if execbit | |||
57 | $ hg bookmarks |
|
60 | $ hg bookmarks | |
58 | premerge1 3:973ef48a98a4 |
|
61 | premerge1 3:973ef48a98a4 | |
59 | premerge2 5:13d9b87cf8f8 |
|
62 | premerge2 5:13d9b87cf8f8 | |
|
63 | #else | |||
|
64 | Different hash because no x bit | |||
|
65 | $ hg bookmarks | |||
|
66 | premerge1 3:973ef48a98a4 | |||
|
67 | premerge2 5:df0779bcf33c | |||
|
68 | #endif | |||
60 | $ cd .. |
|
69 | $ cd .. | |
61 |
|
70 | |||
62 | check shamap LF and CRLF handling |
|
71 | check shamap LF and CRLF handling | |
63 |
|
72 | |||
64 | $ cat > rewrite.py <<EOF |
|
73 | $ cat > rewrite.py <<EOF | |
65 | > import sys |
|
74 | > import sys | |
66 | > # Interlace LF and CRLF |
|
75 | > # Interlace LF and CRLF | |
67 | > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) |
|
76 | > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) | |
68 | > for i, l in enumerate(file(sys.argv[1]))] |
|
77 | > for i, l in enumerate(file(sys.argv[1]))] | |
69 | > file(sys.argv[1], 'wb').write(''.join(lines)) |
|
78 | > file(sys.argv[1], 'wb').write(''.join(lines)) | |
70 | > EOF |
|
79 | > EOF | |
71 | $ python rewrite.py new/.hg/shamap |
|
80 | $ python rewrite.py new/.hg/shamap | |
72 | $ cd orig |
|
81 | $ cd orig | |
73 | $ hg up -qC 1 |
|
82 | $ hg up -qC 1 | |
74 | $ echo foo >> foo |
|
83 | $ echo foo >> foo | |
75 | $ hg ci -qm 'change foo again' |
|
84 | $ hg ci -qm 'change foo again' | |
76 | $ hg up -qC 2 |
|
85 | $ hg up -qC 2 | |
77 | $ echo foo >> foo |
|
86 | $ echo foo >> foo | |
78 | $ hg ci -qm 'change foo again again' |
|
87 | $ hg ci -qm 'change foo again again' | |
79 | $ cd .. |
|
88 | $ cd .. | |
80 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
89 | $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
81 | scanning source... |
|
90 | scanning source... | |
82 | sorting... |
|
91 | sorting... | |
83 | converting... |
|
92 | converting... | |
84 | 1 change foo again again |
|
93 | 1 change foo again again | |
85 | 0 change foo again |
|
94 | 0 change foo again | |
86 | updating bookmarks |
|
95 | updating bookmarks | |
87 |
|
96 | |||
88 | init broken repository |
|
97 | init broken repository | |
89 |
|
98 | |||
90 | $ hg init broken |
|
99 | $ hg init broken | |
91 | $ cd broken |
|
100 | $ cd broken | |
92 | $ echo a >> a |
|
101 | $ echo a >> a | |
93 | $ echo b >> b |
|
102 | $ echo b >> b | |
94 | $ hg ci -qAm init |
|
103 | $ hg ci -qAm init | |
95 | $ echo a >> a |
|
104 | $ echo a >> a | |
96 | $ echo b >> b |
|
105 | $ echo b >> b | |
97 | $ hg copy b c |
|
106 | $ hg copy b c | |
98 | $ hg ci -qAm changeall |
|
107 | $ hg ci -qAm changeall | |
99 | $ hg up -qC 0 |
|
108 | $ hg up -qC 0 | |
100 | $ echo bc >> b |
|
109 | $ echo bc >> b | |
101 | $ hg ci -m changebagain |
|
110 | $ hg ci -m changebagain | |
102 | created new head |
|
111 | created new head | |
103 | $ HGMERGE=internal:local hg -q merge |
|
112 | $ HGMERGE=internal:local hg -q merge | |
104 | $ hg ci -m merge |
|
113 | $ hg ci -m merge | |
105 | $ hg mv b d |
|
114 | $ hg mv b d | |
106 | $ hg ci -m moveb |
|
115 | $ hg ci -m moveb | |
107 |
|
116 | |||
108 | break it |
|
117 | break it | |
109 |
|
118 | |||
110 | $ rm .hg/store/data/b.* |
|
119 | $ rm .hg/store/data/b.* | |
111 | $ cd .. |
|
120 | $ cd .. | |
112 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed |
|
121 | $ hg --config convert.hg.ignoreerrors=True convert broken fixed | |
113 | initializing destination fixed repository |
|
122 | initializing destination fixed repository | |
114 | scanning source... |
|
123 | scanning source... | |
115 | sorting... |
|
124 | sorting... | |
116 | converting... |
|
125 | converting... | |
117 | 4 init |
|
126 | 4 init | |
118 | ignoring: data/b.i@1e88685f5dde: no match found |
|
127 | ignoring: data/b.i@1e88685f5dde: no match found | |
119 | 3 changeall |
|
128 | 3 changeall | |
120 | 2 changebagain |
|
129 | 2 changebagain | |
121 | 1 merge |
|
130 | 1 merge | |
122 | 0 moveb |
|
131 | 0 moveb | |
123 | $ hg -R fixed verify |
|
132 | $ hg -R fixed verify | |
124 | checking changesets |
|
133 | checking changesets | |
125 | checking manifests |
|
134 | checking manifests | |
126 | crosschecking files in changesets and manifests |
|
135 | crosschecking files in changesets and manifests | |
127 | checking files |
|
136 | checking files | |
128 | 3 files, 5 changesets, 5 total revisions |
|
137 | 3 files, 5 changesets, 5 total revisions | |
129 |
|
138 | |||
130 | manifest -r 0 |
|
139 | manifest -r 0 | |
131 |
|
140 | |||
132 | $ hg -R fixed manifest -r 0 |
|
141 | $ hg -R fixed manifest -r 0 | |
133 | a |
|
142 | a | |
134 |
|
143 | |||
135 | manifest -r tip |
|
144 | manifest -r tip | |
136 |
|
145 | |||
137 | $ hg -R fixed manifest -r tip |
|
146 | $ hg -R fixed manifest -r tip | |
138 | a |
|
147 | a | |
139 | c |
|
148 | c | |
140 | d |
|
149 | d |
@@ -1,405 +1,422 b'' | |||||
1 |
$ "$TESTDIR/hghave" svn13 no-outer-repo symlink |
|
1 | $ "$TESTDIR/hghave" svn13 no-outer-repo symlink || exit 80 | |
2 |
|
2 | |||
3 | $ fixpath() |
|
3 | $ fixpath() | |
4 | > { |
|
4 | > { | |
5 | > tr '\\' / |
|
5 | > tr '\\' / | |
6 | > } |
|
6 | > } | |
7 | $ svnupanddisplay() |
|
7 | $ svnupanddisplay() | |
8 | > { |
|
8 | > { | |
9 | > ( |
|
9 | > ( | |
10 | > cd $1; |
|
10 | > cd $1; | |
11 | > svn up -q; |
|
11 | > svn up -q; | |
12 | > svn st -v | fixpath | sed 's/ */ /g' | sort |
|
12 | > svn st -v | fixpath | sed 's/ */ /g' | sort | |
13 | > limit='' |
|
13 | > limit='' | |
14 | > if [ $2 -gt 0 ]; then |
|
14 | > if [ $2 -gt 0 ]; then | |
15 | > limit="--limit=$2" |
|
15 | > limit="--limit=$2" | |
16 | > fi |
|
16 | > fi | |
17 | > svn log --xml -v $limit | python "$TESTDIR/svnxml.py" |
|
17 | > svn log --xml -v $limit | python "$TESTDIR/svnxml.py" | |
18 | > ) |
|
18 | > ) | |
19 | > } |
|
19 | > } | |
20 |
|
20 | |||
21 | $ cat >> $HGRCPATH <<EOF |
|
21 | $ cat >> $HGRCPATH <<EOF | |
22 | > [extensions] |
|
22 | > [extensions] | |
23 | > convert = |
|
23 | > convert = | |
24 | > graphlog = |
|
24 | > graphlog = | |
25 | > EOF |
|
25 | > EOF | |
26 |
|
26 | |||
27 | $ hg init a |
|
27 | $ hg init a | |
28 |
|
28 | |||
29 | Add |
|
29 | Add | |
30 |
|
30 | |||
31 | $ echo a > a/a |
|
31 | $ echo a > a/a | |
32 | $ mkdir -p a/d1/d2 |
|
32 | $ mkdir -p a/d1/d2 | |
33 | $ echo b > a/d1/d2/b |
|
33 | $ echo b > a/d1/d2/b | |
34 | $ ln -s a/missing a/link |
|
34 | $ ln -s a/missing a/link | |
35 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' |
|
35 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' | |
36 | adding a |
|
36 | adding a | |
37 | adding d1/d2/b |
|
37 | adding d1/d2/b | |
38 | adding link |
|
38 | adding link | |
39 |
|
39 | |||
40 | Modify |
|
40 | Modify | |
41 |
|
41 | |||
42 | $ "$TESTDIR/svn-safe-append.py" a a/a |
|
42 | $ "$TESTDIR/svn-safe-append.py" a a/a | |
43 | $ hg --cwd a ci -d '1 0' -m 'modify a file' |
|
43 | $ hg --cwd a ci -d '1 0' -m 'modify a file' | |
44 | $ hg --cwd a tip -q |
|
44 | $ hg --cwd a tip -q | |
45 | 1:8231f652da37 |
|
45 | 1:8231f652da37 | |
46 |
|
46 | |||
47 | $ hg convert -d svn a |
|
47 | $ hg convert -d svn a | |
48 | assuming destination a-hg |
|
48 | assuming destination a-hg | |
49 | initializing svn repository 'a-hg' |
|
49 | initializing svn repository 'a-hg' | |
50 | initializing svn working copy 'a-hg-wc' |
|
50 | initializing svn working copy 'a-hg-wc' | |
51 | scanning source... |
|
51 | scanning source... | |
52 | sorting... |
|
52 | sorting... | |
53 | converting... |
|
53 | converting... | |
54 | 1 add a file |
|
54 | 1 add a file | |
55 | 0 modify a file |
|
55 | 0 modify a file | |
56 | $ svnupanddisplay a-hg-wc 2 |
|
56 | $ svnupanddisplay a-hg-wc 2 | |
57 | 2 1 test d1 |
|
57 | 2 1 test d1 | |
58 | 2 1 test d1/d2 |
|
58 | 2 1 test d1/d2 | |
59 | 2 1 test d1/d2/b |
|
59 | 2 1 test d1/d2/b | |
60 | 2 1 test link |
|
60 | 2 1 test link | |
61 | 2 2 test . |
|
61 | 2 2 test . | |
62 | 2 2 test a |
|
62 | 2 2 test a | |
63 | revision: 2 |
|
63 | revision: 2 | |
64 | author: test |
|
64 | author: test | |
65 | msg: modify a file |
|
65 | msg: modify a file | |
66 | M /a |
|
66 | M /a | |
67 | revision: 1 |
|
67 | revision: 1 | |
68 | author: test |
|
68 | author: test | |
69 | msg: add a file |
|
69 | msg: add a file | |
70 | A /a |
|
70 | A /a | |
71 | A /d1 |
|
71 | A /d1 | |
72 | A /d1/d2 |
|
72 | A /d1/d2 | |
73 | A /d1/d2/b |
|
73 | A /d1/d2/b | |
74 | A /link |
|
74 | A /link | |
75 | $ ls a a-hg-wc |
|
75 | $ ls a a-hg-wc | |
76 | a: |
|
76 | a: | |
77 | a |
|
77 | a | |
78 | d1 |
|
78 | d1 | |
79 | link |
|
79 | link | |
80 |
|
80 | |||
81 | a-hg-wc: |
|
81 | a-hg-wc: | |
82 | a |
|
82 | a | |
83 | d1 |
|
83 | d1 | |
84 | link |
|
84 | link | |
85 | $ cmp a/a a-hg-wc/a |
|
85 | $ cmp a/a a-hg-wc/a | |
86 |
|
86 | |||
87 | Rename |
|
87 | Rename | |
88 |
|
88 | |||
89 | $ hg --cwd a mv a b |
|
89 | $ hg --cwd a mv a b | |
90 | $ hg --cwd a mv link newlink |
|
90 | $ hg --cwd a mv link newlink | |
91 |
|
91 | |||
92 | $ hg --cwd a ci -d '2 0' -m 'rename a file' |
|
92 | $ hg --cwd a ci -d '2 0' -m 'rename a file' | |
93 | $ hg --cwd a tip -q |
|
93 | $ hg --cwd a tip -q | |
94 | 2:a67e26ccec09 |
|
94 | 2:a67e26ccec09 | |
95 |
|
95 | |||
96 | $ hg convert -d svn a |
|
96 | $ hg convert -d svn a | |
97 | assuming destination a-hg |
|
97 | assuming destination a-hg | |
98 | initializing svn working copy 'a-hg-wc' |
|
98 | initializing svn working copy 'a-hg-wc' | |
99 | scanning source... |
|
99 | scanning source... | |
100 | sorting... |
|
100 | sorting... | |
101 | converting... |
|
101 | converting... | |
102 | 0 rename a file |
|
102 | 0 rename a file | |
103 | $ svnupanddisplay a-hg-wc 1 |
|
103 | $ svnupanddisplay a-hg-wc 1 | |
104 | 3 1 test d1 |
|
104 | 3 1 test d1 | |
105 | 3 1 test d1/d2 |
|
105 | 3 1 test d1/d2 | |
106 | 3 1 test d1/d2/b |
|
106 | 3 1 test d1/d2/b | |
107 | 3 3 test . |
|
107 | 3 3 test . | |
108 | 3 3 test b |
|
108 | 3 3 test b | |
109 | 3 3 test newlink |
|
109 | 3 3 test newlink | |
110 | revision: 3 |
|
110 | revision: 3 | |
111 | author: test |
|
111 | author: test | |
112 | msg: rename a file |
|
112 | msg: rename a file | |
113 | D /a |
|
113 | D /a | |
114 | A /b (from /a@2) |
|
114 | A /b (from /a@2) | |
115 | D /link |
|
115 | D /link | |
116 | A /newlink (from /link@2) |
|
116 | A /newlink (from /link@2) | |
117 | $ ls a a-hg-wc |
|
117 | $ ls a a-hg-wc | |
118 | a: |
|
118 | a: | |
119 | b |
|
119 | b | |
120 | d1 |
|
120 | d1 | |
121 | newlink |
|
121 | newlink | |
122 |
|
122 | |||
123 | a-hg-wc: |
|
123 | a-hg-wc: | |
124 | b |
|
124 | b | |
125 | d1 |
|
125 | d1 | |
126 | newlink |
|
126 | newlink | |
127 |
|
127 | |||
128 | Copy |
|
128 | Copy | |
129 |
|
129 | |||
130 | $ hg --cwd a cp b c |
|
130 | $ hg --cwd a cp b c | |
131 |
|
131 | |||
132 | $ hg --cwd a ci -d '3 0' -m 'copy a file' |
|
132 | $ hg --cwd a ci -d '3 0' -m 'copy a file' | |
133 | $ hg --cwd a tip -q |
|
133 | $ hg --cwd a tip -q | |
134 | 3:0cf087b9ab02 |
|
134 | 3:0cf087b9ab02 | |
135 |
|
135 | |||
136 | $ hg convert -d svn a |
|
136 | $ hg convert -d svn a | |
137 | assuming destination a-hg |
|
137 | assuming destination a-hg | |
138 | initializing svn working copy 'a-hg-wc' |
|
138 | initializing svn working copy 'a-hg-wc' | |
139 | scanning source... |
|
139 | scanning source... | |
140 | sorting... |
|
140 | sorting... | |
141 | converting... |
|
141 | converting... | |
142 | 0 copy a file |
|
142 | 0 copy a file | |
143 | $ svnupanddisplay a-hg-wc 1 |
|
143 | $ svnupanddisplay a-hg-wc 1 | |
144 | 4 1 test d1 |
|
144 | 4 1 test d1 | |
145 | 4 1 test d1/d2 |
|
145 | 4 1 test d1/d2 | |
146 | 4 1 test d1/d2/b |
|
146 | 4 1 test d1/d2/b | |
147 | 4 3 test b |
|
147 | 4 3 test b | |
148 | 4 3 test newlink |
|
148 | 4 3 test newlink | |
149 | 4 4 test . |
|
149 | 4 4 test . | |
150 | 4 4 test c |
|
150 | 4 4 test c | |
151 | revision: 4 |
|
151 | revision: 4 | |
152 | author: test |
|
152 | author: test | |
153 | msg: copy a file |
|
153 | msg: copy a file | |
154 | A /c (from /b@3) |
|
154 | A /c (from /b@3) | |
155 | $ ls a a-hg-wc |
|
155 | $ ls a a-hg-wc | |
156 | a: |
|
156 | a: | |
157 | b |
|
157 | b | |
158 | c |
|
158 | c | |
159 | d1 |
|
159 | d1 | |
160 | newlink |
|
160 | newlink | |
161 |
|
161 | |||
162 | a-hg-wc: |
|
162 | a-hg-wc: | |
163 | b |
|
163 | b | |
164 | c |
|
164 | c | |
165 | d1 |
|
165 | d1 | |
166 | newlink |
|
166 | newlink | |
167 |
|
167 | |||
168 | $ hg --cwd a rm b |
|
168 | $ hg --cwd a rm b | |
169 |
|
169 | |||
170 | Remove |
|
170 | Remove | |
171 |
|
171 | |||
172 | $ hg --cwd a ci -d '4 0' -m 'remove a file' |
|
172 | $ hg --cwd a ci -d '4 0' -m 'remove a file' | |
173 | $ hg --cwd a tip -q |
|
173 | $ hg --cwd a tip -q | |
174 | 4:07b2e34a5b17 |
|
174 | 4:07b2e34a5b17 | |
175 |
|
175 | |||
176 | $ hg convert -d svn a |
|
176 | $ hg convert -d svn a | |
177 | assuming destination a-hg |
|
177 | assuming destination a-hg | |
178 | initializing svn working copy 'a-hg-wc' |
|
178 | initializing svn working copy 'a-hg-wc' | |
179 | scanning source... |
|
179 | scanning source... | |
180 | sorting... |
|
180 | sorting... | |
181 | converting... |
|
181 | converting... | |
182 | 0 remove a file |
|
182 | 0 remove a file | |
183 | $ svnupanddisplay a-hg-wc 1 |
|
183 | $ svnupanddisplay a-hg-wc 1 | |
184 | 5 1 test d1 |
|
184 | 5 1 test d1 | |
185 | 5 1 test d1/d2 |
|
185 | 5 1 test d1/d2 | |
186 | 5 1 test d1/d2/b |
|
186 | 5 1 test d1/d2/b | |
187 | 5 3 test newlink |
|
187 | 5 3 test newlink | |
188 | 5 4 test c |
|
188 | 5 4 test c | |
189 | 5 5 test . |
|
189 | 5 5 test . | |
190 | revision: 5 |
|
190 | revision: 5 | |
191 | author: test |
|
191 | author: test | |
192 | msg: remove a file |
|
192 | msg: remove a file | |
193 | D /b |
|
193 | D /b | |
194 | $ ls a a-hg-wc |
|
194 | $ ls a a-hg-wc | |
195 | a: |
|
195 | a: | |
196 | c |
|
196 | c | |
197 | d1 |
|
197 | d1 | |
198 | newlink |
|
198 | newlink | |
199 |
|
199 | |||
200 | a-hg-wc: |
|
200 | a-hg-wc: | |
201 | c |
|
201 | c | |
202 | d1 |
|
202 | d1 | |
203 | newlink |
|
203 | newlink | |
204 |
|
204 | |||
205 |
Exec |
|
205 | Executable | |
206 |
|
206 | |||
|
207 | #if execbit | |||
207 | $ chmod +x a/c |
|
208 | $ chmod +x a/c | |
|
209 | #else | |||
|
210 | $ echo fake >> a/c | |||
|
211 | #endif | |||
208 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' |
|
212 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' | |
|
213 | #if execbit | |||
209 | $ hg --cwd a tip -q |
|
214 | $ hg --cwd a tip -q | |
210 | 5:31093672760b |
|
215 | 5:31093672760b | |
|
216 | #else | |||
|
217 | $ hg --cwd a tip -q | |||
|
218 | 5:034971d37224 | |||
|
219 | #endif | |||
211 |
|
220 | |||
212 | $ hg convert -d svn a |
|
221 | $ hg convert -d svn a | |
213 | assuming destination a-hg |
|
222 | assuming destination a-hg | |
214 | initializing svn working copy 'a-hg-wc' |
|
223 | initializing svn working copy 'a-hg-wc' | |
215 | scanning source... |
|
224 | scanning source... | |
216 | sorting... |
|
225 | sorting... | |
217 | converting... |
|
226 | converting... | |
218 | 0 make a file executable |
|
227 | 0 make a file executable | |
219 | $ svnupanddisplay a-hg-wc 1 |
|
228 | $ svnupanddisplay a-hg-wc 1 | |
220 | 6 1 test d1 |
|
229 | 6 1 test d1 | |
221 | 6 1 test d1/d2 |
|
230 | 6 1 test d1/d2 | |
222 | 6 1 test d1/d2/b |
|
231 | 6 1 test d1/d2/b | |
223 | 6 3 test newlink |
|
232 | 6 3 test newlink | |
224 | 6 6 test . |
|
233 | 6 6 test . | |
225 | 6 6 test c |
|
234 | 6 6 test c | |
226 | revision: 6 |
|
235 | revision: 6 | |
227 | author: test |
|
236 | author: test | |
228 | msg: make a file executable |
|
237 | msg: make a file executable | |
229 | M /c |
|
238 | M /c | |
|
239 | #if execbit | |||
230 | $ test -x a-hg-wc/c |
|
240 | $ test -x a-hg-wc/c | |
|
241 | #endif | |||
|
242 | $ rm -rf a a-hg a-hg-wc | |||
231 |
|
243 | |||
232 | Executable in new directory |
|
244 | Executable in new directory | |
233 |
|
245 | |||
234 | $ rm -rf a a-hg a-hg-wc |
|
|||
235 | $ hg init a |
|
246 | $ hg init a | |
236 |
|
247 | |||
237 | $ mkdir a/d1 |
|
248 | $ mkdir a/d1 | |
238 | $ echo a > a/d1/a |
|
249 | $ echo a > a/d1/a | |
|
250 | #if execbit | |||
239 | $ chmod +x a/d1/a |
|
251 | $ chmod +x a/d1/a | |
|
252 | #else | |||
|
253 | $ echo fake >> a/d1/a | |||
|
254 | #endif | |||
240 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' |
|
255 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' | |
241 | adding d1/a |
|
256 | adding d1/a | |
242 |
|
257 | |||
243 | $ hg convert -d svn a |
|
258 | $ hg convert -d svn a | |
244 | assuming destination a-hg |
|
259 | assuming destination a-hg | |
245 | initializing svn repository 'a-hg' |
|
260 | initializing svn repository 'a-hg' | |
246 | initializing svn working copy 'a-hg-wc' |
|
261 | initializing svn working copy 'a-hg-wc' | |
247 | scanning source... |
|
262 | scanning source... | |
248 | sorting... |
|
263 | sorting... | |
249 | converting... |
|
264 | converting... | |
250 | 0 add executable file in new directory |
|
265 | 0 add executable file in new directory | |
251 | $ svnupanddisplay a-hg-wc 1 |
|
266 | $ svnupanddisplay a-hg-wc 1 | |
252 | 1 1 test . |
|
267 | 1 1 test . | |
253 | 1 1 test d1 |
|
268 | 1 1 test d1 | |
254 | 1 1 test d1/a |
|
269 | 1 1 test d1/a | |
255 | revision: 1 |
|
270 | revision: 1 | |
256 | author: test |
|
271 | author: test | |
257 | msg: add executable file in new directory |
|
272 | msg: add executable file in new directory | |
258 | A /d1 |
|
273 | A /d1 | |
259 | A /d1/a |
|
274 | A /d1/a | |
|
275 | #if execbit | |||
260 | $ test -x a-hg-wc/d1/a |
|
276 | $ test -x a-hg-wc/d1/a | |
|
277 | #endif | |||
261 |
|
278 | |||
262 | Copy to new directory |
|
279 | Copy to new directory | |
263 |
|
280 | |||
264 | $ mkdir a/d2 |
|
281 | $ mkdir a/d2 | |
265 | $ hg --cwd a cp d1/a d2/a |
|
282 | $ hg --cwd a cp d1/a d2/a | |
266 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' |
|
283 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' | |
267 |
|
284 | |||
268 | $ hg convert -d svn a |
|
285 | $ hg convert -d svn a | |
269 | assuming destination a-hg |
|
286 | assuming destination a-hg | |
270 | initializing svn working copy 'a-hg-wc' |
|
287 | initializing svn working copy 'a-hg-wc' | |
271 | scanning source... |
|
288 | scanning source... | |
272 | sorting... |
|
289 | sorting... | |
273 | converting... |
|
290 | converting... | |
274 | 0 copy file to new directory |
|
291 | 0 copy file to new directory | |
275 | $ svnupanddisplay a-hg-wc 1 |
|
292 | $ svnupanddisplay a-hg-wc 1 | |
276 | 2 1 test d1 |
|
293 | 2 1 test d1 | |
277 | 2 1 test d1/a |
|
294 | 2 1 test d1/a | |
278 | 2 2 test . |
|
295 | 2 2 test . | |
279 | 2 2 test d2 |
|
296 | 2 2 test d2 | |
280 | 2 2 test d2/a |
|
297 | 2 2 test d2/a | |
281 | revision: 2 |
|
298 | revision: 2 | |
282 | author: test |
|
299 | author: test | |
283 | msg: copy file to new directory |
|
300 | msg: copy file to new directory | |
284 | A /d2 |
|
301 | A /d2 | |
285 | A /d2/a (from /d1/a@1) |
|
302 | A /d2/a (from /d1/a@1) | |
286 |
|
303 | |||
287 | Branchy history |
|
304 | Branchy history | |
288 |
|
305 | |||
289 | $ hg init b |
|
306 | $ hg init b | |
290 | $ echo base > b/b |
|
307 | $ echo base > b/b | |
291 | $ hg --cwd b ci -d '0 0' -Ambase |
|
308 | $ hg --cwd b ci -d '0 0' -Ambase | |
292 | adding b |
|
309 | adding b | |
293 |
|
310 | |||
294 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b |
|
311 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b | |
295 | $ echo left-1 > b/left-1 |
|
312 | $ echo left-1 > b/left-1 | |
296 | $ hg --cwd b ci -d '1 0' -Amleft-1 |
|
313 | $ hg --cwd b ci -d '1 0' -Amleft-1 | |
297 | adding left-1 |
|
314 | adding left-1 | |
298 |
|
315 | |||
299 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b |
|
316 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b | |
300 | $ echo left-2 > b/left-2 |
|
317 | $ echo left-2 > b/left-2 | |
301 | $ hg --cwd b ci -d '2 0' -Amleft-2 |
|
318 | $ hg --cwd b ci -d '2 0' -Amleft-2 | |
302 | adding left-2 |
|
319 | adding left-2 | |
303 |
|
320 | |||
304 | $ hg --cwd b up 0 |
|
321 | $ hg --cwd b up 0 | |
305 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
322 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
306 |
|
323 | |||
307 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b |
|
324 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b | |
308 | $ echo right-1 > b/right-1 |
|
325 | $ echo right-1 > b/right-1 | |
309 | $ hg --cwd b ci -d '3 0' -Amright-1 |
|
326 | $ hg --cwd b ci -d '3 0' -Amright-1 | |
310 | adding right-1 |
|
327 | adding right-1 | |
311 | created new head |
|
328 | created new head | |
312 |
|
329 | |||
313 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b |
|
330 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b | |
314 | $ echo right-2 > b/right-2 |
|
331 | $ echo right-2 > b/right-2 | |
315 | $ hg --cwd b ci -d '4 0' -Amright-2 |
|
332 | $ hg --cwd b ci -d '4 0' -Amright-2 | |
316 | adding right-2 |
|
333 | adding right-2 | |
317 |
|
334 | |||
318 | $ hg --cwd b up -C 2 |
|
335 | $ hg --cwd b up -C 2 | |
319 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
336 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
320 | $ hg --cwd b merge |
|
337 | $ hg --cwd b merge | |
321 | merging b |
|
338 | merging b | |
322 | warning: conflicts during merge. |
|
339 | warning: conflicts during merge. | |
323 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
340 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
324 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
341 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
325 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
342 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
326 | [1] |
|
343 | [1] | |
327 | $ hg --cwd b revert -r 2 b |
|
344 | $ hg --cwd b revert -r 2 b | |
328 | $ hg resolve -m b |
|
345 | $ hg resolve -m b | |
329 | $ hg --cwd b ci -d '5 0' -m 'merge' |
|
346 | $ hg --cwd b ci -d '5 0' -m 'merge' | |
330 |
|
347 | |||
331 | Expect 4 changes |
|
348 | Expect 4 changes | |
332 |
|
349 | |||
333 | $ hg convert -d svn b |
|
350 | $ hg convert -d svn b | |
334 | assuming destination b-hg |
|
351 | assuming destination b-hg | |
335 | initializing svn repository 'b-hg' |
|
352 | initializing svn repository 'b-hg' | |
336 | initializing svn working copy 'b-hg-wc' |
|
353 | initializing svn working copy 'b-hg-wc' | |
337 | scanning source... |
|
354 | scanning source... | |
338 | sorting... |
|
355 | sorting... | |
339 | converting... |
|
356 | converting... | |
340 | 5 base |
|
357 | 5 base | |
341 | 4 left-1 |
|
358 | 4 left-1 | |
342 | 3 left-2 |
|
359 | 3 left-2 | |
343 | 2 right-1 |
|
360 | 2 right-1 | |
344 | 1 right-2 |
|
361 | 1 right-2 | |
345 | 0 merge |
|
362 | 0 merge | |
346 |
|
363 | |||
347 | $ svnupanddisplay b-hg-wc 0 |
|
364 | $ svnupanddisplay b-hg-wc 0 | |
348 | 4 2 test left-1 |
|
365 | 4 2 test left-1 | |
349 | 4 3 test b |
|
366 | 4 3 test b | |
350 | 4 3 test left-2 |
|
367 | 4 3 test left-2 | |
351 | 4 4 test . |
|
368 | 4 4 test . | |
352 | 4 4 test right-1 |
|
369 | 4 4 test right-1 | |
353 | 4 4 test right-2 |
|
370 | 4 4 test right-2 | |
354 | revision: 4 |
|
371 | revision: 4 | |
355 | author: test |
|
372 | author: test | |
356 | msg: merge |
|
373 | msg: merge | |
357 | A /right-1 |
|
374 | A /right-1 | |
358 | A /right-2 |
|
375 | A /right-2 | |
359 | revision: 3 |
|
376 | revision: 3 | |
360 | author: test |
|
377 | author: test | |
361 | msg: left-2 |
|
378 | msg: left-2 | |
362 | M /b |
|
379 | M /b | |
363 | A /left-2 |
|
380 | A /left-2 | |
364 | revision: 2 |
|
381 | revision: 2 | |
365 | author: test |
|
382 | author: test | |
366 | msg: left-1 |
|
383 | msg: left-1 | |
367 | M /b |
|
384 | M /b | |
368 | A /left-1 |
|
385 | A /left-1 | |
369 | revision: 1 |
|
386 | revision: 1 | |
370 | author: test |
|
387 | author: test | |
371 | msg: base |
|
388 | msg: base | |
372 | A /b |
|
389 | A /b | |
373 |
|
390 | |||
374 | Tags are not supported, but must not break conversion |
|
391 | Tags are not supported, but must not break conversion | |
375 |
|
392 | |||
376 | $ rm -rf a a-hg a-hg-wc |
|
393 | $ rm -rf a a-hg a-hg-wc | |
377 | $ hg init a |
|
394 | $ hg init a | |
378 | $ echo a > a/a |
|
395 | $ echo a > a/a | |
379 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' |
|
396 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' | |
380 | adding a |
|
397 | adding a | |
381 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 |
|
398 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 | |
382 |
|
399 | |||
383 | $ hg convert -d svn a |
|
400 | $ hg convert -d svn a | |
384 | assuming destination a-hg |
|
401 | assuming destination a-hg | |
385 | initializing svn repository 'a-hg' |
|
402 | initializing svn repository 'a-hg' | |
386 | initializing svn working copy 'a-hg-wc' |
|
403 | initializing svn working copy 'a-hg-wc' | |
387 | scanning source... |
|
404 | scanning source... | |
388 | sorting... |
|
405 | sorting... | |
389 | converting... |
|
406 | converting... | |
390 | 1 Add file a |
|
407 | 1 Add file a | |
391 | 0 Tagged as v1.0 |
|
408 | 0 Tagged as v1.0 | |
392 | writing Subversion tags is not yet implemented |
|
409 | writing Subversion tags is not yet implemented | |
393 | $ svnupanddisplay a-hg-wc 2 |
|
410 | $ svnupanddisplay a-hg-wc 2 | |
394 | 2 1 test a |
|
411 | 2 1 test a | |
395 | 2 2 test . |
|
412 | 2 2 test . | |
396 | 2 2 test .hgtags |
|
413 | 2 2 test .hgtags | |
397 | revision: 2 |
|
414 | revision: 2 | |
398 | author: test |
|
415 | author: test | |
399 | msg: Tagged as v1.0 |
|
416 | msg: Tagged as v1.0 | |
400 | A /.hgtags |
|
417 | A /.hgtags | |
401 | revision: 1 |
|
418 | revision: 1 | |
402 | author: test |
|
419 | author: test | |
403 | msg: Add file a |
|
420 | msg: Add file a | |
404 | A /a |
|
421 | A /a | |
405 | $ rm -rf a a-hg a-hg-wc |
|
422 | $ rm -rf a a-hg a-hg-wc |
@@ -1,126 +1,128 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
|||
2 |
|
||||
3 | Setup |
|
1 | Setup | |
4 |
|
2 | |||
5 | $ echo "[color]" >> $HGRCPATH |
|
3 | $ echo "[color]" >> $HGRCPATH | |
6 | $ echo "mode = ansi" >> $HGRCPATH |
|
4 | $ echo "mode = ansi" >> $HGRCPATH | |
7 | $ echo "[extensions]" >> $HGRCPATH |
|
5 | $ echo "[extensions]" >> $HGRCPATH | |
8 | $ echo "color=" >> $HGRCPATH |
|
6 | $ echo "color=" >> $HGRCPATH | |
9 | $ hg init repo |
|
7 | $ hg init repo | |
10 | $ cd repo |
|
8 | $ cd repo | |
11 | $ cat > a <<EOF |
|
9 | $ cat > a <<EOF | |
12 | > c |
|
10 | > c | |
13 | > c |
|
11 | > c | |
14 | > a |
|
12 | > a | |
15 | > a |
|
13 | > a | |
16 | > b |
|
14 | > b | |
17 | > a |
|
15 | > a | |
18 | > a |
|
16 | > a | |
19 | > c |
|
17 | > c | |
20 | > c |
|
18 | > c | |
21 | > EOF |
|
19 | > EOF | |
22 | $ hg ci -Am adda |
|
20 | $ hg ci -Am adda | |
23 | adding a |
|
21 | adding a | |
24 | $ cat > a <<EOF |
|
22 | $ cat > a <<EOF | |
25 | > c |
|
23 | > c | |
26 | > c |
|
24 | > c | |
27 | > a |
|
25 | > a | |
28 | > a |
|
26 | > a | |
29 | > dd |
|
27 | > dd | |
30 | > a |
|
28 | > a | |
31 | > a |
|
29 | > a | |
32 | > c |
|
30 | > c | |
33 | > c |
|
31 | > c | |
34 | > EOF |
|
32 | > EOF | |
35 |
|
33 | |||
36 | default context |
|
34 | default context | |
37 |
|
35 | |||
38 | $ hg diff --nodates --color=always |
|
36 | $ hg diff --nodates --color=always | |
39 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
37 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
40 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
38 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
41 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
39 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
42 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
40 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
43 | c |
|
41 | c | |
44 | a |
|
42 | a | |
45 | a |
|
43 | a | |
46 | \x1b[0;31m-b\x1b[0m (esc) |
|
44 | \x1b[0;31m-b\x1b[0m (esc) | |
47 | \x1b[0;32m+dd\x1b[0m (esc) |
|
45 | \x1b[0;32m+dd\x1b[0m (esc) | |
48 | a |
|
46 | a | |
49 | a |
|
47 | a | |
50 | c |
|
48 | c | |
51 |
|
49 | |||
52 | --unified=2 |
|
50 | --unified=2 | |
53 |
|
51 | |||
54 | $ hg diff --nodates -U 2 --color=always |
|
52 | $ hg diff --nodates -U 2 --color=always | |
55 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
53 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
56 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
54 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
57 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
55 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
58 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) |
|
56 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) | |
59 | a |
|
57 | a | |
60 | a |
|
58 | a | |
61 | \x1b[0;31m-b\x1b[0m (esc) |
|
59 | \x1b[0;31m-b\x1b[0m (esc) | |
62 | \x1b[0;32m+dd\x1b[0m (esc) |
|
60 | \x1b[0;32m+dd\x1b[0m (esc) | |
63 | a |
|
61 | a | |
64 | a |
|
62 | a | |
65 |
|
63 | |||
66 | diffstat |
|
64 | diffstat | |
67 |
|
65 | |||
68 | $ hg diff --stat --color=always |
|
66 | $ hg diff --stat --color=always | |
69 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) |
|
67 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) | |
70 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
68 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
71 | $ echo "record=" >> $HGRCPATH |
|
69 | $ echo "record=" >> $HGRCPATH | |
72 | $ echo "[ui]" >> $HGRCPATH |
|
70 | $ echo "[ui]" >> $HGRCPATH | |
73 | $ echo "interactive=true" >> $HGRCPATH |
|
71 | $ echo "interactive=true" >> $HGRCPATH | |
74 | $ echo "[diff]" >> $HGRCPATH |
|
72 | $ echo "[diff]" >> $HGRCPATH | |
75 | $ echo "git=True" >> $HGRCPATH |
|
73 | $ echo "git=True" >> $HGRCPATH | |
76 |
|
74 | |||
|
75 | #if execbit | |||
|
76 | ||||
77 | record |
|
77 | record | |
78 |
|
78 | |||
79 | $ chmod +x a |
|
79 | $ chmod +x a | |
80 | $ hg record --color=always -m moda a <<EOF |
|
80 | $ hg record --color=always -m moda a <<EOF | |
81 | > y |
|
81 | > y | |
82 | > y |
|
82 | > y | |
83 | > EOF |
|
83 | > EOF | |
84 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
84 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
85 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
85 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
86 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
86 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
87 | 1 hunks, 1 lines changed |
|
87 | 1 hunks, 1 lines changed | |
88 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc) |
|
88 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc) | |
89 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
89 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
90 | c |
|
90 | c | |
91 | a |
|
91 | a | |
92 | a |
|
92 | a | |
93 | \x1b[0;31m-b\x1b[0m (esc) |
|
93 | \x1b[0;31m-b\x1b[0m (esc) | |
94 | \x1b[0;32m+dd\x1b[0m (esc) |
|
94 | \x1b[0;32m+dd\x1b[0m (esc) | |
95 | a |
|
95 | a | |
96 | a |
|
96 | a | |
97 | c |
|
97 | c | |
98 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc) |
|
98 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc) | |
99 |
|
99 | |||
100 | $ echo "[extensions]" >> $HGRCPATH |
|
100 | $ echo "[extensions]" >> $HGRCPATH | |
101 | $ echo "mq=" >> $HGRCPATH |
|
101 | $ echo "mq=" >> $HGRCPATH | |
102 | $ hg rollback |
|
102 | $ hg rollback | |
103 | repository tip rolled back to revision 0 (undo commit) |
|
103 | repository tip rolled back to revision 0 (undo commit) | |
104 | working directory now based on revision 0 |
|
104 | working directory now based on revision 0 | |
105 |
|
105 | |||
106 | qrecord |
|
106 | qrecord | |
107 |
|
107 | |||
108 | $ hg qrecord --color=always -m moda patch <<EOF |
|
108 | $ hg qrecord --color=always -m moda patch <<EOF | |
109 | > y |
|
109 | > y | |
110 | > y |
|
110 | > y | |
111 | > EOF |
|
111 | > EOF | |
112 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
112 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
113 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
113 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
114 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
114 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
115 | 1 hunks, 1 lines changed |
|
115 | 1 hunks, 1 lines changed | |
116 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc) |
|
116 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc) | |
117 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
117 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
118 | c |
|
118 | c | |
119 | a |
|
119 | a | |
120 | a |
|
120 | a | |
121 | \x1b[0;31m-b\x1b[0m (esc) |
|
121 | \x1b[0;31m-b\x1b[0m (esc) | |
122 | \x1b[0;32m+dd\x1b[0m (esc) |
|
122 | \x1b[0;32m+dd\x1b[0m (esc) | |
123 | a |
|
123 | a | |
124 | a |
|
124 | a | |
125 | c |
|
125 | c | |
126 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc) |
|
126 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc) | |
|
127 | ||||
|
128 | #endif |
@@ -1,198 +1,204 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "extdiff=" >> $HGRCPATH |
|
2 | $ echo "extdiff=" >> $HGRCPATH | |
5 |
|
3 | |||
6 | $ hg init a |
|
4 | $ hg init a | |
7 | $ cd a |
|
5 | $ cd a | |
8 | $ echo a > a |
|
6 | $ echo a > a | |
9 | $ echo b > b |
|
7 | $ echo b > b | |
10 | $ hg add |
|
8 | $ hg add | |
11 | adding a |
|
9 | adding a | |
12 | adding b |
|
10 | adding b | |
13 |
|
11 | |||
14 | Should diff cloned directories: |
|
12 | Should diff cloned directories: | |
15 |
|
13 | |||
16 | $ hg extdiff -o -r $opt |
|
14 | $ hg extdiff -o -r $opt | |
17 | Only in a: a |
|
15 | Only in a: a | |
18 | Only in a: b |
|
16 | Only in a: b | |
19 | [1] |
|
17 | [1] | |
20 |
|
18 | |||
21 | $ echo "[extdiff]" >> $HGRCPATH |
|
19 | $ echo "[extdiff]" >> $HGRCPATH | |
22 | $ echo "cmd.falabala=echo" >> $HGRCPATH |
|
20 | $ echo "cmd.falabala=echo" >> $HGRCPATH | |
23 | $ echo "opts.falabala=diffing" >> $HGRCPATH |
|
21 | $ echo "opts.falabala=diffing" >> $HGRCPATH | |
24 |
|
22 | |||
25 | $ hg falabala |
|
23 | $ hg falabala | |
26 | diffing a.000000000000 a |
|
24 | diffing a.000000000000 a | |
27 | [1] |
|
25 | [1] | |
28 |
|
26 | |||
29 | $ hg help falabala |
|
27 | $ hg help falabala | |
30 | hg falabala [OPTION]... [FILE]... |
|
28 | hg falabala [OPTION]... [FILE]... | |
31 |
|
29 | |||
32 | use 'echo' to diff repository (or selected files) |
|
30 | use 'echo' to diff repository (or selected files) | |
33 |
|
31 | |||
34 | Show differences between revisions for the specified files, using the |
|
32 | Show differences between revisions for the specified files, using the | |
35 | 'echo' program. |
|
33 | 'echo' program. | |
36 |
|
34 | |||
37 | When two revision arguments are given, then changes are shown between |
|
35 | When two revision arguments are given, then changes are shown between | |
38 | those revisions. If only one revision is specified then that revision is |
|
36 | those revisions. If only one revision is specified then that revision is | |
39 | compared to the working directory, and, when no revisions are specified, |
|
37 | compared to the working directory, and, when no revisions are specified, | |
40 | the working directory files are compared to its parent. |
|
38 | the working directory files are compared to its parent. | |
41 |
|
39 | |||
42 | options: |
|
40 | options: | |
43 |
|
41 | |||
44 | -o --option OPT [+] pass option to comparison program |
|
42 | -o --option OPT [+] pass option to comparison program | |
45 | -r --rev REV [+] revision |
|
43 | -r --rev REV [+] revision | |
46 | -c --change REV change made by revision |
|
44 | -c --change REV change made by revision | |
47 | -I --include PATTERN [+] include names matching the given patterns |
|
45 | -I --include PATTERN [+] include names matching the given patterns | |
48 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
46 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
49 |
|
47 | |||
50 | [+] marked option can be specified multiple times |
|
48 | [+] marked option can be specified multiple times | |
51 |
|
49 | |||
52 | use "hg -v help falabala" to show more info |
|
50 | use "hg -v help falabala" to show more info | |
53 |
|
51 | |||
54 | $ hg ci -d '0 0' -mtest1 |
|
52 | $ hg ci -d '0 0' -mtest1 | |
55 |
|
53 | |||
56 | $ echo b >> a |
|
54 | $ echo b >> a | |
57 | $ hg ci -d '1 0' -mtest2 |
|
55 | $ hg ci -d '1 0' -mtest2 | |
58 |
|
56 | |||
59 | Should diff cloned files directly: |
|
57 | Should diff cloned files directly: | |
60 |
|
58 | |||
61 | $ hg falabala -r 0:1 |
|
59 | $ hg falabala -r 0:1 | |
62 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
60 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
63 | [1] |
|
61 | [1] | |
64 |
|
62 | |||
65 | Test diff during merge: |
|
63 | Test diff during merge: | |
66 |
|
64 | |||
67 | $ hg update -C 0 |
|
65 | $ hg update -C 0 | |
68 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ echo c >> c |
|
67 | $ echo c >> c | |
70 | $ hg add c |
|
68 | $ hg add c | |
71 | $ hg ci -m "new branch" -d '1 0' |
|
69 | $ hg ci -m "new branch" -d '1 0' | |
72 | created new head |
|
70 | created new head | |
73 | $ hg merge 1 |
|
71 | $ hg merge 1 | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | (branch merge, don't forget to commit) |
|
73 | (branch merge, don't forget to commit) | |
76 |
|
74 | |||
77 | Should diff cloned file against wc file: |
|
75 | Should diff cloned file against wc file: | |
78 |
|
76 | |||
79 | $ hg falabala |
|
77 | $ hg falabala | |
80 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) |
|
78 | diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) | |
81 | [1] |
|
79 | [1] | |
82 |
|
80 | |||
83 |
|
81 | |||
84 | Test --change option: |
|
82 | Test --change option: | |
85 |
|
83 | |||
86 | $ hg ci -d '2 0' -mtest3 |
|
84 | $ hg ci -d '2 0' -mtest3 | |
87 | $ hg falabala -c 1 |
|
85 | $ hg falabala -c 1 | |
88 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
86 | diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
89 | [1] |
|
87 | [1] | |
90 |
|
88 | |||
91 | Check diff are made from the first parent: |
|
89 | Check diff are made from the first parent: | |
92 |
|
90 | |||
93 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" |
|
91 | $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" | |
94 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) |
|
92 | diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) | |
95 | diff-like tools yield a non-zero exit code |
|
93 | diff-like tools yield a non-zero exit code | |
96 |
|
94 | |||
|
95 | #if execbit | |||
|
96 | ||||
97 | Test extdiff of multiple files in tmp dir: |
|
97 | Test extdiff of multiple files in tmp dir: | |
98 |
|
98 | |||
99 | $ hg update -C 0 > /dev/null |
|
99 | $ hg update -C 0 > /dev/null | |
100 | $ echo changed > a |
|
100 | $ echo changed > a | |
101 | $ echo changed > b |
|
101 | $ echo changed > b | |
102 | $ chmod +x b |
|
102 | $ chmod +x b | |
103 |
|
103 | |||
104 | Diff in working directory, before: |
|
104 | Diff in working directory, before: | |
105 |
|
105 | |||
106 | $ hg diff --git |
|
106 | $ hg diff --git | |
107 | diff --git a/a b/a |
|
107 | diff --git a/a b/a | |
108 | --- a/a |
|
108 | --- a/a | |
109 | +++ b/a |
|
109 | +++ b/a | |
110 | @@ -1,1 +1,1 @@ |
|
110 | @@ -1,1 +1,1 @@ | |
111 | -a |
|
111 | -a | |
112 | +changed |
|
112 | +changed | |
113 | diff --git a/b b/b |
|
113 | diff --git a/b b/b | |
114 | old mode 100644 |
|
114 | old mode 100644 | |
115 | new mode 100755 |
|
115 | new mode 100755 | |
116 | --- a/b |
|
116 | --- a/b | |
117 | +++ b/b |
|
117 | +++ b/b | |
118 | @@ -1,1 +1,1 @@ |
|
118 | @@ -1,1 +1,1 @@ | |
119 | -b |
|
119 | -b | |
120 | +changed |
|
120 | +changed | |
121 |
|
121 | |||
122 |
|
122 | |||
123 | Edit with extdiff -p: |
|
123 | Edit with extdiff -p: | |
124 |
|
124 | |||
125 | Prepare custom diff/edit tool: |
|
125 | Prepare custom diff/edit tool: | |
126 |
|
126 | |||
127 | $ cat > 'diff tool.py' << EOT |
|
127 | $ cat > 'diff tool.py' << EOT | |
128 | > #!/usr/bin/env python |
|
128 | > #!/usr/bin/env python | |
129 | > import time |
|
129 | > import time | |
130 | > time.sleep(1) # avoid unchanged-timestamp problems |
|
130 | > time.sleep(1) # avoid unchanged-timestamp problems | |
131 | > file('a/a', 'ab').write('edited\n') |
|
131 | > file('a/a', 'ab').write('edited\n') | |
132 | > file('a/b', 'ab').write('edited\n') |
|
132 | > file('a/b', 'ab').write('edited\n') | |
133 | > EOT |
|
133 | > EOT | |
134 |
|
134 | |||
135 | $ chmod +x 'diff tool.py' |
|
135 | $ chmod +x 'diff tool.py' | |
136 |
|
136 | |||
137 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a |
|
137 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a | |
138 | and start tool |
|
138 | and start tool | |
139 |
|
139 | |||
140 | $ hg extdiff -p "`pwd`/diff tool.py" |
|
140 | $ hg extdiff -p "`pwd`/diff tool.py" | |
141 | [1] |
|
141 | [1] | |
142 |
|
142 | |||
143 | Diff in working directory, after: |
|
143 | Diff in working directory, after: | |
144 |
|
144 | |||
145 | $ hg diff --git |
|
145 | $ hg diff --git | |
146 | diff --git a/a b/a |
|
146 | diff --git a/a b/a | |
147 | --- a/a |
|
147 | --- a/a | |
148 | +++ b/a |
|
148 | +++ b/a | |
149 | @@ -1,1 +1,2 @@ |
|
149 | @@ -1,1 +1,2 @@ | |
150 | -a |
|
150 | -a | |
151 | +changed |
|
151 | +changed | |
152 | +edited |
|
152 | +edited | |
153 | diff --git a/b b/b |
|
153 | diff --git a/b b/b | |
154 | old mode 100644 |
|
154 | old mode 100644 | |
155 | new mode 100755 |
|
155 | new mode 100755 | |
156 | --- a/b |
|
156 | --- a/b | |
157 | +++ b/b |
|
157 | +++ b/b | |
158 | @@ -1,1 +1,2 @@ |
|
158 | @@ -1,1 +1,2 @@ | |
159 | -b |
|
159 | -b | |
160 | +changed |
|
160 | +changed | |
161 | +edited |
|
161 | +edited | |
162 |
|
162 | |||
163 | Test extdiff with --option: |
|
163 | Test extdiff with --option: | |
164 |
|
164 | |||
165 | $ hg extdiff -p echo -o this -c 1 |
|
165 | $ hg extdiff -p echo -o this -c 1 | |
166 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
166 | this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
167 | [1] |
|
167 | [1] | |
168 |
|
168 | |||
169 | $ hg falabala -o this -c 1 |
|
169 | $ hg falabala -o this -c 1 | |
170 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
170 | diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
171 | [1] |
|
171 | [1] | |
172 |
|
172 | |||
173 | Test with revsets: |
|
173 | Test with revsets: | |
174 |
|
174 | |||
175 | $ hg extdif -p echo -c "rev(1)" |
|
175 | $ hg extdif -p echo -c "rev(1)" | |
176 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
176 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
177 | [1] |
|
177 | [1] | |
178 |
|
178 | |||
179 | $ hg extdif -p echo -r "0::1" |
|
179 | $ hg extdif -p echo -r "0::1" | |
180 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) |
|
180 | */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) | |
181 | [1] |
|
181 | [1] | |
182 |
|
182 | |||
183 | $ cd .. |
|
183 | $ cd .. | |
184 |
|
184 | |||
|
185 | #endif | |||
|
186 | ||||
|
187 | #if symlink | |||
|
188 | ||||
185 | Test symlinks handling (issue1909) |
|
189 | Test symlinks handling (issue1909) | |
186 |
|
190 | |||
187 | $ hg init testsymlinks |
|
191 | $ hg init testsymlinks | |
188 | $ cd testsymlinks |
|
192 | $ cd testsymlinks | |
189 | $ echo a > a |
|
193 | $ echo a > a | |
190 | $ hg ci -Am adda |
|
194 | $ hg ci -Am adda | |
191 | adding a |
|
195 | adding a | |
192 | $ echo a >> a |
|
196 | $ echo a >> a | |
193 | $ ln -s missing linka |
|
197 | $ ln -s missing linka | |
194 | $ hg add linka |
|
198 | $ hg add linka | |
195 | $ hg falabala -r 0 --traceback |
|
199 | $ hg falabala -r 0 --traceback | |
196 | diffing testsymlinks.07f494440405 testsymlinks |
|
200 | diffing testsymlinks.07f494440405 testsymlinks | |
197 | [1] |
|
201 | [1] | |
198 | $ cd .. |
|
202 | $ cd .. | |
|
203 | ||||
|
204 | #endif |
@@ -1,351 +1,362 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ hg init | |
4 | $ echo start > start |
|
2 | $ echo start > start | |
5 | $ hg ci -Amstart |
|
3 | $ hg ci -Amstart | |
6 | adding start |
|
4 | adding start | |
7 |
|
5 | |||
8 | New file: |
|
6 | New file: | |
9 |
|
7 | |||
10 | $ echo new > new |
|
8 | $ echo new > new | |
11 | $ hg ci -Amnew |
|
9 | $ hg ci -Amnew | |
12 | adding new |
|
10 | adding new | |
13 | $ hg diff --git -r 0 |
|
11 | $ hg diff --git -r 0 | |
14 | diff --git a/new b/new |
|
12 | diff --git a/new b/new | |
15 | new file mode 100644 |
|
13 | new file mode 100644 | |
16 | --- /dev/null |
|
14 | --- /dev/null | |
17 | +++ b/new |
|
15 | +++ b/new | |
18 | @@ -0,0 +1,1 @@ |
|
16 | @@ -0,0 +1,1 @@ | |
19 | +new |
|
17 | +new | |
20 |
|
18 | |||
21 | Copy: |
|
19 | Copy: | |
22 |
|
20 | |||
23 | $ hg cp new copy |
|
21 | $ hg cp new copy | |
24 | $ hg ci -mcopy |
|
22 | $ hg ci -mcopy | |
25 | $ hg diff --git -r 1:tip |
|
23 | $ hg diff --git -r 1:tip | |
26 | diff --git a/new b/copy |
|
24 | diff --git a/new b/copy | |
27 | copy from new |
|
25 | copy from new | |
28 | copy to copy |
|
26 | copy to copy | |
29 |
|
27 | |||
30 | Rename: |
|
28 | Rename: | |
31 |
|
29 | |||
32 | $ hg mv copy rename |
|
30 | $ hg mv copy rename | |
33 | $ hg ci -mrename |
|
31 | $ hg ci -mrename | |
34 | $ hg diff --git -r 2:tip |
|
32 | $ hg diff --git -r 2:tip | |
35 | diff --git a/copy b/rename |
|
33 | diff --git a/copy b/rename | |
36 | rename from copy |
|
34 | rename from copy | |
37 | rename to rename |
|
35 | rename to rename | |
38 |
|
36 | |||
39 | Delete: |
|
37 | Delete: | |
40 |
|
38 | |||
41 | $ hg rm rename |
|
39 | $ hg rm rename | |
42 | $ hg ci -mdelete |
|
40 | $ hg ci -mdelete | |
43 | $ hg diff --git -r 3:tip |
|
41 | $ hg diff --git -r 3:tip | |
44 | diff --git a/rename b/rename |
|
42 | diff --git a/rename b/rename | |
45 | deleted file mode 100644 |
|
43 | deleted file mode 100644 | |
46 | --- a/rename |
|
44 | --- a/rename | |
47 | +++ /dev/null |
|
45 | +++ /dev/null | |
48 | @@ -1,1 +0,0 @@ |
|
46 | @@ -1,1 +0,0 @@ | |
49 | -new |
|
47 | -new | |
50 |
|
48 | |||
51 | $ cat > src <<EOF |
|
49 | $ cat > src <<EOF | |
52 | > 1 |
|
50 | > 1 | |
53 | > 2 |
|
51 | > 2 | |
54 | > 3 |
|
52 | > 3 | |
55 | > 4 |
|
53 | > 4 | |
56 | > 5 |
|
54 | > 5 | |
57 | > EOF |
|
55 | > EOF | |
58 | $ hg ci -Amsrc |
|
56 | $ hg ci -Amsrc | |
59 | adding src |
|
57 | adding src | |
60 |
|
58 | |||
|
59 | #if execbit | |||
|
60 | ||||
61 | chmod 644: |
|
61 | chmod 644: | |
62 |
|
62 | |||
63 | $ chmod +x src |
|
63 | $ chmod +x src | |
64 | $ hg ci -munexec |
|
64 | $ hg ci -munexec | |
65 | $ hg diff --git -r 5:tip |
|
65 | $ hg diff --git -r 5:tip | |
66 | diff --git a/src b/src |
|
66 | diff --git a/src b/src | |
67 | old mode 100644 |
|
67 | old mode 100644 | |
68 | new mode 100755 |
|
68 | new mode 100755 | |
69 |
|
69 | |||
70 | Rename+mod+chmod: |
|
70 | Rename+mod+chmod: | |
71 |
|
71 | |||
72 | $ hg mv src dst |
|
72 | $ hg mv src dst | |
73 | $ chmod -x dst |
|
73 | $ chmod -x dst | |
74 | $ echo a >> dst |
|
74 | $ echo a >> dst | |
75 | $ hg ci -mrenamemod |
|
75 | $ hg ci -mrenamemod | |
76 | $ hg diff --git -r 6:tip |
|
76 | $ hg diff --git -r 6:tip | |
77 | diff --git a/src b/dst |
|
77 | diff --git a/src b/dst | |
78 | old mode 100755 |
|
78 | old mode 100755 | |
79 | new mode 100644 |
|
79 | new mode 100644 | |
80 | rename from src |
|
80 | rename from src | |
81 | rename to dst |
|
81 | rename to dst | |
82 | --- a/src |
|
82 | --- a/src | |
83 | +++ b/dst |
|
83 | +++ b/dst | |
84 | @@ -3,3 +3,4 @@ |
|
84 | @@ -3,3 +3,4 @@ | |
85 | 3 |
|
85 | 3 | |
86 | 4 |
|
86 | 4 | |
87 | 5 |
|
87 | 5 | |
88 | +a |
|
88 | +a | |
89 |
|
89 | |||
90 | Nonexistent in tip+chmod: |
|
90 | Nonexistent in tip+chmod: | |
91 |
|
91 | |||
92 | $ hg diff --git -r 5:6 |
|
92 | $ hg diff --git -r 5:6 | |
93 | diff --git a/src b/src |
|
93 | diff --git a/src b/src | |
94 | old mode 100644 |
|
94 | old mode 100644 | |
95 | new mode 100755 |
|
95 | new mode 100755 | |
96 |
|
96 | |||
|
97 | #else | |||
|
98 | ||||
|
99 | Dummy changes when no exec bit, mocking the execbit commit structure | |||
|
100 | ||||
|
101 | $ echo change >> src | |||
|
102 | $ hg ci -munexec | |||
|
103 | $ hg mv src dst | |||
|
104 | $ hg ci -mrenamemod | |||
|
105 | ||||
|
106 | #endif | |||
|
107 | ||||
97 | Binary diff: |
|
108 | Binary diff: | |
98 |
|
109 | |||
99 | $ cp "$TESTDIR/binfile.bin" . |
|
110 | $ cp "$TESTDIR/binfile.bin" . | |
100 | $ hg add binfile.bin |
|
111 | $ hg add binfile.bin | |
101 | $ hg diff --git > b.diff |
|
112 | $ hg diff --git > b.diff | |
102 | $ cat b.diff |
|
113 | $ cat b.diff | |
103 | diff --git a/binfile.bin b/binfile.bin |
|
114 | diff --git a/binfile.bin b/binfile.bin | |
104 | new file mode 100644 |
|
115 | new file mode 100644 | |
105 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 |
|
116 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 | |
106 | GIT binary patch |
|
117 | GIT binary patch | |
107 | literal 593 |
|
118 | literal 593 | |
108 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU |
|
119 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU | |
109 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd |
|
120 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd | |
110 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M |
|
121 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M | |
111 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT |
|
122 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT | |
112 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po |
|
123 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po | |
113 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; |
|
124 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; | |
114 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V |
|
125 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V | |
115 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- |
|
126 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- | |
116 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; |
|
127 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; | |
117 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K |
|
128 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K | |
118 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= |
|
129 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= | |
119 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 |
|
130 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 | |
120 |
|
131 | |||
121 |
|
132 | |||
122 | Import binary diff: |
|
133 | Import binary diff: | |
123 |
|
134 | |||
124 | $ hg revert binfile.bin |
|
135 | $ hg revert binfile.bin | |
125 | $ rm binfile.bin |
|
136 | $ rm binfile.bin | |
126 | $ hg import -mfoo b.diff |
|
137 | $ hg import -mfoo b.diff | |
127 | applying b.diff |
|
138 | applying b.diff | |
128 | $ cmp binfile.bin "$TESTDIR/binfile.bin" |
|
139 | $ cmp binfile.bin "$TESTDIR/binfile.bin" | |
129 |
|
140 | |||
130 | Rename binary file: |
|
141 | Rename binary file: | |
131 |
|
142 | |||
132 | $ hg mv binfile.bin renamed.bin |
|
143 | $ hg mv binfile.bin renamed.bin | |
133 | $ hg diff --git |
|
144 | $ hg diff --git | |
134 | diff --git a/binfile.bin b/renamed.bin |
|
145 | diff --git a/binfile.bin b/renamed.bin | |
135 | rename from binfile.bin |
|
146 | rename from binfile.bin | |
136 | rename to renamed.bin |
|
147 | rename to renamed.bin | |
137 |
|
148 | |||
138 | Diff across many revisions: |
|
149 | Diff across many revisions: | |
139 |
|
150 | |||
140 | $ hg mv dst dst2 |
|
151 | $ hg mv dst dst2 | |
141 | $ hg ci -m 'mv dst dst2' |
|
152 | $ hg ci -m 'mv dst dst2' | |
142 |
|
153 | |||
143 | $ echo >> start |
|
154 | $ echo >> start | |
144 | $ hg ci -m 'change start' |
|
155 | $ hg ci -m 'change start' | |
145 |
|
156 | |||
146 | $ hg revert -r -2 start |
|
157 | $ hg revert -r -2 start | |
147 | $ hg mv dst2 dst3 |
|
158 | $ hg mv dst2 dst3 | |
148 | $ hg ci -m 'mv dst2 dst3; revert start' |
|
159 | $ hg ci -m 'mv dst2 dst3; revert start' | |
149 |
|
160 | |||
150 | $ hg diff --git -r 9:11 |
|
161 | $ hg diff --git -r 9:11 | |
151 | diff --git a/dst2 b/dst3 |
|
162 | diff --git a/dst2 b/dst3 | |
152 | rename from dst2 |
|
163 | rename from dst2 | |
153 | rename to dst3 |
|
164 | rename to dst3 | |
154 |
|
165 | |||
155 | Reversed: |
|
166 | Reversed: | |
156 |
|
167 | |||
157 | $ hg diff --git -r 11:9 |
|
168 | $ hg diff --git -r 11:9 | |
158 | diff --git a/dst3 b/dst2 |
|
169 | diff --git a/dst3 b/dst2 | |
159 | rename from dst3 |
|
170 | rename from dst3 | |
160 | rename to dst2 |
|
171 | rename to dst2 | |
161 |
|
172 | |||
162 |
|
173 | |||
163 | $ echo a >> foo |
|
174 | $ echo a >> foo | |
164 | $ hg add foo |
|
175 | $ hg add foo | |
165 | $ hg ci -m 'add foo' |
|
176 | $ hg ci -m 'add foo' | |
166 | $ echo b >> foo |
|
177 | $ echo b >> foo | |
167 | $ hg ci -m 'change foo' |
|
178 | $ hg ci -m 'change foo' | |
168 | $ hg mv foo bar |
|
179 | $ hg mv foo bar | |
169 | $ hg ci -m 'mv foo bar' |
|
180 | $ hg ci -m 'mv foo bar' | |
170 | $ echo c >> bar |
|
181 | $ echo c >> bar | |
171 | $ hg ci -m 'change bar' |
|
182 | $ hg ci -m 'change bar' | |
172 |
|
183 | |||
173 | File created before r1 and renamed before r2: |
|
184 | File created before r1 and renamed before r2: | |
174 |
|
185 | |||
175 | $ hg diff --git -r -3:-1 |
|
186 | $ hg diff --git -r -3:-1 | |
176 | diff --git a/foo b/bar |
|
187 | diff --git a/foo b/bar | |
177 | rename from foo |
|
188 | rename from foo | |
178 | rename to bar |
|
189 | rename to bar | |
179 | --- a/foo |
|
190 | --- a/foo | |
180 | +++ b/bar |
|
191 | +++ b/bar | |
181 | @@ -1,2 +1,3 @@ |
|
192 | @@ -1,2 +1,3 @@ | |
182 | a |
|
193 | a | |
183 | b |
|
194 | b | |
184 | +c |
|
195 | +c | |
185 |
|
196 | |||
186 | Reversed: |
|
197 | Reversed: | |
187 |
|
198 | |||
188 | $ hg diff --git -r -1:-3 |
|
199 | $ hg diff --git -r -1:-3 | |
189 | diff --git a/bar b/foo |
|
200 | diff --git a/bar b/foo | |
190 | rename from bar |
|
201 | rename from bar | |
191 | rename to foo |
|
202 | rename to foo | |
192 | --- a/bar |
|
203 | --- a/bar | |
193 | +++ b/foo |
|
204 | +++ b/foo | |
194 | @@ -1,3 +1,2 @@ |
|
205 | @@ -1,3 +1,2 @@ | |
195 | a |
|
206 | a | |
196 | b |
|
207 | b | |
197 | -c |
|
208 | -c | |
198 |
|
209 | |||
199 | File created in r1 and renamed before r2: |
|
210 | File created in r1 and renamed before r2: | |
200 |
|
211 | |||
201 | $ hg diff --git -r -4:-1 |
|
212 | $ hg diff --git -r -4:-1 | |
202 | diff --git a/foo b/bar |
|
213 | diff --git a/foo b/bar | |
203 | rename from foo |
|
214 | rename from foo | |
204 | rename to bar |
|
215 | rename to bar | |
205 | --- a/foo |
|
216 | --- a/foo | |
206 | +++ b/bar |
|
217 | +++ b/bar | |
207 | @@ -1,1 +1,3 @@ |
|
218 | @@ -1,1 +1,3 @@ | |
208 | a |
|
219 | a | |
209 | +b |
|
220 | +b | |
210 | +c |
|
221 | +c | |
211 |
|
222 | |||
212 | Reversed: |
|
223 | Reversed: | |
213 |
|
224 | |||
214 | $ hg diff --git -r -1:-4 |
|
225 | $ hg diff --git -r -1:-4 | |
215 | diff --git a/bar b/foo |
|
226 | diff --git a/bar b/foo | |
216 | rename from bar |
|
227 | rename from bar | |
217 | rename to foo |
|
228 | rename to foo | |
218 | --- a/bar |
|
229 | --- a/bar | |
219 | +++ b/foo |
|
230 | +++ b/foo | |
220 | @@ -1,3 +1,1 @@ |
|
231 | @@ -1,3 +1,1 @@ | |
221 | a |
|
232 | a | |
222 | -b |
|
233 | -b | |
223 | -c |
|
234 | -c | |
224 |
|
235 | |||
225 | File created after r1 and renamed before r2: |
|
236 | File created after r1 and renamed before r2: | |
226 |
|
237 | |||
227 | $ hg diff --git -r -5:-1 |
|
238 | $ hg diff --git -r -5:-1 | |
228 | diff --git a/bar b/bar |
|
239 | diff --git a/bar b/bar | |
229 | new file mode 100644 |
|
240 | new file mode 100644 | |
230 | --- /dev/null |
|
241 | --- /dev/null | |
231 | +++ b/bar |
|
242 | +++ b/bar | |
232 | @@ -0,0 +1,3 @@ |
|
243 | @@ -0,0 +1,3 @@ | |
233 | +a |
|
244 | +a | |
234 | +b |
|
245 | +b | |
235 | +c |
|
246 | +c | |
236 |
|
247 | |||
237 | Reversed: |
|
248 | Reversed: | |
238 |
|
249 | |||
239 | $ hg diff --git -r -1:-5 |
|
250 | $ hg diff --git -r -1:-5 | |
240 | diff --git a/bar b/bar |
|
251 | diff --git a/bar b/bar | |
241 | deleted file mode 100644 |
|
252 | deleted file mode 100644 | |
242 | --- a/bar |
|
253 | --- a/bar | |
243 | +++ /dev/null |
|
254 | +++ /dev/null | |
244 | @@ -1,3 +0,0 @@ |
|
255 | @@ -1,3 +0,0 @@ | |
245 | -a |
|
256 | -a | |
246 | -b |
|
257 | -b | |
247 | -c |
|
258 | -c | |
248 |
|
259 | |||
249 |
|
260 | |||
250 | Comparing with the working dir: |
|
261 | Comparing with the working dir: | |
251 |
|
262 | |||
252 | $ echo >> start |
|
263 | $ echo >> start | |
253 | $ hg ci -m 'change start again' |
|
264 | $ hg ci -m 'change start again' | |
254 |
|
265 | |||
255 | $ echo > created |
|
266 | $ echo > created | |
256 | $ hg add created |
|
267 | $ hg add created | |
257 | $ hg ci -m 'add created' |
|
268 | $ hg ci -m 'add created' | |
258 |
|
269 | |||
259 | $ hg mv created created2 |
|
270 | $ hg mv created created2 | |
260 | $ hg ci -m 'mv created created2' |
|
271 | $ hg ci -m 'mv created created2' | |
261 |
|
272 | |||
262 | $ hg mv created2 created3 |
|
273 | $ hg mv created2 created3 | |
263 |
|
274 | |||
264 | There's a copy in the working dir: |
|
275 | There's a copy in the working dir: | |
265 |
|
276 | |||
266 | $ hg diff --git |
|
277 | $ hg diff --git | |
267 | diff --git a/created2 b/created3 |
|
278 | diff --git a/created2 b/created3 | |
268 | rename from created2 |
|
279 | rename from created2 | |
269 | rename to created3 |
|
280 | rename to created3 | |
270 |
|
281 | |||
271 | There's another copy between the original rev and the wd: |
|
282 | There's another copy between the original rev and the wd: | |
272 |
|
283 | |||
273 | $ hg diff --git -r -2 |
|
284 | $ hg diff --git -r -2 | |
274 | diff --git a/created b/created3 |
|
285 | diff --git a/created b/created3 | |
275 | rename from created |
|
286 | rename from created | |
276 | rename to created3 |
|
287 | rename to created3 | |
277 |
|
288 | |||
278 | The source of the copy was created after the original rev: |
|
289 | The source of the copy was created after the original rev: | |
279 |
|
290 | |||
280 | $ hg diff --git -r -3 |
|
291 | $ hg diff --git -r -3 | |
281 | diff --git a/created3 b/created3 |
|
292 | diff --git a/created3 b/created3 | |
282 | new file mode 100644 |
|
293 | new file mode 100644 | |
283 | --- /dev/null |
|
294 | --- /dev/null | |
284 | +++ b/created3 |
|
295 | +++ b/created3 | |
285 | @@ -0,0 +1,1 @@ |
|
296 | @@ -0,0 +1,1 @@ | |
286 | + |
|
297 | + | |
287 | $ hg ci -m 'mv created2 created3' |
|
298 | $ hg ci -m 'mv created2 created3' | |
288 |
|
299 | |||
289 |
|
300 | |||
290 | $ echo > brand-new |
|
301 | $ echo > brand-new | |
291 | $ hg add brand-new |
|
302 | $ hg add brand-new | |
292 | $ hg ci -m 'add brand-new' |
|
303 | $ hg ci -m 'add brand-new' | |
293 | $ hg mv brand-new brand-new2 |
|
304 | $ hg mv brand-new brand-new2 | |
294 |
|
305 | |||
295 | Created in parent of wd; renamed in the wd: |
|
306 | Created in parent of wd; renamed in the wd: | |
296 |
|
307 | |||
297 | $ hg diff --git |
|
308 | $ hg diff --git | |
298 | diff --git a/brand-new b/brand-new2 |
|
309 | diff --git a/brand-new b/brand-new2 | |
299 | rename from brand-new |
|
310 | rename from brand-new | |
300 | rename to brand-new2 |
|
311 | rename to brand-new2 | |
301 |
|
312 | |||
302 | Created between r1 and parent of wd; renamed in the wd: |
|
313 | Created between r1 and parent of wd; renamed in the wd: | |
303 |
|
314 | |||
304 | $ hg diff --git -r -2 |
|
315 | $ hg diff --git -r -2 | |
305 | diff --git a/brand-new2 b/brand-new2 |
|
316 | diff --git a/brand-new2 b/brand-new2 | |
306 | new file mode 100644 |
|
317 | new file mode 100644 | |
307 | --- /dev/null |
|
318 | --- /dev/null | |
308 | +++ b/brand-new2 |
|
319 | +++ b/brand-new2 | |
309 | @@ -0,0 +1,1 @@ |
|
320 | @@ -0,0 +1,1 @@ | |
310 | + |
|
321 | + | |
311 | $ hg ci -m 'mv brand-new brand-new2' |
|
322 | $ hg ci -m 'mv brand-new brand-new2' | |
312 |
|
323 | |||
313 | One file is copied to many destinations and removed: |
|
324 | One file is copied to many destinations and removed: | |
314 |
|
325 | |||
315 | $ hg cp brand-new2 brand-new3 |
|
326 | $ hg cp brand-new2 brand-new3 | |
316 | $ hg mv brand-new2 brand-new3-2 |
|
327 | $ hg mv brand-new2 brand-new3-2 | |
317 | $ hg ci -m 'multiple renames/copies' |
|
328 | $ hg ci -m 'multiple renames/copies' | |
318 | $ hg diff --git -r -2 -r -1 |
|
329 | $ hg diff --git -r -2 -r -1 | |
319 | diff --git a/brand-new2 b/brand-new3 |
|
330 | diff --git a/brand-new2 b/brand-new3 | |
320 | rename from brand-new2 |
|
331 | rename from brand-new2 | |
321 | rename to brand-new3 |
|
332 | rename to brand-new3 | |
322 | diff --git a/brand-new2 b/brand-new3-2 |
|
333 | diff --git a/brand-new2 b/brand-new3-2 | |
323 | copy from brand-new2 |
|
334 | copy from brand-new2 | |
324 | copy to brand-new3-2 |
|
335 | copy to brand-new3-2 | |
325 |
|
336 | |||
326 | Reversed: |
|
337 | Reversed: | |
327 |
|
338 | |||
328 | $ hg diff --git -r -1 -r -2 |
|
339 | $ hg diff --git -r -1 -r -2 | |
329 | diff --git a/brand-new3 b/brand-new2 |
|
340 | diff --git a/brand-new3 b/brand-new2 | |
330 | rename from brand-new3 |
|
341 | rename from brand-new3 | |
331 | rename to brand-new2 |
|
342 | rename to brand-new2 | |
332 | diff --git a/brand-new3-2 b/brand-new3-2 |
|
343 | diff --git a/brand-new3-2 b/brand-new3-2 | |
333 | deleted file mode 100644 |
|
344 | deleted file mode 100644 | |
334 | --- a/brand-new3-2 |
|
345 | --- a/brand-new3-2 | |
335 | +++ /dev/null |
|
346 | +++ /dev/null | |
336 | @@ -1,1 +0,0 @@ |
|
347 | @@ -1,1 +0,0 @@ | |
337 | - |
|
348 | - | |
338 |
|
349 | |||
339 | There should be a trailing TAB if there are spaces in the file name: |
|
350 | There should be a trailing TAB if there are spaces in the file name: | |
340 |
|
351 | |||
341 | $ echo foo > 'with spaces' |
|
352 | $ echo foo > 'with spaces' | |
342 | $ hg add 'with spaces' |
|
353 | $ hg add 'with spaces' | |
343 | $ hg diff --git |
|
354 | $ hg diff --git | |
344 | diff --git a/with spaces b/with spaces |
|
355 | diff --git a/with spaces b/with spaces | |
345 | new file mode 100644 |
|
356 | new file mode 100644 | |
346 | --- /dev/null |
|
357 | --- /dev/null | |
347 | +++ b/with spaces |
|
358 | +++ b/with spaces | |
348 | @@ -0,0 +1,1 @@ |
|
359 | @@ -0,0 +1,1 @@ | |
349 | +foo |
|
360 | +foo | |
350 | $ hg ci -m 'add filename with spaces' |
|
361 | $ hg ci -m 'add filename with spaces' | |
351 |
|
362 |
@@ -1,267 +1,268 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "purge=" >> $HGRCPATH |
|
2 | $ echo "purge=" >> $HGRCPATH | |
5 | $ echo "graphlog=" >> $HGRCPATH |
|
3 | $ echo "graphlog=" >> $HGRCPATH | |
6 |
|
4 | |||
7 | $ shortlog() { |
|
5 | $ shortlog() { | |
8 | > hg glog --template '{rev}:{node|short} {author} {date|hgdate} - {branch} - {desc|firstline}\n' |
|
6 | > hg glog --template '{rev}:{node|short} {author} {date|hgdate} - {branch} - {desc|firstline}\n' | |
9 | > } |
|
7 | > } | |
10 |
|
8 | |||
11 | Test --bypass with other options |
|
9 | Test --bypass with other options | |
12 |
|
10 | |||
13 | $ hg init repo-options |
|
11 | $ hg init repo-options | |
14 | $ cd repo-options |
|
12 | $ cd repo-options | |
15 | $ echo a > a |
|
13 | $ echo a > a | |
16 | $ hg ci -Am adda |
|
14 | $ hg ci -Am adda | |
17 | adding a |
|
15 | adding a | |
18 | $ echo a >> a |
|
16 | $ echo a >> a | |
19 | $ hg branch foo |
|
17 | $ hg branch foo | |
20 | marked working directory as branch foo |
|
18 | marked working directory as branch foo | |
21 | (branches are permanent and global, did you want a bookmark?) |
|
19 | (branches are permanent and global, did you want a bookmark?) | |
22 | $ hg ci -Am changea |
|
20 | $ hg ci -Am changea | |
23 | $ hg export . > ../test.diff |
|
21 | $ hg export . > ../test.diff | |
24 | $ hg up null |
|
22 | $ hg up null | |
25 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
23 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
26 |
|
24 | |||
27 | Test importing an existing revision |
|
25 | Test importing an existing revision | |
28 |
|
26 | |||
29 | $ hg import --bypass --exact ../test.diff |
|
27 | $ hg import --bypass --exact ../test.diff | |
30 | applying ../test.diff |
|
28 | applying ../test.diff | |
31 | $ shortlog |
|
29 | $ shortlog | |
32 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
30 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
33 | | |
|
31 | | | |
34 | o 0:07f494440405 test 0 0 - default - adda |
|
32 | o 0:07f494440405 test 0 0 - default - adda | |
35 |
|
33 | |||
36 |
|
34 | |||
37 | Test failure without --exact |
|
35 | Test failure without --exact | |
38 |
|
36 | |||
39 | $ hg import --bypass ../test.diff |
|
37 | $ hg import --bypass ../test.diff | |
40 | applying ../test.diff |
|
38 | applying ../test.diff | |
41 | unable to find 'a' for patching |
|
39 | unable to find 'a' for patching | |
42 | abort: patch failed to apply |
|
40 | abort: patch failed to apply | |
43 | [255] |
|
41 | [255] | |
44 | $ hg st |
|
42 | $ hg st | |
45 | $ shortlog |
|
43 | $ shortlog | |
46 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
44 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
47 | | |
|
45 | | | |
48 | o 0:07f494440405 test 0 0 - default - adda |
|
46 | o 0:07f494440405 test 0 0 - default - adda | |
49 |
|
47 | |||
50 |
|
48 | |||
51 | Test --user, --date and --message |
|
49 | Test --user, --date and --message | |
52 |
|
50 | |||
53 | $ hg up 0 |
|
51 | $ hg up 0 | |
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
55 | $ hg import --bypass --u test2 -d '1 0' -m patch2 ../test.diff |
|
53 | $ hg import --bypass --u test2 -d '1 0' -m patch2 ../test.diff | |
56 | applying ../test.diff |
|
54 | applying ../test.diff | |
57 | $ cat .hg/last-message.txt |
|
55 | $ cat .hg/last-message.txt | |
58 | patch2 (no-eol) |
|
56 | patch2 (no-eol) | |
59 | $ shortlog |
|
57 | $ shortlog | |
60 | o 2:2e127d1da504 test2 1 0 - default - patch2 |
|
58 | o 2:2e127d1da504 test2 1 0 - default - patch2 | |
61 | | |
|
59 | | | |
62 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
60 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
63 | |/ |
|
61 | |/ | |
64 | @ 0:07f494440405 test 0 0 - default - adda |
|
62 | @ 0:07f494440405 test 0 0 - default - adda | |
65 |
|
63 | |||
66 | $ hg rollback |
|
64 | $ hg rollback | |
67 | repository tip rolled back to revision 1 (undo import) |
|
65 | repository tip rolled back to revision 1 (undo import) | |
68 |
|
66 | |||
69 | Test --import-branch |
|
67 | Test --import-branch | |
70 |
|
68 | |||
71 | $ hg import --bypass --import-branch ../test.diff |
|
69 | $ hg import --bypass --import-branch ../test.diff | |
72 | applying ../test.diff |
|
70 | applying ../test.diff | |
73 | $ shortlog |
|
71 | $ shortlog | |
74 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
72 | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
75 | | |
|
73 | | | |
76 | @ 0:07f494440405 test 0 0 - default - adda |
|
74 | @ 0:07f494440405 test 0 0 - default - adda | |
77 |
|
75 | |||
78 | $ hg rollback |
|
76 | $ hg rollback | |
79 | repository tip rolled back to revision 1 (undo import) |
|
77 | repository tip rolled back to revision 1 (undo import) | |
80 |
|
78 | |||
81 | Test --strip |
|
79 | Test --strip | |
82 |
|
80 | |||
83 | $ hg import --bypass --strip 0 - <<EOF |
|
81 | $ hg import --bypass --strip 0 - <<EOF | |
84 | > # HG changeset patch |
|
82 | > # HG changeset patch | |
85 | > # User test |
|
83 | > # User test | |
86 | > # Date 0 0 |
|
84 | > # Date 0 0 | |
87 | > # Branch foo |
|
85 | > # Branch foo | |
88 | > # Node ID 4e322f7ce8e3e4203950eac9ece27bf7e45ffa6c |
|
86 | > # Node ID 4e322f7ce8e3e4203950eac9ece27bf7e45ffa6c | |
89 | > # Parent 07f4944404050f47db2e5c5071e0e84e7a27bba9 |
|
87 | > # Parent 07f4944404050f47db2e5c5071e0e84e7a27bba9 | |
90 | > changea |
|
88 | > changea | |
91 | > |
|
89 | > | |
92 | > diff -r 07f494440405 -r 4e322f7ce8e3 a |
|
90 | > diff -r 07f494440405 -r 4e322f7ce8e3 a | |
93 | > --- a Thu Jan 01 00:00:00 1970 +0000 |
|
91 | > --- a Thu Jan 01 00:00:00 1970 +0000 | |
94 | > +++ a Thu Jan 01 00:00:00 1970 +0000 |
|
92 | > +++ a Thu Jan 01 00:00:00 1970 +0000 | |
95 | > @@ -1,1 +1,2 @@ |
|
93 | > @@ -1,1 +1,2 @@ | |
96 | > a |
|
94 | > a | |
97 | > +a |
|
95 | > +a | |
98 | > EOF |
|
96 | > EOF | |
99 | applying patch from stdin |
|
97 | applying patch from stdin | |
100 | $ hg rollback |
|
98 | $ hg rollback | |
101 | repository tip rolled back to revision 1 (undo import) |
|
99 | repository tip rolled back to revision 1 (undo import) | |
102 |
|
100 | |||
103 | Test unsupported combinations |
|
101 | Test unsupported combinations | |
104 |
|
102 | |||
105 | $ hg import --bypass --no-commit ../test.diff |
|
103 | $ hg import --bypass --no-commit ../test.diff | |
106 | abort: cannot use --no-commit with --bypass |
|
104 | abort: cannot use --no-commit with --bypass | |
107 | [255] |
|
105 | [255] | |
108 | $ hg import --bypass --similarity 50 ../test.diff |
|
106 | $ hg import --bypass --similarity 50 ../test.diff | |
109 | abort: cannot use --similarity with --bypass |
|
107 | abort: cannot use --similarity with --bypass | |
110 | [255] |
|
108 | [255] | |
111 |
|
109 | |||
112 | Test commit editor |
|
110 | Test commit editor | |
113 |
|
111 | |||
114 | $ cat > ../test.diff <<EOF |
|
112 | $ cat > ../test.diff <<EOF | |
115 | > diff -r 07f494440405 -r 4e322f7ce8e3 a |
|
113 | > diff -r 07f494440405 -r 4e322f7ce8e3 a | |
116 | > --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
114 | > --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
117 | > +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
115 | > +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
118 | > @@ -1,1 +1,2 @@ |
|
116 | > @@ -1,1 +1,2 @@ | |
119 | > -a |
|
117 | > -a | |
120 | > +b |
|
118 | > +b | |
121 | > +c |
|
119 | > +c | |
122 | > EOF |
|
120 | > EOF | |
123 | $ HGEDITOR=cat hg import --bypass ../test.diff |
|
121 | $ HGEDITOR=cat hg import --bypass ../test.diff | |
124 | applying ../test.diff |
|
122 | applying ../test.diff | |
125 |
|
123 | |||
126 |
|
124 | |||
127 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
125 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
128 | HG: Leave message empty to abort commit. |
|
126 | HG: Leave message empty to abort commit. | |
129 | HG: -- |
|
127 | HG: -- | |
130 | HG: user: test |
|
128 | HG: user: test | |
131 | HG: branch 'default' |
|
129 | HG: branch 'default' | |
132 | HG: changed a |
|
130 | HG: changed a | |
133 | abort: empty commit message |
|
131 | abort: empty commit message | |
134 | [255] |
|
132 | [255] | |
135 |
|
133 | |||
136 | Test patch.eol is handled |
|
134 | Test patch.eol is handled | |
137 |
|
135 | |||
138 | $ python -c 'file("a", "wb").write("a\r\n")' |
|
136 | $ python -c 'file("a", "wb").write("a\r\n")' | |
139 | $ hg ci -m makeacrlf |
|
137 | $ hg ci -m makeacrlf | |
140 | $ hg import -m 'should fail because of eol' --bypass ../test.diff |
|
138 | $ hg import -m 'should fail because of eol' --bypass ../test.diff | |
141 | applying ../test.diff |
|
139 | applying ../test.diff | |
142 | patching file a |
|
140 | patching file a | |
143 | Hunk #1 FAILED at 0 |
|
141 | Hunk #1 FAILED at 0 | |
144 | abort: patch failed to apply |
|
142 | abort: patch failed to apply | |
145 | [255] |
|
143 | [255] | |
146 | $ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff |
|
144 | $ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff | |
147 | applying ../test.diff |
|
145 | applying ../test.diff | |
148 | $ shortlog |
|
146 | $ shortlog | |
149 | o 3:c606edafba99 test 0 0 - default - test patch.eol |
|
147 | o 3:c606edafba99 test 0 0 - default - test patch.eol | |
150 | | |
|
148 | | | |
151 | @ 2:872023de769d test 0 0 - default - makeacrlf |
|
149 | @ 2:872023de769d test 0 0 - default - makeacrlf | |
152 | | |
|
150 | | | |
153 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
151 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
154 | |/ |
|
152 | |/ | |
155 | o 0:07f494440405 test 0 0 - default - adda |
|
153 | o 0:07f494440405 test 0 0 - default - adda | |
156 |
|
154 | |||
157 |
|
155 | |||
158 | Test applying multiple patches |
|
156 | Test applying multiple patches | |
159 |
|
157 | |||
160 | $ hg up -qC 0 |
|
158 | $ hg up -qC 0 | |
161 | $ echo e > e |
|
159 | $ echo e > e | |
162 | $ hg ci -Am adde |
|
160 | $ hg ci -Am adde | |
163 | adding e |
|
161 | adding e | |
164 | created new head |
|
162 | created new head | |
165 | $ hg export . > ../patch1.diff |
|
163 | $ hg export . > ../patch1.diff | |
166 | $ hg up -qC 1 |
|
164 | $ hg up -qC 1 | |
167 | $ echo f > f |
|
165 | $ echo f > f | |
168 | $ hg ci -Am addf |
|
166 | $ hg ci -Am addf | |
169 | adding f |
|
167 | adding f | |
170 | $ hg export . > ../patch2.diff |
|
168 | $ hg export . > ../patch2.diff | |
171 | $ cd .. |
|
169 | $ cd .. | |
172 | $ hg clone -r1 repo-options repo-multi1 |
|
170 | $ hg clone -r1 repo-options repo-multi1 | |
173 | adding changesets |
|
171 | adding changesets | |
174 | adding manifests |
|
172 | adding manifests | |
175 | adding file changes |
|
173 | adding file changes | |
176 | added 2 changesets with 2 changes to 1 files |
|
174 | added 2 changesets with 2 changes to 1 files | |
177 | updating to branch foo |
|
175 | updating to branch foo | |
178 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
179 | $ cd repo-multi1 |
|
177 | $ cd repo-multi1 | |
180 | $ hg up 0 |
|
178 | $ hg up 0 | |
181 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
182 | $ hg import --bypass ../patch1.diff ../patch2.diff |
|
180 | $ hg import --bypass ../patch1.diff ../patch2.diff | |
183 | applying ../patch1.diff |
|
181 | applying ../patch1.diff | |
184 | applying ../patch2.diff |
|
182 | applying ../patch2.diff | |
185 | $ shortlog |
|
183 | $ shortlog | |
186 | o 3:bc8ca3f8a7c4 test 0 0 - default - addf |
|
184 | o 3:bc8ca3f8a7c4 test 0 0 - default - addf | |
187 | | |
|
185 | | | |
188 | o 2:16581080145e test 0 0 - default - adde |
|
186 | o 2:16581080145e test 0 0 - default - adde | |
189 | | |
|
187 | | | |
190 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
188 | | o 1:4e322f7ce8e3 test 0 0 - foo - changea | |
191 | |/ |
|
189 | |/ | |
192 | @ 0:07f494440405 test 0 0 - default - adda |
|
190 | @ 0:07f494440405 test 0 0 - default - adda | |
193 |
|
191 | |||
194 |
|
192 | |||
195 | Test applying multiple patches with --exact |
|
193 | Test applying multiple patches with --exact | |
196 |
|
194 | |||
197 | $ cd .. |
|
195 | $ cd .. | |
198 | $ hg clone -r1 repo-options repo-multi2 |
|
196 | $ hg clone -r1 repo-options repo-multi2 | |
199 | adding changesets |
|
197 | adding changesets | |
200 | adding manifests |
|
198 | adding manifests | |
201 | adding file changes |
|
199 | adding file changes | |
202 | added 2 changesets with 2 changes to 1 files |
|
200 | added 2 changesets with 2 changes to 1 files | |
203 | updating to branch foo |
|
201 | updating to branch foo | |
204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
202 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
205 | $ cd repo-multi2 |
|
203 | $ cd repo-multi2 | |
206 | $ hg import --bypass --exact ../patch1.diff ../patch2.diff |
|
204 | $ hg import --bypass --exact ../patch1.diff ../patch2.diff | |
207 | applying ../patch1.diff |
|
205 | applying ../patch1.diff | |
208 | applying ../patch2.diff |
|
206 | applying ../patch2.diff | |
209 | $ shortlog |
|
207 | $ shortlog | |
210 | o 3:d60cb8989666 test 0 0 - foo - addf |
|
208 | o 3:d60cb8989666 test 0 0 - foo - addf | |
211 | | |
|
209 | | | |
212 | | o 2:16581080145e test 0 0 - default - adde |
|
210 | | o 2:16581080145e test 0 0 - default - adde | |
213 | | | |
|
211 | | | | |
214 | @ | 1:4e322f7ce8e3 test 0 0 - foo - changea |
|
212 | @ | 1:4e322f7ce8e3 test 0 0 - foo - changea | |
215 | |/ |
|
213 | |/ | |
216 | o 0:07f494440405 test 0 0 - default - adda |
|
214 | o 0:07f494440405 test 0 0 - default - adda | |
217 |
|
215 | |||
218 |
|
216 | |||
219 | $ cd .. |
|
217 | $ cd .. | |
220 |
|
218 | |||
|
219 | #if symlink execbit | |||
|
220 | ||||
221 | Test complicated patch with --exact |
|
221 | Test complicated patch with --exact | |
222 |
|
222 | |||
223 | $ hg init repo-exact |
|
223 | $ hg init repo-exact | |
224 | $ cd repo-exact |
|
224 | $ cd repo-exact | |
225 | $ echo a > a |
|
225 | $ echo a > a | |
226 | $ echo c > c |
|
226 | $ echo c > c | |
227 | $ echo d > d |
|
227 | $ echo d > d | |
228 | $ echo e > e |
|
228 | $ echo e > e | |
229 | $ echo f > f |
|
229 | $ echo f > f | |
230 | $ chmod +x f |
|
230 | $ chmod +x f | |
231 | $ ln -s c linkc |
|
231 | $ ln -s c linkc | |
232 | $ hg ci -Am t |
|
232 | $ hg ci -Am t | |
233 | adding a |
|
233 | adding a | |
234 | adding c |
|
234 | adding c | |
235 | adding d |
|
235 | adding d | |
236 | adding e |
|
236 | adding e | |
237 | adding f |
|
237 | adding f | |
238 | adding linkc |
|
238 | adding linkc | |
239 | $ hg cp a aa1 |
|
239 | $ hg cp a aa1 | |
240 | $ echo b >> a |
|
240 | $ echo b >> a | |
241 | $ echo b > b |
|
241 | $ echo b > b | |
242 | $ hg add b |
|
242 | $ hg add b | |
243 | $ hg cp a aa2 |
|
243 | $ hg cp a aa2 | |
244 | $ echo aa >> aa2 |
|
244 | $ echo aa >> aa2 | |
245 | $ chmod +x e |
|
245 | $ chmod +x e | |
246 | $ chmod -x f |
|
246 | $ chmod -x f | |
247 | $ ln -s a linka |
|
247 | $ ln -s a linka | |
248 | $ hg rm d |
|
248 | $ hg rm d | |
249 | $ hg rm linkc |
|
249 | $ hg rm linkc | |
250 | $ hg mv c cc |
|
250 | $ hg mv c cc | |
251 | $ hg ci -m patch |
|
251 | $ hg ci -m patch | |
252 | $ hg export --git . > ../test.diff |
|
252 | $ hg export --git . > ../test.diff | |
253 | $ hg up -C null |
|
253 | $ hg up -C null | |
254 | 0 files updated, 0 files merged, 7 files removed, 0 files unresolved |
|
254 | 0 files updated, 0 files merged, 7 files removed, 0 files unresolved | |
255 | $ hg purge |
|
255 | $ hg purge | |
256 | $ hg st |
|
256 | $ hg st | |
257 | $ hg import --bypass --exact ../test.diff |
|
257 | $ hg import --bypass --exact ../test.diff | |
258 | applying ../test.diff |
|
258 | applying ../test.diff | |
259 |
|
259 | |||
260 | The patch should have matched the exported revision and generated no additional |
|
260 | The patch should have matched the exported revision and generated no additional | |
261 | data. If not, diff both heads to debug it. |
|
261 | data. If not, diff both heads to debug it. | |
262 |
|
262 | |||
263 | $ shortlog |
|
263 | $ shortlog | |
264 | o 1:2978fd5c8aa4 test 0 0 - default - patch |
|
264 | o 1:2978fd5c8aa4 test 0 0 - default - patch | |
265 | | |
|
265 | | | |
266 | o 0:a0e19e636a43 test 0 0 - default - t |
|
266 | o 0:a0e19e636a43 test 0 0 - default - t | |
267 |
|
267 | |||
|
268 | #endif |
@@ -1,1529 +1,1541 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
|||
2 |
|
||||
3 |
|
|
1 | $ checkundo() | |
4 | > { |
|
2 | > { | |
5 | > if [ -f .hg/store/undo ]; then |
|
3 | > if [ -f .hg/store/undo ]; then | |
6 | > echo ".hg/store/undo still exists after $1" |
|
4 | > echo ".hg/store/undo still exists after $1" | |
7 | > fi |
|
5 | > fi | |
8 | > } |
|
6 | > } | |
9 |
|
7 | |||
10 | $ echo "[extensions]" >> $HGRCPATH |
|
8 | $ echo "[extensions]" >> $HGRCPATH | |
11 | $ echo "mq=" >> $HGRCPATH |
|
9 | $ echo "mq=" >> $HGRCPATH | |
12 |
|
10 | |||
13 | $ echo "[mq]" >> $HGRCPATH |
|
11 | $ echo "[mq]" >> $HGRCPATH | |
14 | $ echo "plain=true" >> $HGRCPATH |
|
12 | $ echo "plain=true" >> $HGRCPATH | |
15 |
|
13 | |||
16 |
|
14 | |||
17 | help |
|
15 | help | |
18 |
|
16 | |||
19 | $ hg help mq |
|
17 | $ hg help mq | |
20 | mq extension - manage a stack of patches |
|
18 | mq extension - manage a stack of patches | |
21 |
|
19 | |||
22 | This extension lets you work with a stack of patches in a Mercurial |
|
20 | This extension lets you work with a stack of patches in a Mercurial | |
23 | repository. It manages two stacks of patches - all known patches, and applied |
|
21 | repository. It manages two stacks of patches - all known patches, and applied | |
24 | patches (subset of known patches). |
|
22 | patches (subset of known patches). | |
25 |
|
23 | |||
26 | Known patches are represented as patch files in the .hg/patches directory. |
|
24 | Known patches are represented as patch files in the .hg/patches directory. | |
27 | Applied patches are both patch files and changesets. |
|
25 | Applied patches are both patch files and changesets. | |
28 |
|
26 | |||
29 | Common tasks (use "hg help command" for more details): |
|
27 | Common tasks (use "hg help command" for more details): | |
30 |
|
28 | |||
31 | create new patch qnew |
|
29 | create new patch qnew | |
32 | import existing patch qimport |
|
30 | import existing patch qimport | |
33 |
|
31 | |||
34 | print patch series qseries |
|
32 | print patch series qseries | |
35 | print applied patches qapplied |
|
33 | print applied patches qapplied | |
36 |
|
34 | |||
37 | add known patch to applied stack qpush |
|
35 | add known patch to applied stack qpush | |
38 | remove patch from applied stack qpop |
|
36 | remove patch from applied stack qpop | |
39 | refresh contents of top applied patch qrefresh |
|
37 | refresh contents of top applied patch qrefresh | |
40 |
|
38 | |||
41 | By default, mq will automatically use git patches when required to avoid |
|
39 | By default, mq will automatically use git patches when required to avoid | |
42 | losing file mode changes, copy records, binary files or empty files creations |
|
40 | losing file mode changes, copy records, binary files or empty files creations | |
43 | or deletions. This behaviour can be configured with: |
|
41 | or deletions. This behaviour can be configured with: | |
44 |
|
42 | |||
45 | [mq] |
|
43 | [mq] | |
46 | git = auto/keep/yes/no |
|
44 | git = auto/keep/yes/no | |
47 |
|
45 | |||
48 | If set to 'keep', mq will obey the [diff] section configuration while |
|
46 | If set to 'keep', mq will obey the [diff] section configuration while | |
49 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
47 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq | |
50 | will override the [diff] section and always generate git or regular patches, |
|
48 | will override the [diff] section and always generate git or regular patches, | |
51 | possibly losing data in the second case. |
|
49 | possibly losing data in the second case. | |
52 |
|
50 | |||
53 | It may be desirable for mq changesets to be kept in the secret phase (see "hg |
|
51 | It may be desirable for mq changesets to be kept in the secret phase (see "hg | |
54 | help phases"), which can be enabled with the following setting: |
|
52 | help phases"), which can be enabled with the following setting: | |
55 |
|
53 | |||
56 | [mq] |
|
54 | [mq] | |
57 | secret = True |
|
55 | secret = True | |
58 |
|
56 | |||
59 | You will by default be managing a patch queue named "patches". You can create |
|
57 | You will by default be managing a patch queue named "patches". You can create | |
60 | other, independent patch queues with the "hg qqueue" command. |
|
58 | other, independent patch queues with the "hg qqueue" command. | |
61 |
|
59 | |||
62 | If the working directory contains uncommitted files, qpush, qpop and qgoto |
|
60 | If the working directory contains uncommitted files, qpush, qpop and qgoto | |
63 | abort immediately. If -f/--force is used, the changes are discarded. Setting: |
|
61 | abort immediately. If -f/--force is used, the changes are discarded. Setting: | |
64 |
|
62 | |||
65 | [mq] |
|
63 | [mq] | |
66 | keepchanges = True |
|
64 | keepchanges = True | |
67 |
|
65 | |||
68 | make them behave as if --keep-changes were passed, and non-conflicting local |
|
66 | make them behave as if --keep-changes were passed, and non-conflicting local | |
69 | changes will be tolerated and preserved. If incompatible options such as |
|
67 | changes will be tolerated and preserved. If incompatible options such as | |
70 | -f/--force or --exact are passed, this setting is ignored. |
|
68 | -f/--force or --exact are passed, this setting is ignored. | |
71 |
|
69 | |||
72 | list of commands: |
|
70 | list of commands: | |
73 |
|
71 | |||
74 | qapplied print the patches already applied |
|
72 | qapplied print the patches already applied | |
75 | qclone clone main and patch repository at same time |
|
73 | qclone clone main and patch repository at same time | |
76 | qdelete remove patches from queue |
|
74 | qdelete remove patches from queue | |
77 | qdiff diff of the current patch and subsequent modifications |
|
75 | qdiff diff of the current patch and subsequent modifications | |
78 | qfinish move applied patches into repository history |
|
76 | qfinish move applied patches into repository history | |
79 | qfold fold the named patches into the current patch |
|
77 | qfold fold the named patches into the current patch | |
80 | qgoto push or pop patches until named patch is at top of stack |
|
78 | qgoto push or pop patches until named patch is at top of stack | |
81 | qguard set or print guards for a patch |
|
79 | qguard set or print guards for a patch | |
82 | qheader print the header of the topmost or specified patch |
|
80 | qheader print the header of the topmost or specified patch | |
83 | qimport import a patch or existing changeset |
|
81 | qimport import a patch or existing changeset | |
84 | qnew create a new patch |
|
82 | qnew create a new patch | |
85 | qnext print the name of the next pushable patch |
|
83 | qnext print the name of the next pushable patch | |
86 | qpop pop the current patch off the stack |
|
84 | qpop pop the current patch off the stack | |
87 | qprev print the name of the preceding applied patch |
|
85 | qprev print the name of the preceding applied patch | |
88 | qpush push the next patch onto the stack |
|
86 | qpush push the next patch onto the stack | |
89 | qqueue manage multiple patch queues |
|
87 | qqueue manage multiple patch queues | |
90 | qrefresh update the current patch |
|
88 | qrefresh update the current patch | |
91 | qrename rename a patch |
|
89 | qrename rename a patch | |
92 | qselect set or print guarded patches to push |
|
90 | qselect set or print guarded patches to push | |
93 | qseries print the entire series file |
|
91 | qseries print the entire series file | |
94 | qtop print the name of the current patch |
|
92 | qtop print the name of the current patch | |
95 | qunapplied print the patches not yet applied |
|
93 | qunapplied print the patches not yet applied | |
96 | strip strip changesets and all their descendants from the repository |
|
94 | strip strip changesets and all their descendants from the repository | |
97 |
|
95 | |||
98 | use "hg -v help mq" to show builtin aliases and global options |
|
96 | use "hg -v help mq" to show builtin aliases and global options | |
99 |
|
97 | |||
100 | $ hg init a |
|
98 | $ hg init a | |
101 | $ cd a |
|
99 | $ cd a | |
102 | $ echo a > a |
|
100 | $ echo a > a | |
103 | $ hg ci -Ama |
|
101 | $ hg ci -Ama | |
104 | adding a |
|
102 | adding a | |
105 |
|
103 | |||
106 | $ hg clone . ../k |
|
104 | $ hg clone . ../k | |
107 | updating to branch default |
|
105 | updating to branch default | |
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 |
|
107 | |||
110 | $ mkdir b |
|
108 | $ mkdir b | |
111 | $ echo z > b/z |
|
109 | $ echo z > b/z | |
112 | $ hg ci -Ama |
|
110 | $ hg ci -Ama | |
113 | adding b/z |
|
111 | adding b/z | |
114 |
|
112 | |||
115 |
|
113 | |||
116 | qinit |
|
114 | qinit | |
117 |
|
115 | |||
118 | $ hg qinit |
|
116 | $ hg qinit | |
119 |
|
117 | |||
120 | $ cd .. |
|
118 | $ cd .. | |
121 | $ hg init b |
|
119 | $ hg init b | |
122 |
|
120 | |||
123 |
|
121 | |||
124 | -R qinit |
|
122 | -R qinit | |
125 |
|
123 | |||
126 | $ hg -R b qinit |
|
124 | $ hg -R b qinit | |
127 |
|
125 | |||
128 | $ hg init c |
|
126 | $ hg init c | |
129 |
|
127 | |||
130 |
|
128 | |||
131 | qinit -c |
|
129 | qinit -c | |
132 |
|
130 | |||
133 | $ hg --cwd c qinit -c |
|
131 | $ hg --cwd c qinit -c | |
134 | $ hg -R c/.hg/patches st |
|
132 | $ hg -R c/.hg/patches st | |
135 | A .hgignore |
|
133 | A .hgignore | |
136 | A series |
|
134 | A series | |
137 |
|
135 | |||
138 |
|
136 | |||
139 | qinit; qinit -c |
|
137 | qinit; qinit -c | |
140 |
|
138 | |||
141 | $ hg init d |
|
139 | $ hg init d | |
142 | $ cd d |
|
140 | $ cd d | |
143 | $ hg qinit |
|
141 | $ hg qinit | |
144 | $ hg qinit -c |
|
142 | $ hg qinit -c | |
145 |
|
143 | |||
146 | qinit -c should create both files if they don't exist |
|
144 | qinit -c should create both files if they don't exist | |
147 |
|
145 | |||
148 | $ cat .hg/patches/.hgignore |
|
146 | $ cat .hg/patches/.hgignore | |
149 | ^\.hg |
|
147 | ^\.hg | |
150 | ^\.mq |
|
148 | ^\.mq | |
151 | syntax: glob |
|
149 | syntax: glob | |
152 | status |
|
150 | status | |
153 | guards |
|
151 | guards | |
154 | $ cat .hg/patches/series |
|
152 | $ cat .hg/patches/series | |
155 | $ hg qinit -c |
|
153 | $ hg qinit -c | |
156 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) |
|
154 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) | |
157 | [255] |
|
155 | [255] | |
158 | $ cd .. |
|
156 | $ cd .. | |
159 |
|
157 | |||
160 | $ echo '% qinit; <stuff>; qinit -c' |
|
158 | $ echo '% qinit; <stuff>; qinit -c' | |
161 | % qinit; <stuff>; qinit -c |
|
159 | % qinit; <stuff>; qinit -c | |
162 | $ hg init e |
|
160 | $ hg init e | |
163 | $ cd e |
|
161 | $ cd e | |
164 | $ hg qnew A |
|
162 | $ hg qnew A | |
165 | $ checkundo qnew |
|
163 | $ checkundo qnew | |
166 | $ echo foo > foo |
|
164 | $ echo foo > foo | |
167 | $ hg phase -r qbase |
|
165 | $ hg phase -r qbase | |
168 | 0: draft |
|
166 | 0: draft | |
169 | $ hg add foo |
|
167 | $ hg add foo | |
170 | $ hg qrefresh |
|
168 | $ hg qrefresh | |
171 | $ hg phase -r qbase |
|
169 | $ hg phase -r qbase | |
172 | 0: draft |
|
170 | 0: draft | |
173 | $ hg qnew B |
|
171 | $ hg qnew B | |
174 | $ echo >> foo |
|
172 | $ echo >> foo | |
175 | $ hg qrefresh |
|
173 | $ hg qrefresh | |
176 | $ echo status >> .hg/patches/.hgignore |
|
174 | $ echo status >> .hg/patches/.hgignore | |
177 | $ echo bleh >> .hg/patches/.hgignore |
|
175 | $ echo bleh >> .hg/patches/.hgignore | |
178 | $ hg qinit -c |
|
176 | $ hg qinit -c | |
179 | adding .hg/patches/A (glob) |
|
177 | adding .hg/patches/A (glob) | |
180 | adding .hg/patches/B (glob) |
|
178 | adding .hg/patches/B (glob) | |
181 | $ hg -R .hg/patches status |
|
179 | $ hg -R .hg/patches status | |
182 | A .hgignore |
|
180 | A .hgignore | |
183 | A A |
|
181 | A A | |
184 | A B |
|
182 | A B | |
185 | A series |
|
183 | A series | |
186 |
|
184 | |||
187 | qinit -c shouldn't touch these files if they already exist |
|
185 | qinit -c shouldn't touch these files if they already exist | |
188 |
|
186 | |||
189 | $ cat .hg/patches/.hgignore |
|
187 | $ cat .hg/patches/.hgignore | |
190 | status |
|
188 | status | |
191 | bleh |
|
189 | bleh | |
192 | $ cat .hg/patches/series |
|
190 | $ cat .hg/patches/series | |
193 | A |
|
191 | A | |
194 | B |
|
192 | B | |
195 |
|
193 | |||
196 | add an untracked file |
|
194 | add an untracked file | |
197 |
|
195 | |||
198 | $ echo >> .hg/patches/flaf |
|
196 | $ echo >> .hg/patches/flaf | |
199 |
|
197 | |||
200 | status --mq with color (issue2096) |
|
198 | status --mq with color (issue2096) | |
201 |
|
199 | |||
202 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always |
|
200 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always | |
203 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) |
|
201 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) | |
204 | \x1b[0;32;1mA A\x1b[0m (esc) |
|
202 | \x1b[0;32;1mA A\x1b[0m (esc) | |
205 | \x1b[0;32;1mA B\x1b[0m (esc) |
|
203 | \x1b[0;32;1mA B\x1b[0m (esc) | |
206 | \x1b[0;32;1mA series\x1b[0m (esc) |
|
204 | \x1b[0;32;1mA series\x1b[0m (esc) | |
207 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) |
|
205 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) | |
208 |
|
206 | |||
209 | try the --mq option on a command provided by an extension |
|
207 | try the --mq option on a command provided by an extension | |
210 |
|
208 | |||
211 | $ hg purge --mq --verbose --config extensions.purge= |
|
209 | $ hg purge --mq --verbose --config extensions.purge= | |
212 | Removing file flaf |
|
210 | Removing file flaf | |
213 |
|
211 | |||
214 | $ cd .. |
|
212 | $ cd .. | |
215 |
|
213 | |||
216 | init --mq without repo |
|
214 | init --mq without repo | |
217 |
|
215 | |||
218 | $ mkdir f |
|
216 | $ mkdir f | |
219 | $ cd f |
|
217 | $ cd f | |
220 | $ hg init --mq |
|
218 | $ hg init --mq | |
221 | abort: there is no Mercurial repository here (.hg not found) |
|
219 | abort: there is no Mercurial repository here (.hg not found) | |
222 | [255] |
|
220 | [255] | |
223 | $ cd .. |
|
221 | $ cd .. | |
224 |
|
222 | |||
225 | init --mq with repo path |
|
223 | init --mq with repo path | |
226 |
|
224 | |||
227 | $ hg init g |
|
225 | $ hg init g | |
228 | $ hg init --mq g |
|
226 | $ hg init --mq g | |
229 | $ test -d g/.hg/patches/.hg |
|
227 | $ test -d g/.hg/patches/.hg | |
230 |
|
228 | |||
231 | init --mq with nonexistent directory |
|
229 | init --mq with nonexistent directory | |
232 |
|
230 | |||
233 | $ hg init --mq nonexistentdir |
|
231 | $ hg init --mq nonexistentdir | |
234 | abort: repository nonexistentdir not found! |
|
232 | abort: repository nonexistentdir not found! | |
235 | [255] |
|
233 | [255] | |
236 |
|
234 | |||
237 |
|
235 | |||
238 | init --mq with bundle (non "local") |
|
236 | init --mq with bundle (non "local") | |
239 |
|
237 | |||
240 | $ hg -R a bundle --all a.bundle >/dev/null |
|
238 | $ hg -R a bundle --all a.bundle >/dev/null | |
241 | $ hg init --mq a.bundle |
|
239 | $ hg init --mq a.bundle | |
242 | abort: only a local queue repository may be initialized |
|
240 | abort: only a local queue repository may be initialized | |
243 | [255] |
|
241 | [255] | |
244 |
|
242 | |||
245 | $ cd a |
|
243 | $ cd a | |
246 |
|
244 | |||
247 | $ hg qnew -m 'foo bar' test.patch |
|
245 | $ hg qnew -m 'foo bar' test.patch | |
248 |
|
246 | |||
249 | $ echo '# comment' > .hg/patches/series.tmp |
|
247 | $ echo '# comment' > .hg/patches/series.tmp | |
250 | $ echo >> .hg/patches/series.tmp # empty line |
|
248 | $ echo >> .hg/patches/series.tmp # empty line | |
251 | $ cat .hg/patches/series >> .hg/patches/series.tmp |
|
249 | $ cat .hg/patches/series >> .hg/patches/series.tmp | |
252 | $ mv .hg/patches/series.tmp .hg/patches/series |
|
250 | $ mv .hg/patches/series.tmp .hg/patches/series | |
253 |
|
251 | |||
254 |
|
252 | |||
255 | qrefresh |
|
253 | qrefresh | |
256 |
|
254 | |||
257 | $ echo a >> a |
|
255 | $ echo a >> a | |
258 | $ hg qrefresh |
|
256 | $ hg qrefresh | |
259 | $ cat .hg/patches/test.patch |
|
257 | $ cat .hg/patches/test.patch | |
260 | foo bar |
|
258 | foo bar | |
261 |
|
259 | |||
262 | diff -r [a-f0-9]* a (re) |
|
260 | diff -r [a-f0-9]* a (re) | |
263 | --- a/a\t(?P<date>.*) (re) |
|
261 | --- a/a\t(?P<date>.*) (re) | |
264 | \+\+\+ b/a\t(?P<date2>.*) (re) |
|
262 | \+\+\+ b/a\t(?P<date2>.*) (re) | |
265 | @@ -1,1 +1,2 @@ |
|
263 | @@ -1,1 +1,2 @@ | |
266 | a |
|
264 | a | |
267 | +a |
|
265 | +a | |
268 |
|
266 | |||
269 | empty qrefresh |
|
267 | empty qrefresh | |
270 |
|
268 | |||
271 | $ hg qrefresh -X a |
|
269 | $ hg qrefresh -X a | |
272 |
|
270 | |||
273 | revision: |
|
271 | revision: | |
274 |
|
272 | |||
275 | $ hg diff -r -2 -r -1 |
|
273 | $ hg diff -r -2 -r -1 | |
276 |
|
274 | |||
277 | patch: |
|
275 | patch: | |
278 |
|
276 | |||
279 | $ cat .hg/patches/test.patch |
|
277 | $ cat .hg/patches/test.patch | |
280 | foo bar |
|
278 | foo bar | |
281 |
|
279 | |||
282 |
|
280 | |||
283 | working dir diff: |
|
281 | working dir diff: | |
284 |
|
282 | |||
285 | $ hg diff --nodates -q |
|
283 | $ hg diff --nodates -q | |
286 | --- a/a |
|
284 | --- a/a | |
287 | +++ b/a |
|
285 | +++ b/a | |
288 | @@ -1,1 +1,2 @@ |
|
286 | @@ -1,1 +1,2 @@ | |
289 | a |
|
287 | a | |
290 | +a |
|
288 | +a | |
291 |
|
289 | |||
292 | restore things |
|
290 | restore things | |
293 |
|
291 | |||
294 | $ hg qrefresh |
|
292 | $ hg qrefresh | |
295 | $ checkundo qrefresh |
|
293 | $ checkundo qrefresh | |
296 |
|
294 | |||
297 |
|
295 | |||
298 | qpop |
|
296 | qpop | |
299 |
|
297 | |||
300 | $ hg qpop |
|
298 | $ hg qpop | |
301 | popping test.patch |
|
299 | popping test.patch | |
302 | patch queue now empty |
|
300 | patch queue now empty | |
303 | $ checkundo qpop |
|
301 | $ checkundo qpop | |
304 |
|
302 | |||
305 |
|
303 | |||
306 | qpush with dump of tag cache |
|
304 | qpush with dump of tag cache | |
307 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
305 | Dump the tag cache to ensure that it has exactly one head after qpush. | |
308 |
|
306 | |||
309 | $ rm -f .hg/cache/tags |
|
307 | $ rm -f .hg/cache/tags | |
310 | $ hg tags > /dev/null |
|
308 | $ hg tags > /dev/null | |
311 |
|
309 | |||
312 | .hg/cache/tags (pre qpush): |
|
310 | .hg/cache/tags (pre qpush): | |
313 |
|
311 | |||
314 | $ cat .hg/cache/tags |
|
312 | $ cat .hg/cache/tags | |
315 | 1 [\da-f]{40} (re) |
|
313 | 1 [\da-f]{40} (re) | |
316 |
|
314 | |||
317 | $ hg qpush |
|
315 | $ hg qpush | |
318 | applying test.patch |
|
316 | applying test.patch | |
319 | now at: test.patch |
|
317 | now at: test.patch | |
320 | $ hg phase -r qbase |
|
318 | $ hg phase -r qbase | |
321 | 2: draft |
|
319 | 2: draft | |
322 | $ hg tags > /dev/null |
|
320 | $ hg tags > /dev/null | |
323 |
|
321 | |||
324 | .hg/cache/tags (post qpush): |
|
322 | .hg/cache/tags (post qpush): | |
325 |
|
323 | |||
326 | $ cat .hg/cache/tags |
|
324 | $ cat .hg/cache/tags | |
327 | 2 [\da-f]{40} (re) |
|
325 | 2 [\da-f]{40} (re) | |
328 |
|
326 | |||
329 | $ checkundo qpush |
|
327 | $ checkundo qpush | |
330 | $ cd .. |
|
328 | $ cd .. | |
331 |
|
329 | |||
332 |
|
330 | |||
333 | pop/push outside repo |
|
331 | pop/push outside repo | |
334 | $ hg -R a qpop |
|
332 | $ hg -R a qpop | |
335 | popping test.patch |
|
333 | popping test.patch | |
336 | patch queue now empty |
|
334 | patch queue now empty | |
337 | $ hg -R a qpush |
|
335 | $ hg -R a qpush | |
338 | applying test.patch |
|
336 | applying test.patch | |
339 | now at: test.patch |
|
337 | now at: test.patch | |
340 |
|
338 | |||
341 | $ cd a |
|
339 | $ cd a | |
342 | $ hg qnew test2.patch |
|
340 | $ hg qnew test2.patch | |
343 |
|
341 | |||
344 | qrefresh in subdir |
|
342 | qrefresh in subdir | |
345 |
|
343 | |||
346 | $ cd b |
|
344 | $ cd b | |
347 | $ echo a > a |
|
345 | $ echo a > a | |
348 | $ hg add a |
|
346 | $ hg add a | |
349 | $ hg qrefresh |
|
347 | $ hg qrefresh | |
350 |
|
348 | |||
351 | pop/push -a in subdir |
|
349 | pop/push -a in subdir | |
352 |
|
350 | |||
353 | $ hg qpop -a |
|
351 | $ hg qpop -a | |
354 | popping test2.patch |
|
352 | popping test2.patch | |
355 | popping test.patch |
|
353 | popping test.patch | |
356 | patch queue now empty |
|
354 | patch queue now empty | |
357 | $ hg --traceback qpush -a |
|
355 | $ hg --traceback qpush -a | |
358 | applying test.patch |
|
356 | applying test.patch | |
359 | applying test2.patch |
|
357 | applying test2.patch | |
360 | now at: test2.patch |
|
358 | now at: test2.patch | |
361 |
|
359 | |||
362 |
|
360 | |||
363 | setting columns & formatted tests truncating (issue1912) |
|
361 | setting columns & formatted tests truncating (issue1912) | |
364 |
|
362 | |||
365 | $ COLUMNS=4 hg qseries --config ui.formatted=true |
|
363 | $ COLUMNS=4 hg qseries --config ui.formatted=true | |
366 | test.patch |
|
364 | test.patch | |
367 | test2.patch |
|
365 | test2.patch | |
368 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs |
|
366 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs | |
369 | 0 A test.patch: f... |
|
367 | 0 A test.patch: f... | |
370 | 1 A test2.patch: |
|
368 | 1 A test2.patch: | |
371 | $ hg qpop |
|
369 | $ hg qpop | |
372 | popping test2.patch |
|
370 | popping test2.patch | |
373 | now at: test.patch |
|
371 | now at: test.patch | |
374 | $ hg qseries -vs |
|
372 | $ hg qseries -vs | |
375 | 0 A test.patch: foo bar |
|
373 | 0 A test.patch: foo bar | |
376 | 1 U test2.patch: |
|
374 | 1 U test2.patch: | |
377 | $ hg sum | grep mq |
|
375 | $ hg sum | grep mq | |
378 | mq: 1 applied, 1 unapplied |
|
376 | mq: 1 applied, 1 unapplied | |
379 | $ hg qpush |
|
377 | $ hg qpush | |
380 | applying test2.patch |
|
378 | applying test2.patch | |
381 | now at: test2.patch |
|
379 | now at: test2.patch | |
382 | $ hg sum | grep mq |
|
380 | $ hg sum | grep mq | |
383 | mq: 2 applied |
|
381 | mq: 2 applied | |
384 | $ hg qapplied |
|
382 | $ hg qapplied | |
385 | test.patch |
|
383 | test.patch | |
386 | test2.patch |
|
384 | test2.patch | |
387 | $ hg qtop |
|
385 | $ hg qtop | |
388 | test2.patch |
|
386 | test2.patch | |
389 |
|
387 | |||
390 |
|
388 | |||
391 | prev |
|
389 | prev | |
392 |
|
390 | |||
393 | $ hg qapp -1 |
|
391 | $ hg qapp -1 | |
394 | test.patch |
|
392 | test.patch | |
395 |
|
393 | |||
396 | next |
|
394 | next | |
397 |
|
395 | |||
398 | $ hg qunapp -1 |
|
396 | $ hg qunapp -1 | |
399 | all patches applied |
|
397 | all patches applied | |
400 | [1] |
|
398 | [1] | |
401 |
|
399 | |||
402 | $ hg qpop |
|
400 | $ hg qpop | |
403 | popping test2.patch |
|
401 | popping test2.patch | |
404 | now at: test.patch |
|
402 | now at: test.patch | |
405 |
|
403 | |||
406 | commit should fail |
|
404 | commit should fail | |
407 |
|
405 | |||
408 | $ hg commit |
|
406 | $ hg commit | |
409 | abort: cannot commit over an applied mq patch |
|
407 | abort: cannot commit over an applied mq patch | |
410 | [255] |
|
408 | [255] | |
411 |
|
409 | |||
412 | push should fail if draft |
|
410 | push should fail if draft | |
413 |
|
411 | |||
414 | $ hg push ../../k |
|
412 | $ hg push ../../k | |
415 | pushing to ../../k |
|
413 | pushing to ../../k | |
416 | abort: source has mq patches applied |
|
414 | abort: source has mq patches applied | |
417 | [255] |
|
415 | [255] | |
418 |
|
416 | |||
419 |
|
417 | |||
420 | import should fail |
|
418 | import should fail | |
421 |
|
419 | |||
422 | $ hg st . |
|
420 | $ hg st . | |
423 | $ echo foo >> ../a |
|
421 | $ echo foo >> ../a | |
424 | $ hg diff > ../../import.diff |
|
422 | $ hg diff > ../../import.diff | |
425 | $ hg revert --no-backup ../a |
|
423 | $ hg revert --no-backup ../a | |
426 | $ hg import ../../import.diff |
|
424 | $ hg import ../../import.diff | |
427 | abort: cannot import over an applied patch |
|
425 | abort: cannot import over an applied patch | |
428 | [255] |
|
426 | [255] | |
429 | $ hg st |
|
427 | $ hg st | |
430 |
|
428 | |||
431 | import --no-commit should succeed |
|
429 | import --no-commit should succeed | |
432 |
|
430 | |||
433 | $ hg import --no-commit ../../import.diff |
|
431 | $ hg import --no-commit ../../import.diff | |
434 | applying ../../import.diff |
|
432 | applying ../../import.diff | |
435 | $ hg st |
|
433 | $ hg st | |
436 | M a |
|
434 | M a | |
437 | $ hg revert --no-backup ../a |
|
435 | $ hg revert --no-backup ../a | |
438 |
|
436 | |||
439 |
|
437 | |||
440 | qunapplied |
|
438 | qunapplied | |
441 |
|
439 | |||
442 | $ hg qunapplied |
|
440 | $ hg qunapplied | |
443 | test2.patch |
|
441 | test2.patch | |
444 |
|
442 | |||
445 |
|
443 | |||
446 | qpush/qpop with index |
|
444 | qpush/qpop with index | |
447 |
|
445 | |||
448 | $ hg qnew test1b.patch |
|
446 | $ hg qnew test1b.patch | |
449 | $ echo 1b > 1b |
|
447 | $ echo 1b > 1b | |
450 | $ hg add 1b |
|
448 | $ hg add 1b | |
451 | $ hg qrefresh |
|
449 | $ hg qrefresh | |
452 | $ hg qpush 2 |
|
450 | $ hg qpush 2 | |
453 | applying test2.patch |
|
451 | applying test2.patch | |
454 | now at: test2.patch |
|
452 | now at: test2.patch | |
455 | $ hg qpop 0 |
|
453 | $ hg qpop 0 | |
456 | popping test2.patch |
|
454 | popping test2.patch | |
457 | popping test1b.patch |
|
455 | popping test1b.patch | |
458 | now at: test.patch |
|
456 | now at: test.patch | |
459 | $ hg qpush test.patch+1 |
|
457 | $ hg qpush test.patch+1 | |
460 | applying test1b.patch |
|
458 | applying test1b.patch | |
461 | now at: test1b.patch |
|
459 | now at: test1b.patch | |
462 | $ hg qpush test.patch+2 |
|
460 | $ hg qpush test.patch+2 | |
463 | applying test2.patch |
|
461 | applying test2.patch | |
464 | now at: test2.patch |
|
462 | now at: test2.patch | |
465 | $ hg qpop test2.patch-1 |
|
463 | $ hg qpop test2.patch-1 | |
466 | popping test2.patch |
|
464 | popping test2.patch | |
467 | now at: test1b.patch |
|
465 | now at: test1b.patch | |
468 | $ hg qpop test2.patch-2 |
|
466 | $ hg qpop test2.patch-2 | |
469 | popping test1b.patch |
|
467 | popping test1b.patch | |
470 | now at: test.patch |
|
468 | now at: test.patch | |
471 | $ hg qpush test1b.patch+1 |
|
469 | $ hg qpush test1b.patch+1 | |
472 | applying test1b.patch |
|
470 | applying test1b.patch | |
473 | applying test2.patch |
|
471 | applying test2.patch | |
474 | now at: test2.patch |
|
472 | now at: test2.patch | |
475 |
|
473 | |||
476 |
|
474 | |||
477 | qpush --move |
|
475 | qpush --move | |
478 |
|
476 | |||
479 | $ hg qpop -a |
|
477 | $ hg qpop -a | |
480 | popping test2.patch |
|
478 | popping test2.patch | |
481 | popping test1b.patch |
|
479 | popping test1b.patch | |
482 | popping test.patch |
|
480 | popping test.patch | |
483 | patch queue now empty |
|
481 | patch queue now empty | |
484 | $ hg qguard test1b.patch -- -negguard |
|
482 | $ hg qguard test1b.patch -- -negguard | |
485 | $ hg qguard test2.patch -- +posguard |
|
483 | $ hg qguard test2.patch -- +posguard | |
486 | $ hg qpush --move test2.patch # can't move guarded patch |
|
484 | $ hg qpush --move test2.patch # can't move guarded patch | |
487 | cannot push 'test2.patch' - guarded by '+posguard' |
|
485 | cannot push 'test2.patch' - guarded by '+posguard' | |
488 | [1] |
|
486 | [1] | |
489 | $ hg qselect posguard |
|
487 | $ hg qselect posguard | |
490 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
488 | number of unguarded, unapplied patches has changed from 2 to 3 | |
491 | $ hg qpush --move test2.patch # move to front |
|
489 | $ hg qpush --move test2.patch # move to front | |
492 | applying test2.patch |
|
490 | applying test2.patch | |
493 | now at: test2.patch |
|
491 | now at: test2.patch | |
494 | $ hg qpush --move test1b.patch # negative guard unselected |
|
492 | $ hg qpush --move test1b.patch # negative guard unselected | |
495 | applying test1b.patch |
|
493 | applying test1b.patch | |
496 | now at: test1b.patch |
|
494 | now at: test1b.patch | |
497 | $ hg qpush --move test.patch # noop move |
|
495 | $ hg qpush --move test.patch # noop move | |
498 | applying test.patch |
|
496 | applying test.patch | |
499 | now at: test.patch |
|
497 | now at: test.patch | |
500 | $ hg qseries -v |
|
498 | $ hg qseries -v | |
501 | 0 A test2.patch |
|
499 | 0 A test2.patch | |
502 | 1 A test1b.patch |
|
500 | 1 A test1b.patch | |
503 | 2 A test.patch |
|
501 | 2 A test.patch | |
504 | $ hg qpop -a |
|
502 | $ hg qpop -a | |
505 | popping test.patch |
|
503 | popping test.patch | |
506 | popping test1b.patch |
|
504 | popping test1b.patch | |
507 | popping test2.patch |
|
505 | popping test2.patch | |
508 | patch queue now empty |
|
506 | patch queue now empty | |
509 |
|
507 | |||
510 | cleaning up |
|
508 | cleaning up | |
511 |
|
509 | |||
512 | $ hg qselect --none |
|
510 | $ hg qselect --none | |
513 | guards deactivated |
|
511 | guards deactivated | |
514 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
512 | number of unguarded, unapplied patches has changed from 3 to 2 | |
515 | $ hg qguard --none test1b.patch |
|
513 | $ hg qguard --none test1b.patch | |
516 | $ hg qguard --none test2.patch |
|
514 | $ hg qguard --none test2.patch | |
517 | $ hg qpush --move test.patch |
|
515 | $ hg qpush --move test.patch | |
518 | applying test.patch |
|
516 | applying test.patch | |
519 | now at: test.patch |
|
517 | now at: test.patch | |
520 | $ hg qpush --move test1b.patch |
|
518 | $ hg qpush --move test1b.patch | |
521 | applying test1b.patch |
|
519 | applying test1b.patch | |
522 | now at: test1b.patch |
|
520 | now at: test1b.patch | |
523 | $ hg qpush --move bogus # nonexistent patch |
|
521 | $ hg qpush --move bogus # nonexistent patch | |
524 | abort: patch bogus not in series |
|
522 | abort: patch bogus not in series | |
525 | [255] |
|
523 | [255] | |
526 | $ hg qpush --move # no patch |
|
524 | $ hg qpush --move # no patch | |
527 | abort: please specify the patch to move |
|
525 | abort: please specify the patch to move | |
528 | [255] |
|
526 | [255] | |
529 | $ hg qpush --move test.patch # already applied |
|
527 | $ hg qpush --move test.patch # already applied | |
530 | abort: cannot push to a previous patch: test.patch |
|
528 | abort: cannot push to a previous patch: test.patch | |
531 | [255] |
|
529 | [255] | |
532 | $ sed '2i\ |
|
530 | $ sed '2i\ | |
533 | > # make qtip index different in series and fullseries |
|
531 | > # make qtip index different in series and fullseries | |
534 | > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp |
|
532 | > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp | |
535 | $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series |
|
533 | $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series | |
536 | $ cat `hg root`/.hg/patches/series |
|
534 | $ cat `hg root`/.hg/patches/series | |
537 | # comment |
|
535 | # comment | |
538 | # make qtip index different in series and fullseries |
|
536 | # make qtip index different in series and fullseries | |
539 |
|
537 | |||
540 | test.patch |
|
538 | test.patch | |
541 | test1b.patch |
|
539 | test1b.patch | |
542 | test2.patch |
|
540 | test2.patch | |
543 | $ hg qpush --move test2.patch |
|
541 | $ hg qpush --move test2.patch | |
544 | applying test2.patch |
|
542 | applying test2.patch | |
545 | now at: test2.patch |
|
543 | now at: test2.patch | |
546 |
|
544 | |||
547 |
|
545 | |||
548 | series after move |
|
546 | series after move | |
549 |
|
547 | |||
550 | $ cat `hg root`/.hg/patches/series |
|
548 | $ cat `hg root`/.hg/patches/series | |
551 | # comment |
|
549 | # comment | |
552 | # make qtip index different in series and fullseries |
|
550 | # make qtip index different in series and fullseries | |
553 |
|
551 | |||
554 | test.patch |
|
552 | test.patch | |
555 | test1b.patch |
|
553 | test1b.patch | |
556 | test2.patch |
|
554 | test2.patch | |
557 |
|
555 | |||
558 |
|
556 | |||
559 | pop, qapplied, qunapplied |
|
557 | pop, qapplied, qunapplied | |
560 |
|
558 | |||
561 | $ hg qseries -v |
|
559 | $ hg qseries -v | |
562 | 0 A test.patch |
|
560 | 0 A test.patch | |
563 | 1 A test1b.patch |
|
561 | 1 A test1b.patch | |
564 | 2 A test2.patch |
|
562 | 2 A test2.patch | |
565 |
|
563 | |||
566 | qapplied -1 test.patch |
|
564 | qapplied -1 test.patch | |
567 |
|
565 | |||
568 | $ hg qapplied -1 test.patch |
|
566 | $ hg qapplied -1 test.patch | |
569 | only one patch applied |
|
567 | only one patch applied | |
570 | [1] |
|
568 | [1] | |
571 |
|
569 | |||
572 | qapplied -1 test1b.patch |
|
570 | qapplied -1 test1b.patch | |
573 |
|
571 | |||
574 | $ hg qapplied -1 test1b.patch |
|
572 | $ hg qapplied -1 test1b.patch | |
575 | test.patch |
|
573 | test.patch | |
576 |
|
574 | |||
577 | qapplied -1 test2.patch |
|
575 | qapplied -1 test2.patch | |
578 |
|
576 | |||
579 | $ hg qapplied -1 test2.patch |
|
577 | $ hg qapplied -1 test2.patch | |
580 | test1b.patch |
|
578 | test1b.patch | |
581 |
|
579 | |||
582 | qapplied -1 |
|
580 | qapplied -1 | |
583 |
|
581 | |||
584 | $ hg qapplied -1 |
|
582 | $ hg qapplied -1 | |
585 | test1b.patch |
|
583 | test1b.patch | |
586 |
|
584 | |||
587 | qapplied |
|
585 | qapplied | |
588 |
|
586 | |||
589 | $ hg qapplied |
|
587 | $ hg qapplied | |
590 | test.patch |
|
588 | test.patch | |
591 | test1b.patch |
|
589 | test1b.patch | |
592 | test2.patch |
|
590 | test2.patch | |
593 |
|
591 | |||
594 | qapplied test1b.patch |
|
592 | qapplied test1b.patch | |
595 |
|
593 | |||
596 | $ hg qapplied test1b.patch |
|
594 | $ hg qapplied test1b.patch | |
597 | test.patch |
|
595 | test.patch | |
598 | test1b.patch |
|
596 | test1b.patch | |
599 |
|
597 | |||
600 | qunapplied -1 |
|
598 | qunapplied -1 | |
601 |
|
599 | |||
602 | $ hg qunapplied -1 |
|
600 | $ hg qunapplied -1 | |
603 | all patches applied |
|
601 | all patches applied | |
604 | [1] |
|
602 | [1] | |
605 |
|
603 | |||
606 | qunapplied |
|
604 | qunapplied | |
607 |
|
605 | |||
608 | $ hg qunapplied |
|
606 | $ hg qunapplied | |
609 |
|
607 | |||
610 | popping |
|
608 | popping | |
611 |
|
609 | |||
612 | $ hg qpop |
|
610 | $ hg qpop | |
613 | popping test2.patch |
|
611 | popping test2.patch | |
614 | now at: test1b.patch |
|
612 | now at: test1b.patch | |
615 |
|
613 | |||
616 | qunapplied -1 |
|
614 | qunapplied -1 | |
617 |
|
615 | |||
618 | $ hg qunapplied -1 |
|
616 | $ hg qunapplied -1 | |
619 | test2.patch |
|
617 | test2.patch | |
620 |
|
618 | |||
621 | qunapplied |
|
619 | qunapplied | |
622 |
|
620 | |||
623 | $ hg qunapplied |
|
621 | $ hg qunapplied | |
624 | test2.patch |
|
622 | test2.patch | |
625 |
|
623 | |||
626 | qunapplied test2.patch |
|
624 | qunapplied test2.patch | |
627 |
|
625 | |||
628 | $ hg qunapplied test2.patch |
|
626 | $ hg qunapplied test2.patch | |
629 |
|
627 | |||
630 | qunapplied -1 test2.patch |
|
628 | qunapplied -1 test2.patch | |
631 |
|
629 | |||
632 | $ hg qunapplied -1 test2.patch |
|
630 | $ hg qunapplied -1 test2.patch | |
633 | all patches applied |
|
631 | all patches applied | |
634 | [1] |
|
632 | [1] | |
635 |
|
633 | |||
636 | popping -a |
|
634 | popping -a | |
637 |
|
635 | |||
638 | $ hg qpop -a |
|
636 | $ hg qpop -a | |
639 | popping test1b.patch |
|
637 | popping test1b.patch | |
640 | popping test.patch |
|
638 | popping test.patch | |
641 | patch queue now empty |
|
639 | patch queue now empty | |
642 |
|
640 | |||
643 | qapplied |
|
641 | qapplied | |
644 |
|
642 | |||
645 | $ hg qapplied |
|
643 | $ hg qapplied | |
646 |
|
644 | |||
647 | qapplied -1 |
|
645 | qapplied -1 | |
648 |
|
646 | |||
649 | $ hg qapplied -1 |
|
647 | $ hg qapplied -1 | |
650 | no patches applied |
|
648 | no patches applied | |
651 | [1] |
|
649 | [1] | |
652 | $ hg qpush |
|
650 | $ hg qpush | |
653 | applying test.patch |
|
651 | applying test.patch | |
654 | now at: test.patch |
|
652 | now at: test.patch | |
655 |
|
653 | |||
656 |
|
654 | |||
657 | push should succeed |
|
655 | push should succeed | |
658 |
|
656 | |||
659 | $ hg qpop -a |
|
657 | $ hg qpop -a | |
660 | popping test.patch |
|
658 | popping test.patch | |
661 | patch queue now empty |
|
659 | patch queue now empty | |
662 | $ hg push ../../k |
|
660 | $ hg push ../../k | |
663 | pushing to ../../k |
|
661 | pushing to ../../k | |
664 | searching for changes |
|
662 | searching for changes | |
665 | adding changesets |
|
663 | adding changesets | |
666 | adding manifests |
|
664 | adding manifests | |
667 | adding file changes |
|
665 | adding file changes | |
668 | added 1 changesets with 1 changes to 1 files |
|
666 | added 1 changesets with 1 changes to 1 files | |
669 |
|
667 | |||
670 |
|
668 | |||
671 | we want to start with some patches applied |
|
669 | we want to start with some patches applied | |
672 |
|
670 | |||
673 | $ hg qpush -a |
|
671 | $ hg qpush -a | |
674 | applying test.patch |
|
672 | applying test.patch | |
675 | applying test1b.patch |
|
673 | applying test1b.patch | |
676 | applying test2.patch |
|
674 | applying test2.patch | |
677 | now at: test2.patch |
|
675 | now at: test2.patch | |
678 |
|
676 | |||
679 | % pops all patches and succeeds |
|
677 | % pops all patches and succeeds | |
680 |
|
678 | |||
681 | $ hg qpop -a |
|
679 | $ hg qpop -a | |
682 | popping test2.patch |
|
680 | popping test2.patch | |
683 | popping test1b.patch |
|
681 | popping test1b.patch | |
684 | popping test.patch |
|
682 | popping test.patch | |
685 | patch queue now empty |
|
683 | patch queue now empty | |
686 |
|
684 | |||
687 | % does nothing and succeeds |
|
685 | % does nothing and succeeds | |
688 |
|
686 | |||
689 | $ hg qpop -a |
|
687 | $ hg qpop -a | |
690 | no patches applied |
|
688 | no patches applied | |
691 |
|
689 | |||
692 | % fails - nothing else to pop |
|
690 | % fails - nothing else to pop | |
693 |
|
691 | |||
694 | $ hg qpop |
|
692 | $ hg qpop | |
695 | no patches applied |
|
693 | no patches applied | |
696 | [1] |
|
694 | [1] | |
697 |
|
695 | |||
698 | % pushes a patch and succeeds |
|
696 | % pushes a patch and succeeds | |
699 |
|
697 | |||
700 | $ hg qpush |
|
698 | $ hg qpush | |
701 | applying test.patch |
|
699 | applying test.patch | |
702 | now at: test.patch |
|
700 | now at: test.patch | |
703 |
|
701 | |||
704 | % pops a patch and succeeds |
|
702 | % pops a patch and succeeds | |
705 |
|
703 | |||
706 | $ hg qpop |
|
704 | $ hg qpop | |
707 | popping test.patch |
|
705 | popping test.patch | |
708 | patch queue now empty |
|
706 | patch queue now empty | |
709 |
|
707 | |||
710 | % pushes up to test1b.patch and succeeds |
|
708 | % pushes up to test1b.patch and succeeds | |
711 |
|
709 | |||
712 | $ hg qpush test1b.patch |
|
710 | $ hg qpush test1b.patch | |
713 | applying test.patch |
|
711 | applying test.patch | |
714 | applying test1b.patch |
|
712 | applying test1b.patch | |
715 | now at: test1b.patch |
|
713 | now at: test1b.patch | |
716 |
|
714 | |||
717 | % does nothing and succeeds |
|
715 | % does nothing and succeeds | |
718 |
|
716 | |||
719 | $ hg qpush test1b.patch |
|
717 | $ hg qpush test1b.patch | |
720 | qpush: test1b.patch is already at the top |
|
718 | qpush: test1b.patch is already at the top | |
721 |
|
719 | |||
722 | % does nothing and succeeds |
|
720 | % does nothing and succeeds | |
723 |
|
721 | |||
724 | $ hg qpop test1b.patch |
|
722 | $ hg qpop test1b.patch | |
725 | qpop: test1b.patch is already at the top |
|
723 | qpop: test1b.patch is already at the top | |
726 |
|
724 | |||
727 | % fails - can't push to this patch |
|
725 | % fails - can't push to this patch | |
728 |
|
726 | |||
729 | $ hg qpush test.patch |
|
727 | $ hg qpush test.patch | |
730 | abort: cannot push to a previous patch: test.patch |
|
728 | abort: cannot push to a previous patch: test.patch | |
731 | [255] |
|
729 | [255] | |
732 |
|
730 | |||
733 | % fails - can't pop to this patch |
|
731 | % fails - can't pop to this patch | |
734 |
|
732 | |||
735 | $ hg qpop test2.patch |
|
733 | $ hg qpop test2.patch | |
736 | abort: patch test2.patch is not applied |
|
734 | abort: patch test2.patch is not applied | |
737 | [255] |
|
735 | [255] | |
738 |
|
736 | |||
739 | % pops up to test.patch and succeeds |
|
737 | % pops up to test.patch and succeeds | |
740 |
|
738 | |||
741 | $ hg qpop test.patch |
|
739 | $ hg qpop test.patch | |
742 | popping test1b.patch |
|
740 | popping test1b.patch | |
743 | now at: test.patch |
|
741 | now at: test.patch | |
744 |
|
742 | |||
745 | % pushes all patches and succeeds |
|
743 | % pushes all patches and succeeds | |
746 |
|
744 | |||
747 | $ hg qpush -a |
|
745 | $ hg qpush -a | |
748 | applying test1b.patch |
|
746 | applying test1b.patch | |
749 | applying test2.patch |
|
747 | applying test2.patch | |
750 | now at: test2.patch |
|
748 | now at: test2.patch | |
751 |
|
749 | |||
752 | % does nothing and succeeds |
|
750 | % does nothing and succeeds | |
753 |
|
751 | |||
754 | $ hg qpush -a |
|
752 | $ hg qpush -a | |
755 | all patches are currently applied |
|
753 | all patches are currently applied | |
756 |
|
754 | |||
757 | % fails - nothing else to push |
|
755 | % fails - nothing else to push | |
758 |
|
756 | |||
759 | $ hg qpush |
|
757 | $ hg qpush | |
760 | patch series already fully applied |
|
758 | patch series already fully applied | |
761 | [1] |
|
759 | [1] | |
762 |
|
760 | |||
763 | % does nothing and succeeds |
|
761 | % does nothing and succeeds | |
764 |
|
762 | |||
765 | $ hg qpush test2.patch |
|
763 | $ hg qpush test2.patch | |
766 | qpush: test2.patch is already at the top |
|
764 | qpush: test2.patch is already at the top | |
767 |
|
765 | |||
768 | strip |
|
766 | strip | |
769 |
|
767 | |||
770 | $ cd ../../b |
|
768 | $ cd ../../b | |
771 | $ echo x>x |
|
769 | $ echo x>x | |
772 | $ hg ci -Ama |
|
770 | $ hg ci -Ama | |
773 | adding x |
|
771 | adding x | |
774 | $ hg strip tip |
|
772 | $ hg strip tip | |
775 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
773 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
776 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
774 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
777 | $ hg unbundle .hg/strip-backup/* |
|
775 | $ hg unbundle .hg/strip-backup/* | |
778 | adding changesets |
|
776 | adding changesets | |
779 | adding manifests |
|
777 | adding manifests | |
780 | adding file changes |
|
778 | adding file changes | |
781 | added 1 changesets with 1 changes to 1 files |
|
779 | added 1 changesets with 1 changes to 1 files | |
782 | (run 'hg update' to get a working copy) |
|
780 | (run 'hg update' to get a working copy) | |
783 |
|
781 | |||
784 |
|
782 | |||
785 | strip with local changes, should complain |
|
783 | strip with local changes, should complain | |
786 |
|
784 | |||
787 | $ hg up |
|
785 | $ hg up | |
788 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
786 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
789 | $ echo y>y |
|
787 | $ echo y>y | |
790 | $ hg add y |
|
788 | $ hg add y | |
791 | $ hg strip tip |
|
789 | $ hg strip tip | |
792 | abort: local changes found |
|
790 | abort: local changes found | |
793 | [255] |
|
791 | [255] | |
794 |
|
792 | |||
795 | --force strip with local changes |
|
793 | --force strip with local changes | |
796 |
|
794 | |||
797 | $ hg strip -f tip |
|
795 | $ hg strip -f tip | |
798 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
796 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
799 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
797 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) | |
800 |
|
798 | |||
801 |
|
799 | |||
802 | cd b; hg qrefresh |
|
800 | cd b; hg qrefresh | |
803 |
|
801 | |||
804 | $ hg init refresh |
|
802 | $ hg init refresh | |
805 | $ cd refresh |
|
803 | $ cd refresh | |
806 | $ echo a > a |
|
804 | $ echo a > a | |
807 | $ hg ci -Ama |
|
805 | $ hg ci -Ama | |
808 | adding a |
|
806 | adding a | |
809 | $ hg qnew -mfoo foo |
|
807 | $ hg qnew -mfoo foo | |
810 | $ echo a >> a |
|
808 | $ echo a >> a | |
811 | $ hg qrefresh |
|
809 | $ hg qrefresh | |
812 | $ mkdir b |
|
810 | $ mkdir b | |
813 | $ cd b |
|
811 | $ cd b | |
814 | $ echo f > f |
|
812 | $ echo f > f | |
815 | $ hg add f |
|
813 | $ hg add f | |
816 | $ hg qrefresh |
|
814 | $ hg qrefresh | |
817 | $ cat ../.hg/patches/foo |
|
815 | $ cat ../.hg/patches/foo | |
818 | foo |
|
816 | foo | |
819 |
|
817 | |||
820 | diff -r cb9a9f314b8b a |
|
818 | diff -r cb9a9f314b8b a | |
821 | --- a/a\t(?P<date>.*) (re) |
|
819 | --- a/a\t(?P<date>.*) (re) | |
822 | \+\+\+ b/a\t(?P<date>.*) (re) |
|
820 | \+\+\+ b/a\t(?P<date>.*) (re) | |
823 | @@ -1,1 +1,2 @@ |
|
821 | @@ -1,1 +1,2 @@ | |
824 | a |
|
822 | a | |
825 | +a |
|
823 | +a | |
826 | diff -r cb9a9f314b8b b/f |
|
824 | diff -r cb9a9f314b8b b/f | |
827 | --- /dev/null\t(?P<date>.*) (re) |
|
825 | --- /dev/null\t(?P<date>.*) (re) | |
828 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
826 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
829 | @@ -0,0 +1,1 @@ |
|
827 | @@ -0,0 +1,1 @@ | |
830 | +f |
|
828 | +f | |
831 |
|
829 | |||
832 | hg qrefresh . |
|
830 | hg qrefresh . | |
833 |
|
831 | |||
834 | $ hg qrefresh . |
|
832 | $ hg qrefresh . | |
835 | $ cat ../.hg/patches/foo |
|
833 | $ cat ../.hg/patches/foo | |
836 | foo |
|
834 | foo | |
837 |
|
835 | |||
838 | diff -r cb9a9f314b8b b/f |
|
836 | diff -r cb9a9f314b8b b/f | |
839 | --- /dev/null\t(?P<date>.*) (re) |
|
837 | --- /dev/null\t(?P<date>.*) (re) | |
840 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
838 | \+\+\+ b/b/f\t(?P<date>.*) (re) | |
841 | @@ -0,0 +1,1 @@ |
|
839 | @@ -0,0 +1,1 @@ | |
842 | +f |
|
840 | +f | |
843 | $ hg status |
|
841 | $ hg status | |
844 | M a |
|
842 | M a | |
845 |
|
843 | |||
846 |
|
844 | |||
847 | qpush failure |
|
845 | qpush failure | |
848 |
|
846 | |||
849 | $ cd .. |
|
847 | $ cd .. | |
850 | $ hg qrefresh |
|
848 | $ hg qrefresh | |
851 | $ hg qnew -mbar bar |
|
849 | $ hg qnew -mbar bar | |
852 | $ echo foo > foo |
|
850 | $ echo foo > foo | |
853 | $ echo bar > bar |
|
851 | $ echo bar > bar | |
854 | $ hg add foo bar |
|
852 | $ hg add foo bar | |
855 | $ hg qrefresh |
|
853 | $ hg qrefresh | |
856 | $ hg qpop -a |
|
854 | $ hg qpop -a | |
857 | popping bar |
|
855 | popping bar | |
858 | popping foo |
|
856 | popping foo | |
859 | patch queue now empty |
|
857 | patch queue now empty | |
860 | $ echo bar > foo |
|
858 | $ echo bar > foo | |
861 | $ hg qpush -a |
|
859 | $ hg qpush -a | |
862 | applying foo |
|
860 | applying foo | |
863 | applying bar |
|
861 | applying bar | |
864 | file foo already exists |
|
862 | file foo already exists | |
865 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
863 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | |
866 | patch failed, unable to continue (try -v) |
|
864 | patch failed, unable to continue (try -v) | |
867 | patch failed, rejects left in working dir |
|
865 | patch failed, rejects left in working dir | |
868 | errors during apply, please fix and refresh bar |
|
866 | errors during apply, please fix and refresh bar | |
869 | [2] |
|
867 | [2] | |
870 | $ hg st |
|
868 | $ hg st | |
871 | ? foo |
|
869 | ? foo | |
872 | ? foo.rej |
|
870 | ? foo.rej | |
873 |
|
871 | |||
874 |
|
872 | |||
875 | mq tags |
|
873 | mq tags | |
876 |
|
874 | |||
877 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
875 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip | |
878 | 0 qparent |
|
876 | 0 qparent | |
879 | 1 foo qbase |
|
877 | 1 foo qbase | |
880 | 2 bar qtip tip |
|
878 | 2 bar qtip tip | |
881 |
|
879 | |||
882 | mq revset |
|
880 | mq revset | |
883 |
|
881 | |||
884 | $ hg log -r 'mq()' --template '{rev}\n' |
|
882 | $ hg log -r 'mq()' --template '{rev}\n' | |
885 | 1 |
|
883 | 1 | |
886 | 2 |
|
884 | 2 | |
887 | $ hg help revsets | grep -i mq |
|
885 | $ hg help revsets | grep -i mq | |
888 | "mq()" |
|
886 | "mq()" | |
889 | Changesets managed by MQ. |
|
887 | Changesets managed by MQ. | |
890 |
|
888 | |||
891 | bad node in status |
|
889 | bad node in status | |
892 |
|
890 | |||
893 | $ hg qpop |
|
891 | $ hg qpop | |
894 | popping bar |
|
892 | popping bar | |
895 | now at: foo |
|
893 | now at: foo | |
896 | $ hg strip -qn tip |
|
894 | $ hg strip -qn tip | |
897 | $ hg tip |
|
895 | $ hg tip | |
898 | changeset: 0:cb9a9f314b8b |
|
896 | changeset: 0:cb9a9f314b8b | |
899 | tag: tip |
|
897 | tag: tip | |
900 | user: test |
|
898 | user: test | |
901 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
899 | date: Thu Jan 01 00:00:00 1970 +0000 | |
902 | summary: a |
|
900 | summary: a | |
903 |
|
901 | |||
904 | $ hg branches |
|
902 | $ hg branches | |
905 | default 0:cb9a9f314b8b |
|
903 | default 0:cb9a9f314b8b | |
906 | $ hg qpop |
|
904 | $ hg qpop | |
907 | no patches applied |
|
905 | no patches applied | |
908 | [1] |
|
906 | [1] | |
909 |
|
907 | |||
910 | $ cat >>$HGRCPATH <<EOF |
|
908 | $ cat >>$HGRCPATH <<EOF | |
911 | > [diff] |
|
909 | > [diff] | |
912 | > git = True |
|
910 | > git = True | |
913 | > EOF |
|
911 | > EOF | |
914 | $ cd .. |
|
912 | $ cd .. | |
915 | $ hg init git |
|
913 | $ hg init git | |
916 | $ cd git |
|
914 | $ cd git | |
917 | $ hg qinit |
|
915 | $ hg qinit | |
918 |
|
916 | |||
919 | $ hg qnew -m'new file' new |
|
917 | $ hg qnew -m'new file' new | |
920 | $ echo foo > new |
|
918 | $ echo foo > new | |
|
919 | #if execbit | |||
921 | $ chmod +x new |
|
920 | $ chmod +x new | |
|
921 | #endif | |||
922 | $ hg add new |
|
922 | $ hg add new | |
923 | $ hg qrefresh |
|
923 | $ hg qrefresh | |
|
924 | #if execbit | |||
924 | $ cat .hg/patches/new |
|
925 | $ cat .hg/patches/new | |
925 | new file |
|
926 | new file | |
926 |
|
927 | |||
927 | diff --git a/new b/new |
|
928 | diff --git a/new b/new | |
928 | new file mode 100755 |
|
929 | new file mode 100755 | |
929 | --- /dev/null |
|
930 | --- /dev/null | |
930 | +++ b/new |
|
931 | +++ b/new | |
931 | @@ -0,0 +1,1 @@ |
|
932 | @@ -0,0 +1,1 @@ | |
932 | +foo |
|
933 | +foo | |
|
934 | #else | |||
|
935 | $ cat .hg/patches/new | |||
|
936 | new file | |||
|
937 | ||||
|
938 | diff --git a/new b/new | |||
|
939 | new file mode 100644 | |||
|
940 | --- /dev/null | |||
|
941 | +++ b/new | |||
|
942 | @@ -0,0 +1,1 @@ | |||
|
943 | +foo | |||
|
944 | #endif | |||
933 |
|
945 | |||
934 | $ hg qnew -m'copy file' copy |
|
946 | $ hg qnew -m'copy file' copy | |
935 | $ hg cp new copy |
|
947 | $ hg cp new copy | |
936 | $ hg qrefresh |
|
948 | $ hg qrefresh | |
937 | $ cat .hg/patches/copy |
|
949 | $ cat .hg/patches/copy | |
938 | copy file |
|
950 | copy file | |
939 |
|
951 | |||
940 | diff --git a/new b/copy |
|
952 | diff --git a/new b/copy | |
941 | copy from new |
|
953 | copy from new | |
942 | copy to copy |
|
954 | copy to copy | |
943 |
|
955 | |||
944 | $ hg qpop |
|
956 | $ hg qpop | |
945 | popping copy |
|
957 | popping copy | |
946 | now at: new |
|
958 | now at: new | |
947 | $ hg qpush |
|
959 | $ hg qpush | |
948 | applying copy |
|
960 | applying copy | |
949 | now at: copy |
|
961 | now at: copy | |
950 | $ hg qdiff |
|
962 | $ hg qdiff | |
951 | diff --git a/new b/copy |
|
963 | diff --git a/new b/copy | |
952 | copy from new |
|
964 | copy from new | |
953 | copy to copy |
|
965 | copy to copy | |
954 | $ cat >>$HGRCPATH <<EOF |
|
966 | $ cat >>$HGRCPATH <<EOF | |
955 | > [diff] |
|
967 | > [diff] | |
956 | > git = False |
|
968 | > git = False | |
957 | > EOF |
|
969 | > EOF | |
958 | $ hg qdiff --git |
|
970 | $ hg qdiff --git | |
959 | diff --git a/new b/copy |
|
971 | diff --git a/new b/copy | |
960 | copy from new |
|
972 | copy from new | |
961 | copy to copy |
|
973 | copy to copy | |
962 | $ cd .. |
|
974 | $ cd .. | |
963 |
|
975 | |||
964 | empty lines in status |
|
976 | empty lines in status | |
965 |
|
977 | |||
966 | $ hg init emptystatus |
|
978 | $ hg init emptystatus | |
967 | $ cd emptystatus |
|
979 | $ cd emptystatus | |
968 | $ hg qinit |
|
980 | $ hg qinit | |
969 | $ printf '\n\n' > .hg/patches/status |
|
981 | $ printf '\n\n' > .hg/patches/status | |
970 | $ hg qser |
|
982 | $ hg qser | |
971 | $ cd .. |
|
983 | $ cd .. | |
972 |
|
984 | |||
973 | bad line in status (without ":") |
|
985 | bad line in status (without ":") | |
974 |
|
986 | |||
975 | $ hg init badstatus |
|
987 | $ hg init badstatus | |
976 | $ cd badstatus |
|
988 | $ cd badstatus | |
977 | $ hg qinit |
|
989 | $ hg qinit | |
978 | $ printf 'babar has no colon in this line\n' > .hg/patches/status |
|
990 | $ printf 'babar has no colon in this line\n' > .hg/patches/status | |
979 | $ hg qser |
|
991 | $ hg qser | |
980 | malformated mq status line: ['babar has no colon in this line'] |
|
992 | malformated mq status line: ['babar has no colon in this line'] | |
981 | $ cd .. |
|
993 | $ cd .. | |
982 |
|
994 | |||
983 |
|
995 | |||
984 | test file addition in slow path |
|
996 | test file addition in slow path | |
985 |
|
997 | |||
986 | $ hg init slow |
|
998 | $ hg init slow | |
987 | $ cd slow |
|
999 | $ cd slow | |
988 | $ hg qinit |
|
1000 | $ hg qinit | |
989 | $ echo foo > foo |
|
1001 | $ echo foo > foo | |
990 | $ hg add foo |
|
1002 | $ hg add foo | |
991 | $ hg ci -m 'add foo' |
|
1003 | $ hg ci -m 'add foo' | |
992 | $ hg qnew bar |
|
1004 | $ hg qnew bar | |
993 | $ echo bar > bar |
|
1005 | $ echo bar > bar | |
994 | $ hg add bar |
|
1006 | $ hg add bar | |
995 | $ hg mv foo baz |
|
1007 | $ hg mv foo baz | |
996 | $ hg qrefresh --git |
|
1008 | $ hg qrefresh --git | |
997 | $ hg up -C 0 |
|
1009 | $ hg up -C 0 | |
998 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1010 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
999 | $ echo >> foo |
|
1011 | $ echo >> foo | |
1000 | $ hg ci -m 'change foo' |
|
1012 | $ hg ci -m 'change foo' | |
1001 | created new head |
|
1013 | created new head | |
1002 | $ hg up -C 1 |
|
1014 | $ hg up -C 1 | |
1003 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1015 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1004 | $ hg qrefresh --git |
|
1016 | $ hg qrefresh --git | |
1005 | $ cat .hg/patches/bar |
|
1017 | $ cat .hg/patches/bar | |
1006 | diff --git a/bar b/bar |
|
1018 | diff --git a/bar b/bar | |
1007 | new file mode 100644 |
|
1019 | new file mode 100644 | |
1008 | --- /dev/null |
|
1020 | --- /dev/null | |
1009 | +++ b/bar |
|
1021 | +++ b/bar | |
1010 | @@ -0,0 +1,1 @@ |
|
1022 | @@ -0,0 +1,1 @@ | |
1011 | +bar |
|
1023 | +bar | |
1012 | diff --git a/foo b/baz |
|
1024 | diff --git a/foo b/baz | |
1013 | rename from foo |
|
1025 | rename from foo | |
1014 | rename to baz |
|
1026 | rename to baz | |
1015 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1027 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1016 | 2 baz (foo) |
|
1028 | 2 baz (foo) | |
1017 | $ hg qrefresh --git |
|
1029 | $ hg qrefresh --git | |
1018 | $ cat .hg/patches/bar |
|
1030 | $ cat .hg/patches/bar | |
1019 | diff --git a/bar b/bar |
|
1031 | diff --git a/bar b/bar | |
1020 | new file mode 100644 |
|
1032 | new file mode 100644 | |
1021 | --- /dev/null |
|
1033 | --- /dev/null | |
1022 | +++ b/bar |
|
1034 | +++ b/bar | |
1023 | @@ -0,0 +1,1 @@ |
|
1035 | @@ -0,0 +1,1 @@ | |
1024 | +bar |
|
1036 | +bar | |
1025 | diff --git a/foo b/baz |
|
1037 | diff --git a/foo b/baz | |
1026 | rename from foo |
|
1038 | rename from foo | |
1027 | rename to baz |
|
1039 | rename to baz | |
1028 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1040 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1029 | 2 baz (foo) |
|
1041 | 2 baz (foo) | |
1030 | $ hg qrefresh |
|
1042 | $ hg qrefresh | |
1031 | $ grep 'diff --git' .hg/patches/bar |
|
1043 | $ grep 'diff --git' .hg/patches/bar | |
1032 | diff --git a/bar b/bar |
|
1044 | diff --git a/bar b/bar | |
1033 | diff --git a/foo b/baz |
|
1045 | diff --git a/foo b/baz | |
1034 |
|
1046 | |||
1035 |
|
1047 | |||
1036 | test file move chains in the slow path |
|
1048 | test file move chains in the slow path | |
1037 |
|
1049 | |||
1038 | $ hg up -C 1 |
|
1050 | $ hg up -C 1 | |
1039 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1051 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1040 | $ echo >> foo |
|
1052 | $ echo >> foo | |
1041 | $ hg ci -m 'change foo again' |
|
1053 | $ hg ci -m 'change foo again' | |
1042 | $ hg up -C 2 |
|
1054 | $ hg up -C 2 | |
1043 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1055 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1044 | $ hg mv bar quux |
|
1056 | $ hg mv bar quux | |
1045 | $ hg mv baz bleh |
|
1057 | $ hg mv baz bleh | |
1046 | $ hg qrefresh --git |
|
1058 | $ hg qrefresh --git | |
1047 | $ cat .hg/patches/bar |
|
1059 | $ cat .hg/patches/bar | |
1048 | diff --git a/foo b/bleh |
|
1060 | diff --git a/foo b/bleh | |
1049 | rename from foo |
|
1061 | rename from foo | |
1050 | rename to bleh |
|
1062 | rename to bleh | |
1051 | diff --git a/quux b/quux |
|
1063 | diff --git a/quux b/quux | |
1052 | new file mode 100644 |
|
1064 | new file mode 100644 | |
1053 | --- /dev/null |
|
1065 | --- /dev/null | |
1054 | +++ b/quux |
|
1066 | +++ b/quux | |
1055 | @@ -0,0 +1,1 @@ |
|
1067 | @@ -0,0 +1,1 @@ | |
1056 | +bar |
|
1068 | +bar | |
1057 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1069 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1058 | 3 bleh (foo) |
|
1070 | 3 bleh (foo) | |
1059 | $ hg mv quux fred |
|
1071 | $ hg mv quux fred | |
1060 | $ hg mv bleh barney |
|
1072 | $ hg mv bleh barney | |
1061 | $ hg qrefresh --git |
|
1073 | $ hg qrefresh --git | |
1062 | $ cat .hg/patches/bar |
|
1074 | $ cat .hg/patches/bar | |
1063 | diff --git a/foo b/barney |
|
1075 | diff --git a/foo b/barney | |
1064 | rename from foo |
|
1076 | rename from foo | |
1065 | rename to barney |
|
1077 | rename to barney | |
1066 | diff --git a/fred b/fred |
|
1078 | diff --git a/fred b/fred | |
1067 | new file mode 100644 |
|
1079 | new file mode 100644 | |
1068 | --- /dev/null |
|
1080 | --- /dev/null | |
1069 | +++ b/fred |
|
1081 | +++ b/fred | |
1070 | @@ -0,0 +1,1 @@ |
|
1082 | @@ -0,0 +1,1 @@ | |
1071 | +bar |
|
1083 | +bar | |
1072 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1084 | $ hg log -v --template '{rev} {file_copies}\n' -r . | |
1073 | 3 barney (foo) |
|
1085 | 3 barney (foo) | |
1074 |
|
1086 | |||
1075 |
|
1087 | |||
1076 | refresh omitting an added file |
|
1088 | refresh omitting an added file | |
1077 |
|
1089 | |||
1078 | $ hg qnew baz |
|
1090 | $ hg qnew baz | |
1079 | $ echo newfile > newfile |
|
1091 | $ echo newfile > newfile | |
1080 | $ hg add newfile |
|
1092 | $ hg add newfile | |
1081 | $ hg qrefresh |
|
1093 | $ hg qrefresh | |
1082 | $ hg st -A newfile |
|
1094 | $ hg st -A newfile | |
1083 | C newfile |
|
1095 | C newfile | |
1084 | $ hg qrefresh -X newfile |
|
1096 | $ hg qrefresh -X newfile | |
1085 | $ hg st -A newfile |
|
1097 | $ hg st -A newfile | |
1086 | A newfile |
|
1098 | A newfile | |
1087 | $ hg revert newfile |
|
1099 | $ hg revert newfile | |
1088 | $ rm newfile |
|
1100 | $ rm newfile | |
1089 | $ hg qpop |
|
1101 | $ hg qpop | |
1090 | popping baz |
|
1102 | popping baz | |
1091 | now at: bar |
|
1103 | now at: bar | |
1092 | $ hg qdel baz |
|
1104 | $ hg qdel baz | |
1093 |
|
1105 | |||
1094 |
|
1106 | |||
1095 | create a git patch |
|
1107 | create a git patch | |
1096 |
|
1108 | |||
1097 | $ echo a > alexander |
|
1109 | $ echo a > alexander | |
1098 | $ hg add alexander |
|
1110 | $ hg add alexander | |
1099 | $ hg qnew -f --git addalexander |
|
1111 | $ hg qnew -f --git addalexander | |
1100 | $ grep diff .hg/patches/addalexander |
|
1112 | $ grep diff .hg/patches/addalexander | |
1101 | diff --git a/alexander b/alexander |
|
1113 | diff --git a/alexander b/alexander | |
1102 |
|
1114 | |||
1103 |
|
1115 | |||
1104 | create a git binary patch |
|
1116 | create a git binary patch | |
1105 |
|
1117 | |||
1106 | $ cat > writebin.py <<EOF |
|
1118 | $ cat > writebin.py <<EOF | |
1107 | > import sys |
|
1119 | > import sys | |
1108 | > path = sys.argv[1] |
|
1120 | > path = sys.argv[1] | |
1109 | > open(path, 'wb').write('BIN\x00ARY') |
|
1121 | > open(path, 'wb').write('BIN\x00ARY') | |
1110 | > EOF |
|
1122 | > EOF | |
1111 | $ python writebin.py bucephalus |
|
1123 | $ python writebin.py bucephalus | |
1112 |
|
1124 | |||
1113 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1125 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1114 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1126 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1115 | $ hg add bucephalus |
|
1127 | $ hg add bucephalus | |
1116 | $ hg qnew -f --git addbucephalus |
|
1128 | $ hg qnew -f --git addbucephalus | |
1117 | $ grep diff .hg/patches/addbucephalus |
|
1129 | $ grep diff .hg/patches/addbucephalus | |
1118 | diff --git a/bucephalus b/bucephalus |
|
1130 | diff --git a/bucephalus b/bucephalus | |
1119 |
|
1131 | |||
1120 |
|
1132 | |||
1121 | check binary patches can be popped and pushed |
|
1133 | check binary patches can be popped and pushed | |
1122 |
|
1134 | |||
1123 | $ hg qpop |
|
1135 | $ hg qpop | |
1124 | popping addbucephalus |
|
1136 | popping addbucephalus | |
1125 | now at: addalexander |
|
1137 | now at: addalexander | |
1126 | $ test -f bucephalus && echo % bucephalus should not be there |
|
1138 | $ test -f bucephalus && echo % bucephalus should not be there | |
1127 | [1] |
|
1139 | [1] | |
1128 | $ hg qpush |
|
1140 | $ hg qpush | |
1129 | applying addbucephalus |
|
1141 | applying addbucephalus | |
1130 | now at: addbucephalus |
|
1142 | now at: addbucephalus | |
1131 | $ test -f bucephalus |
|
1143 | $ test -f bucephalus | |
1132 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1144 | $ python "$TESTDIR/md5sum.py" bucephalus | |
1133 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1145 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus | |
1134 |
|
1146 | |||
1135 |
|
1147 | |||
1136 |
|
1148 | |||
1137 | strip again |
|
1149 | strip again | |
1138 |
|
1150 | |||
1139 | $ cd .. |
|
1151 | $ cd .. | |
1140 | $ hg init strip |
|
1152 | $ hg init strip | |
1141 | $ cd strip |
|
1153 | $ cd strip | |
1142 | $ touch foo |
|
1154 | $ touch foo | |
1143 | $ hg add foo |
|
1155 | $ hg add foo | |
1144 | $ hg ci -m 'add foo' |
|
1156 | $ hg ci -m 'add foo' | |
1145 | $ echo >> foo |
|
1157 | $ echo >> foo | |
1146 | $ hg ci -m 'change foo 1' |
|
1158 | $ hg ci -m 'change foo 1' | |
1147 | $ hg up -C 0 |
|
1159 | $ hg up -C 0 | |
1148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1160 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1149 | $ echo 1 >> foo |
|
1161 | $ echo 1 >> foo | |
1150 | $ hg ci -m 'change foo 2' |
|
1162 | $ hg ci -m 'change foo 2' | |
1151 | created new head |
|
1163 | created new head | |
1152 | $ HGMERGE=true hg merge |
|
1164 | $ HGMERGE=true hg merge | |
1153 | merging foo |
|
1165 | merging foo | |
1154 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1166 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1155 | (branch merge, don't forget to commit) |
|
1167 | (branch merge, don't forget to commit) | |
1156 | $ hg ci -m merge |
|
1168 | $ hg ci -m merge | |
1157 | $ hg log |
|
1169 | $ hg log | |
1158 | changeset: 3:99615015637b |
|
1170 | changeset: 3:99615015637b | |
1159 | tag: tip |
|
1171 | tag: tip | |
1160 | parent: 2:20cbbe65cff7 |
|
1172 | parent: 2:20cbbe65cff7 | |
1161 | parent: 1:d2871fc282d4 |
|
1173 | parent: 1:d2871fc282d4 | |
1162 | user: test |
|
1174 | user: test | |
1163 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1175 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1164 | summary: merge |
|
1176 | summary: merge | |
1165 |
|
1177 | |||
1166 | changeset: 2:20cbbe65cff7 |
|
1178 | changeset: 2:20cbbe65cff7 | |
1167 | parent: 0:53245c60e682 |
|
1179 | parent: 0:53245c60e682 | |
1168 | user: test |
|
1180 | user: test | |
1169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1181 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1170 | summary: change foo 2 |
|
1182 | summary: change foo 2 | |
1171 |
|
1183 | |||
1172 | changeset: 1:d2871fc282d4 |
|
1184 | changeset: 1:d2871fc282d4 | |
1173 | user: test |
|
1185 | user: test | |
1174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1186 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1175 | summary: change foo 1 |
|
1187 | summary: change foo 1 | |
1176 |
|
1188 | |||
1177 | changeset: 0:53245c60e682 |
|
1189 | changeset: 0:53245c60e682 | |
1178 | user: test |
|
1190 | user: test | |
1179 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1191 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1180 | summary: add foo |
|
1192 | summary: add foo | |
1181 |
|
1193 | |||
1182 | $ hg strip 1 |
|
1194 | $ hg strip 1 | |
1183 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1195 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1184 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) |
|
1196 | saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob) | |
1185 | $ checkundo strip |
|
1197 | $ checkundo strip | |
1186 | $ hg log |
|
1198 | $ hg log | |
1187 | changeset: 1:20cbbe65cff7 |
|
1199 | changeset: 1:20cbbe65cff7 | |
1188 | tag: tip |
|
1200 | tag: tip | |
1189 | user: test |
|
1201 | user: test | |
1190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1202 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1191 | summary: change foo 2 |
|
1203 | summary: change foo 2 | |
1192 |
|
1204 | |||
1193 | changeset: 0:53245c60e682 |
|
1205 | changeset: 0:53245c60e682 | |
1194 | user: test |
|
1206 | user: test | |
1195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1207 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1196 | summary: add foo |
|
1208 | summary: add foo | |
1197 |
|
1209 | |||
1198 | $ cd .. |
|
1210 | $ cd .. | |
1199 |
|
1211 | |||
1200 |
|
1212 | |||
1201 | qclone |
|
1213 | qclone | |
1202 |
|
1214 | |||
1203 | $ qlog() |
|
1215 | $ qlog() | |
1204 | > { |
|
1216 | > { | |
1205 | > echo 'main repo:' |
|
1217 | > echo 'main repo:' | |
1206 | > hg log --template ' rev {rev}: {desc}\n' |
|
1218 | > hg log --template ' rev {rev}: {desc}\n' | |
1207 | > echo 'patch repo:' |
|
1219 | > echo 'patch repo:' | |
1208 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
1220 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' | |
1209 | > } |
|
1221 | > } | |
1210 | $ hg init qclonesource |
|
1222 | $ hg init qclonesource | |
1211 | $ cd qclonesource |
|
1223 | $ cd qclonesource | |
1212 | $ echo foo > foo |
|
1224 | $ echo foo > foo | |
1213 | $ hg add foo |
|
1225 | $ hg add foo | |
1214 | $ hg ci -m 'add foo' |
|
1226 | $ hg ci -m 'add foo' | |
1215 | $ hg qinit |
|
1227 | $ hg qinit | |
1216 | $ hg qnew patch1 |
|
1228 | $ hg qnew patch1 | |
1217 | $ echo bar >> foo |
|
1229 | $ echo bar >> foo | |
1218 | $ hg qrefresh -m 'change foo' |
|
1230 | $ hg qrefresh -m 'change foo' | |
1219 | $ cd .. |
|
1231 | $ cd .. | |
1220 |
|
1232 | |||
1221 |
|
1233 | |||
1222 | repo with unversioned patch dir |
|
1234 | repo with unversioned patch dir | |
1223 |
|
1235 | |||
1224 | $ hg qclone qclonesource failure |
|
1236 | $ hg qclone qclonesource failure | |
1225 | abort: versioned patch repository not found (see init --mq) |
|
1237 | abort: versioned patch repository not found (see init --mq) | |
1226 | [255] |
|
1238 | [255] | |
1227 |
|
1239 | |||
1228 | $ cd qclonesource |
|
1240 | $ cd qclonesource | |
1229 | $ hg qinit -c |
|
1241 | $ hg qinit -c | |
1230 | adding .hg/patches/patch1 (glob) |
|
1242 | adding .hg/patches/patch1 (glob) | |
1231 | $ hg qci -m checkpoint |
|
1243 | $ hg qci -m checkpoint | |
1232 | $ qlog |
|
1244 | $ qlog | |
1233 | main repo: |
|
1245 | main repo: | |
1234 | rev 1: change foo |
|
1246 | rev 1: change foo | |
1235 | rev 0: add foo |
|
1247 | rev 0: add foo | |
1236 | patch repo: |
|
1248 | patch repo: | |
1237 | rev 0: checkpoint |
|
1249 | rev 0: checkpoint | |
1238 | $ cd .. |
|
1250 | $ cd .. | |
1239 |
|
1251 | |||
1240 |
|
1252 | |||
1241 | repo with patches applied |
|
1253 | repo with patches applied | |
1242 |
|
1254 | |||
1243 | $ hg qclone qclonesource qclonedest |
|
1255 | $ hg qclone qclonesource qclonedest | |
1244 | updating to branch default |
|
1256 | updating to branch default | |
1245 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1257 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1258 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1247 | $ cd qclonedest |
|
1259 | $ cd qclonedest | |
1248 | $ qlog |
|
1260 | $ qlog | |
1249 | main repo: |
|
1261 | main repo: | |
1250 | rev 0: add foo |
|
1262 | rev 0: add foo | |
1251 | patch repo: |
|
1263 | patch repo: | |
1252 | rev 0: checkpoint |
|
1264 | rev 0: checkpoint | |
1253 | $ cd .. |
|
1265 | $ cd .. | |
1254 |
|
1266 | |||
1255 |
|
1267 | |||
1256 | repo with patches unapplied |
|
1268 | repo with patches unapplied | |
1257 |
|
1269 | |||
1258 | $ cd qclonesource |
|
1270 | $ cd qclonesource | |
1259 | $ hg qpop -a |
|
1271 | $ hg qpop -a | |
1260 | popping patch1 |
|
1272 | popping patch1 | |
1261 | patch queue now empty |
|
1273 | patch queue now empty | |
1262 | $ qlog |
|
1274 | $ qlog | |
1263 | main repo: |
|
1275 | main repo: | |
1264 | rev 0: add foo |
|
1276 | rev 0: add foo | |
1265 | patch repo: |
|
1277 | patch repo: | |
1266 | rev 0: checkpoint |
|
1278 | rev 0: checkpoint | |
1267 | $ cd .. |
|
1279 | $ cd .. | |
1268 | $ hg qclone qclonesource qclonedest2 |
|
1280 | $ hg qclone qclonesource qclonedest2 | |
1269 | updating to branch default |
|
1281 | updating to branch default | |
1270 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1282 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1271 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1272 | $ cd qclonedest2 |
|
1284 | $ cd qclonedest2 | |
1273 | $ qlog |
|
1285 | $ qlog | |
1274 | main repo: |
|
1286 | main repo: | |
1275 | rev 0: add foo |
|
1287 | rev 0: add foo | |
1276 | patch repo: |
|
1288 | patch repo: | |
1277 | rev 0: checkpoint |
|
1289 | rev 0: checkpoint | |
1278 | $ cd .. |
|
1290 | $ cd .. | |
1279 |
|
1291 | |||
1280 |
|
1292 | |||
1281 | Issue1033: test applying on an empty file |
|
1293 | Issue1033: test applying on an empty file | |
1282 |
|
1294 | |||
1283 | $ hg init empty |
|
1295 | $ hg init empty | |
1284 | $ cd empty |
|
1296 | $ cd empty | |
1285 | $ touch a |
|
1297 | $ touch a | |
1286 | $ hg ci -Am addempty |
|
1298 | $ hg ci -Am addempty | |
1287 | adding a |
|
1299 | adding a | |
1288 | $ echo a > a |
|
1300 | $ echo a > a | |
1289 | $ hg qnew -f -e changea |
|
1301 | $ hg qnew -f -e changea | |
1290 | $ hg qpop |
|
1302 | $ hg qpop | |
1291 | popping changea |
|
1303 | popping changea | |
1292 | patch queue now empty |
|
1304 | patch queue now empty | |
1293 | $ hg qpush |
|
1305 | $ hg qpush | |
1294 | applying changea |
|
1306 | applying changea | |
1295 | now at: changea |
|
1307 | now at: changea | |
1296 | $ cd .. |
|
1308 | $ cd .. | |
1297 |
|
1309 | |||
1298 | test qpush with --force, issue1087 |
|
1310 | test qpush with --force, issue1087 | |
1299 |
|
1311 | |||
1300 | $ hg init forcepush |
|
1312 | $ hg init forcepush | |
1301 | $ cd forcepush |
|
1313 | $ cd forcepush | |
1302 | $ echo hello > hello.txt |
|
1314 | $ echo hello > hello.txt | |
1303 | $ echo bye > bye.txt |
|
1315 | $ echo bye > bye.txt | |
1304 | $ hg ci -Ama |
|
1316 | $ hg ci -Ama | |
1305 | adding bye.txt |
|
1317 | adding bye.txt | |
1306 | adding hello.txt |
|
1318 | adding hello.txt | |
1307 | $ hg qnew -d '0 0' empty |
|
1319 | $ hg qnew -d '0 0' empty | |
1308 | $ hg qpop |
|
1320 | $ hg qpop | |
1309 | popping empty |
|
1321 | popping empty | |
1310 | patch queue now empty |
|
1322 | patch queue now empty | |
1311 | $ echo world >> hello.txt |
|
1323 | $ echo world >> hello.txt | |
1312 |
|
1324 | |||
1313 |
|
1325 | |||
1314 | qpush should fail, local changes |
|
1326 | qpush should fail, local changes | |
1315 |
|
1327 | |||
1316 | $ hg qpush |
|
1328 | $ hg qpush | |
1317 | abort: local changes found |
|
1329 | abort: local changes found | |
1318 | [255] |
|
1330 | [255] | |
1319 |
|
1331 | |||
1320 |
|
1332 | |||
1321 | apply force, should not discard changes with empty patch |
|
1333 | apply force, should not discard changes with empty patch | |
1322 |
|
1334 | |||
1323 | $ hg qpush -f |
|
1335 | $ hg qpush -f | |
1324 | applying empty |
|
1336 | applying empty | |
1325 | patch empty is empty |
|
1337 | patch empty is empty | |
1326 | now at: empty |
|
1338 | now at: empty | |
1327 | $ hg diff --config diff.nodates=True |
|
1339 | $ hg diff --config diff.nodates=True | |
1328 | diff -r d58265112590 hello.txt |
|
1340 | diff -r d58265112590 hello.txt | |
1329 | --- a/hello.txt |
|
1341 | --- a/hello.txt | |
1330 | +++ b/hello.txt |
|
1342 | +++ b/hello.txt | |
1331 | @@ -1,1 +1,2 @@ |
|
1343 | @@ -1,1 +1,2 @@ | |
1332 | hello |
|
1344 | hello | |
1333 | +world |
|
1345 | +world | |
1334 | $ hg qdiff --config diff.nodates=True |
|
1346 | $ hg qdiff --config diff.nodates=True | |
1335 | diff -r 9ecee4f634e3 hello.txt |
|
1347 | diff -r 9ecee4f634e3 hello.txt | |
1336 | --- a/hello.txt |
|
1348 | --- a/hello.txt | |
1337 | +++ b/hello.txt |
|
1349 | +++ b/hello.txt | |
1338 | @@ -1,1 +1,2 @@ |
|
1350 | @@ -1,1 +1,2 @@ | |
1339 | hello |
|
1351 | hello | |
1340 | +world |
|
1352 | +world | |
1341 | $ hg log -l1 -p |
|
1353 | $ hg log -l1 -p | |
1342 | changeset: 1:d58265112590 |
|
1354 | changeset: 1:d58265112590 | |
1343 | tag: empty |
|
1355 | tag: empty | |
1344 | tag: qbase |
|
1356 | tag: qbase | |
1345 | tag: qtip |
|
1357 | tag: qtip | |
1346 | tag: tip |
|
1358 | tag: tip | |
1347 | user: test |
|
1359 | user: test | |
1348 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1360 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1349 | summary: imported patch empty |
|
1361 | summary: imported patch empty | |
1350 |
|
1362 | |||
1351 |
|
1363 | |||
1352 | $ hg qref -d '0 0' |
|
1364 | $ hg qref -d '0 0' | |
1353 | $ hg qpop |
|
1365 | $ hg qpop | |
1354 | popping empty |
|
1366 | popping empty | |
1355 | patch queue now empty |
|
1367 | patch queue now empty | |
1356 | $ echo universe >> hello.txt |
|
1368 | $ echo universe >> hello.txt | |
1357 | $ echo universe >> bye.txt |
|
1369 | $ echo universe >> bye.txt | |
1358 |
|
1370 | |||
1359 |
|
1371 | |||
1360 | qpush should fail, local changes |
|
1372 | qpush should fail, local changes | |
1361 |
|
1373 | |||
1362 | $ hg qpush |
|
1374 | $ hg qpush | |
1363 | abort: local changes found |
|
1375 | abort: local changes found | |
1364 | [255] |
|
1376 | [255] | |
1365 |
|
1377 | |||
1366 |
|
1378 | |||
1367 | apply force, should discard changes in hello, but not bye |
|
1379 | apply force, should discard changes in hello, but not bye | |
1368 |
|
1380 | |||
1369 | $ hg qpush -f --verbose |
|
1381 | $ hg qpush -f --verbose | |
1370 | applying empty |
|
1382 | applying empty | |
1371 | saving current version of hello.txt as hello.txt.orig |
|
1383 | saving current version of hello.txt as hello.txt.orig | |
1372 | patching file hello.txt |
|
1384 | patching file hello.txt | |
1373 | hello.txt |
|
1385 | hello.txt | |
1374 | now at: empty |
|
1386 | now at: empty | |
1375 | $ hg st |
|
1387 | $ hg st | |
1376 | M bye.txt |
|
1388 | M bye.txt | |
1377 | ? hello.txt.orig |
|
1389 | ? hello.txt.orig | |
1378 | $ hg diff --config diff.nodates=True |
|
1390 | $ hg diff --config diff.nodates=True | |
1379 | diff -r ba252371dbc1 bye.txt |
|
1391 | diff -r ba252371dbc1 bye.txt | |
1380 | --- a/bye.txt |
|
1392 | --- a/bye.txt | |
1381 | +++ b/bye.txt |
|
1393 | +++ b/bye.txt | |
1382 | @@ -1,1 +1,2 @@ |
|
1394 | @@ -1,1 +1,2 @@ | |
1383 | bye |
|
1395 | bye | |
1384 | +universe |
|
1396 | +universe | |
1385 | $ hg qdiff --config diff.nodates=True |
|
1397 | $ hg qdiff --config diff.nodates=True | |
1386 | diff -r 9ecee4f634e3 bye.txt |
|
1398 | diff -r 9ecee4f634e3 bye.txt | |
1387 | --- a/bye.txt |
|
1399 | --- a/bye.txt | |
1388 | +++ b/bye.txt |
|
1400 | +++ b/bye.txt | |
1389 | @@ -1,1 +1,2 @@ |
|
1401 | @@ -1,1 +1,2 @@ | |
1390 | bye |
|
1402 | bye | |
1391 | +universe |
|
1403 | +universe | |
1392 | diff -r 9ecee4f634e3 hello.txt |
|
1404 | diff -r 9ecee4f634e3 hello.txt | |
1393 | --- a/hello.txt |
|
1405 | --- a/hello.txt | |
1394 | +++ b/hello.txt |
|
1406 | +++ b/hello.txt | |
1395 | @@ -1,1 +1,3 @@ |
|
1407 | @@ -1,1 +1,3 @@ | |
1396 | hello |
|
1408 | hello | |
1397 | +world |
|
1409 | +world | |
1398 | +universe |
|
1410 | +universe | |
1399 |
|
1411 | |||
1400 |
|
1412 | |||
1401 | test popping revisions not in working dir ancestry |
|
1413 | test popping revisions not in working dir ancestry | |
1402 |
|
1414 | |||
1403 | $ hg qseries -v |
|
1415 | $ hg qseries -v | |
1404 | 0 A empty |
|
1416 | 0 A empty | |
1405 | $ hg up qparent |
|
1417 | $ hg up qparent | |
1406 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1418 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1407 | $ hg qpop |
|
1419 | $ hg qpop | |
1408 | popping empty |
|
1420 | popping empty | |
1409 | patch queue now empty |
|
1421 | patch queue now empty | |
1410 |
|
1422 | |||
1411 | $ cd .. |
|
1423 | $ cd .. | |
1412 | $ hg init deletion-order |
|
1424 | $ hg init deletion-order | |
1413 | $ cd deletion-order |
|
1425 | $ cd deletion-order | |
1414 |
|
1426 | |||
1415 | $ touch a |
|
1427 | $ touch a | |
1416 | $ hg ci -Aqm0 |
|
1428 | $ hg ci -Aqm0 | |
1417 |
|
1429 | |||
1418 | $ hg qnew rename-dir |
|
1430 | $ hg qnew rename-dir | |
1419 | $ hg rm a |
|
1431 | $ hg rm a | |
1420 | $ hg qrefresh |
|
1432 | $ hg qrefresh | |
1421 |
|
1433 | |||
1422 | $ mkdir a b |
|
1434 | $ mkdir a b | |
1423 | $ touch a/a b/b |
|
1435 | $ touch a/a b/b | |
1424 | $ hg add -q a b |
|
1436 | $ hg add -q a b | |
1425 | $ hg qrefresh |
|
1437 | $ hg qrefresh | |
1426 |
|
1438 | |||
1427 |
|
1439 | |||
1428 | test popping must remove files added in subdirectories first |
|
1440 | test popping must remove files added in subdirectories first | |
1429 |
|
1441 | |||
1430 | $ hg qpop |
|
1442 | $ hg qpop | |
1431 | popping rename-dir |
|
1443 | popping rename-dir | |
1432 | patch queue now empty |
|
1444 | patch queue now empty | |
1433 | $ cd .. |
|
1445 | $ cd .. | |
1434 |
|
1446 | |||
1435 |
|
1447 | |||
1436 | test case preservation through patch pushing especially on case |
|
1448 | test case preservation through patch pushing especially on case | |
1437 | insensitive filesystem |
|
1449 | insensitive filesystem | |
1438 |
|
1450 | |||
1439 | $ hg init casepreserve |
|
1451 | $ hg init casepreserve | |
1440 | $ cd casepreserve |
|
1452 | $ cd casepreserve | |
1441 |
|
1453 | |||
1442 | $ hg qnew add-file1 |
|
1454 | $ hg qnew add-file1 | |
1443 | $ echo a > TeXtFiLe.TxT |
|
1455 | $ echo a > TeXtFiLe.TxT | |
1444 | $ hg add TeXtFiLe.TxT |
|
1456 | $ hg add TeXtFiLe.TxT | |
1445 | $ hg qrefresh |
|
1457 | $ hg qrefresh | |
1446 |
|
1458 | |||
1447 | $ hg qnew add-file2 |
|
1459 | $ hg qnew add-file2 | |
1448 | $ echo b > AnOtHeRFiLe.TxT |
|
1460 | $ echo b > AnOtHeRFiLe.TxT | |
1449 | $ hg add AnOtHeRFiLe.TxT |
|
1461 | $ hg add AnOtHeRFiLe.TxT | |
1450 | $ hg qrefresh |
|
1462 | $ hg qrefresh | |
1451 |
|
1463 | |||
1452 | $ hg qnew modify-file |
|
1464 | $ hg qnew modify-file | |
1453 | $ echo c >> AnOtHeRFiLe.TxT |
|
1465 | $ echo c >> AnOtHeRFiLe.TxT | |
1454 | $ hg qrefresh |
|
1466 | $ hg qrefresh | |
1455 |
|
1467 | |||
1456 | $ hg qapplied |
|
1468 | $ hg qapplied | |
1457 | add-file1 |
|
1469 | add-file1 | |
1458 | add-file2 |
|
1470 | add-file2 | |
1459 | modify-file |
|
1471 | modify-file | |
1460 | $ hg qpop -a |
|
1472 | $ hg qpop -a | |
1461 | popping modify-file |
|
1473 | popping modify-file | |
1462 | popping add-file2 |
|
1474 | popping add-file2 | |
1463 | popping add-file1 |
|
1475 | popping add-file1 | |
1464 | patch queue now empty |
|
1476 | patch queue now empty | |
1465 |
|
1477 | |||
1466 | this qpush causes problems below, if case preservation on case |
|
1478 | this qpush causes problems below, if case preservation on case | |
1467 | insensitive filesystem is not enough: |
|
1479 | insensitive filesystem is not enough: | |
1468 | (1) unexpected "adding ..." messages are shown |
|
1480 | (1) unexpected "adding ..." messages are shown | |
1469 | (2) patching fails in modification of (1) files |
|
1481 | (2) patching fails in modification of (1) files | |
1470 |
|
1482 | |||
1471 | $ hg qpush -a |
|
1483 | $ hg qpush -a | |
1472 | applying add-file1 |
|
1484 | applying add-file1 | |
1473 | applying add-file2 |
|
1485 | applying add-file2 | |
1474 | applying modify-file |
|
1486 | applying modify-file | |
1475 | now at: modify-file |
|
1487 | now at: modify-file | |
1476 |
|
1488 | |||
1477 | Proper phase default with mq: |
|
1489 | Proper phase default with mq: | |
1478 |
|
1490 | |||
1479 | 1. mq.secret=false |
|
1491 | 1. mq.secret=false | |
1480 |
|
1492 | |||
1481 | $ rm .hg/store/phaseroots |
|
1493 | $ rm .hg/store/phaseroots | |
1482 | $ hg phase 'qparent::' |
|
1494 | $ hg phase 'qparent::' | |
1483 | 0: draft |
|
1495 | 0: draft | |
1484 | 1: draft |
|
1496 | 1: draft | |
1485 | 2: draft |
|
1497 | 2: draft | |
1486 | $ echo '[mq]' >> $HGRCPATH |
|
1498 | $ echo '[mq]' >> $HGRCPATH | |
1487 | $ echo 'secret=true' >> $HGRCPATH |
|
1499 | $ echo 'secret=true' >> $HGRCPATH | |
1488 | $ rm -f .hg/store/phaseroots |
|
1500 | $ rm -f .hg/store/phaseroots | |
1489 | $ hg phase 'qparent::' |
|
1501 | $ hg phase 'qparent::' | |
1490 | 0: secret |
|
1502 | 0: secret | |
1491 | 1: secret |
|
1503 | 1: secret | |
1492 | 2: secret |
|
1504 | 2: secret | |
1493 |
|
1505 | |||
1494 | Test that qfinish change phase when mq.secret=true |
|
1506 | Test that qfinish change phase when mq.secret=true | |
1495 |
|
1507 | |||
1496 | $ hg qfinish qbase |
|
1508 | $ hg qfinish qbase | |
1497 | patch add-file1 finalized without changeset message |
|
1509 | patch add-file1 finalized without changeset message | |
1498 | $ hg phase 'all()' |
|
1510 | $ hg phase 'all()' | |
1499 | 0: draft |
|
1511 | 0: draft | |
1500 | 1: secret |
|
1512 | 1: secret | |
1501 | 2: secret |
|
1513 | 2: secret | |
1502 |
|
1514 | |||
1503 | Test that qfinish respect phases.new-commit setting |
|
1515 | Test that qfinish respect phases.new-commit setting | |
1504 |
|
1516 | |||
1505 | $ echo '[phases]' >> $HGRCPATH |
|
1517 | $ echo '[phases]' >> $HGRCPATH | |
1506 | $ echo 'new-commit=secret' >> $HGRCPATH |
|
1518 | $ echo 'new-commit=secret' >> $HGRCPATH | |
1507 | $ hg qfinish qbase |
|
1519 | $ hg qfinish qbase | |
1508 | patch add-file2 finalized without changeset message |
|
1520 | patch add-file2 finalized without changeset message | |
1509 | $ hg phase 'all()' |
|
1521 | $ hg phase 'all()' | |
1510 | 0: draft |
|
1522 | 0: draft | |
1511 | 1: secret |
|
1523 | 1: secret | |
1512 | 2: secret |
|
1524 | 2: secret | |
1513 |
|
1525 | |||
1514 | (restore env for next test) |
|
1526 | (restore env for next test) | |
1515 |
|
1527 | |||
1516 | $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp |
|
1528 | $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp | |
1517 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1529 | $ cp $TESTTMP/sedtmp $HGRCPATH | |
1518 | $ hg qimport -r 1 --name add-file2 |
|
1530 | $ hg qimport -r 1 --name add-file2 | |
1519 |
|
1531 | |||
1520 | Test that qfinish preserve phase when mq.secret=false |
|
1532 | Test that qfinish preserve phase when mq.secret=false | |
1521 |
|
1533 | |||
1522 | $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp |
|
1534 | $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp | |
1523 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1535 | $ cp $TESTTMP/sedtmp $HGRCPATH | |
1524 | $ hg qfinish qbase |
|
1536 | $ hg qfinish qbase | |
1525 | patch add-file2 finalized without changeset message |
|
1537 | patch add-file2 finalized without changeset message | |
1526 | $ hg phase 'all()' |
|
1538 | $ hg phase 'all()' | |
1527 | 0: draft |
|
1539 | 0: draft | |
1528 | 1: secret |
|
1540 | 1: secret | |
1529 | 2: secret |
|
1541 | 2: secret |
@@ -1,1113 +1,1227 b'' | |||||
1 | $ "$TESTDIR/hghave" execbit || exit 80 |
|
1 | $ "$TESTDIR/hghave" execbit || exit 80 | |
2 |
|
2 | |||
3 | Set up a repo |
|
3 | Set up a repo | |
4 |
|
4 | |||
5 | $ echo "[ui]" >> $HGRCPATH |
|
5 | $ echo "[ui]" >> $HGRCPATH | |
6 | $ echo "interactive=true" >> $HGRCPATH |
|
6 | $ echo "interactive=true" >> $HGRCPATH | |
7 | $ echo "[extensions]" >> $HGRCPATH |
|
7 | $ echo "[extensions]" >> $HGRCPATH | |
8 | $ echo "record=" >> $HGRCPATH |
|
8 | $ echo "record=" >> $HGRCPATH | |
9 |
|
9 | |||
10 | $ hg init a |
|
10 | $ hg init a | |
11 | $ cd a |
|
11 | $ cd a | |
12 |
|
12 | |||
13 | Select no files |
|
13 | Select no files | |
14 |
|
14 | |||
15 | $ touch empty-rw |
|
15 | $ touch empty-rw | |
16 | $ hg add empty-rw |
|
16 | $ hg add empty-rw | |
17 |
|
17 | |||
18 | $ hg record empty-rw<<EOF |
|
18 | $ hg record empty-rw<<EOF | |
19 | > n |
|
19 | > n | |
20 | > EOF |
|
20 | > EOF | |
21 | diff --git a/empty-rw b/empty-rw |
|
21 | diff --git a/empty-rw b/empty-rw | |
22 | new file mode 100644 |
|
22 | new file mode 100644 | |
23 | examine changes to 'empty-rw'? [Ynesfdaq?] |
|
23 | examine changes to 'empty-rw'? [Ynesfdaq?] | |
24 | no changes to record |
|
24 | no changes to record | |
25 |
|
25 | |||
26 | $ hg tip -p |
|
26 | $ hg tip -p | |
27 | changeset: -1:000000000000 |
|
27 | changeset: -1:000000000000 | |
28 | tag: tip |
|
28 | tag: tip | |
29 | user: |
|
29 | user: | |
30 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
30 | date: Thu Jan 01 00:00:00 1970 +0000 | |
31 |
|
31 | |||
32 |
|
32 | |||
33 |
|
33 | |||
34 | Select files but no hunks |
|
34 | Select files but no hunks | |
35 |
|
35 | |||
36 | $ hg record empty-rw<<EOF |
|
36 | $ hg record empty-rw<<EOF | |
37 | > y |
|
37 | > y | |
38 | > n |
|
38 | > n | |
39 | > EOF |
|
39 | > EOF | |
40 | diff --git a/empty-rw b/empty-rw |
|
40 | diff --git a/empty-rw b/empty-rw | |
41 | new file mode 100644 |
|
41 | new file mode 100644 | |
42 | examine changes to 'empty-rw'? [Ynesfdaq?] |
|
42 | examine changes to 'empty-rw'? [Ynesfdaq?] | |
43 | abort: empty commit message |
|
43 | abort: empty commit message | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | $ hg tip -p |
|
46 | $ hg tip -p | |
47 | changeset: -1:000000000000 |
|
47 | changeset: -1:000000000000 | |
48 | tag: tip |
|
48 | tag: tip | |
49 | user: |
|
49 | user: | |
50 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
50 | date: Thu Jan 01 00:00:00 1970 +0000 | |
51 |
|
51 | |||
52 |
|
52 | |||
53 |
|
53 | |||
54 | Record empty file |
|
54 | Record empty file | |
55 |
|
55 | |||
56 | $ hg record -d '0 0' -m empty empty-rw<<EOF |
|
56 | $ hg record -d '0 0' -m empty empty-rw<<EOF | |
57 | > y |
|
57 | > y | |
58 | > y |
|
58 | > y | |
59 | > EOF |
|
59 | > EOF | |
60 | diff --git a/empty-rw b/empty-rw |
|
60 | diff --git a/empty-rw b/empty-rw | |
61 | new file mode 100644 |
|
61 | new file mode 100644 | |
62 | examine changes to 'empty-rw'? [Ynesfdaq?] |
|
62 | examine changes to 'empty-rw'? [Ynesfdaq?] | |
63 |
|
63 | |||
64 | $ hg tip -p |
|
64 | $ hg tip -p | |
65 | changeset: 0:c0708cf4e46e |
|
65 | changeset: 0:c0708cf4e46e | |
66 | tag: tip |
|
66 | tag: tip | |
67 | user: test |
|
67 | user: test | |
68 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
69 | summary: empty |
|
69 | summary: empty | |
70 |
|
70 | |||
71 |
|
71 | |||
72 |
|
72 | |||
73 | Summary shows we updated to the new cset |
|
73 | Summary shows we updated to the new cset | |
74 |
|
74 | |||
75 | $ hg summary |
|
75 | $ hg summary | |
76 | parent: 0:c0708cf4e46e tip |
|
76 | parent: 0:c0708cf4e46e tip | |
77 | empty |
|
77 | empty | |
78 | branch: default |
|
78 | branch: default | |
79 | commit: (clean) |
|
79 | commit: (clean) | |
80 | update: (current) |
|
80 | update: (current) | |
81 |
|
81 | |||
82 | Rename empty file |
|
82 | Rename empty file | |
83 |
|
83 | |||
84 | $ hg mv empty-rw empty-rename |
|
84 | $ hg mv empty-rw empty-rename | |
85 | $ hg record -d '1 0' -m rename<<EOF |
|
85 | $ hg record -d '1 0' -m rename<<EOF | |
86 | > y |
|
86 | > y | |
87 | > EOF |
|
87 | > EOF | |
88 | diff --git a/empty-rw b/empty-rename |
|
88 | diff --git a/empty-rw b/empty-rename | |
89 | rename from empty-rw |
|
89 | rename from empty-rw | |
90 | rename to empty-rename |
|
90 | rename to empty-rename | |
91 | examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] |
|
91 | examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] | |
92 |
|
92 | |||
93 | $ hg tip -p |
|
93 | $ hg tip -p | |
94 | changeset: 1:d695e8dcb197 |
|
94 | changeset: 1:d695e8dcb197 | |
95 | tag: tip |
|
95 | tag: tip | |
96 | user: test |
|
96 | user: test | |
97 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
97 | date: Thu Jan 01 00:00:01 1970 +0000 | |
98 | summary: rename |
|
98 | summary: rename | |
99 |
|
99 | |||
100 |
|
100 | |||
101 |
|
101 | |||
102 | Copy empty file |
|
102 | Copy empty file | |
103 |
|
103 | |||
104 | $ hg cp empty-rename empty-copy |
|
104 | $ hg cp empty-rename empty-copy | |
105 | $ hg record -d '2 0' -m copy<<EOF |
|
105 | $ hg record -d '2 0' -m copy<<EOF | |
106 | > y |
|
106 | > y | |
107 | > EOF |
|
107 | > EOF | |
108 | diff --git a/empty-rename b/empty-copy |
|
108 | diff --git a/empty-rename b/empty-copy | |
109 | copy from empty-rename |
|
109 | copy from empty-rename | |
110 | copy to empty-copy |
|
110 | copy to empty-copy | |
111 | examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] |
|
111 | examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] | |
112 |
|
112 | |||
113 | $ hg tip -p |
|
113 | $ hg tip -p | |
114 | changeset: 2:1d4b90bea524 |
|
114 | changeset: 2:1d4b90bea524 | |
115 | tag: tip |
|
115 | tag: tip | |
116 | user: test |
|
116 | user: test | |
117 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
117 | date: Thu Jan 01 00:00:02 1970 +0000 | |
118 | summary: copy |
|
118 | summary: copy | |
119 |
|
119 | |||
120 |
|
120 | |||
121 |
|
121 | |||
122 | Delete empty file |
|
122 | Delete empty file | |
123 |
|
123 | |||
124 | $ hg rm empty-copy |
|
124 | $ hg rm empty-copy | |
125 | $ hg record -d '3 0' -m delete<<EOF |
|
125 | $ hg record -d '3 0' -m delete<<EOF | |
126 | > y |
|
126 | > y | |
127 | > EOF |
|
127 | > EOF | |
128 | diff --git a/empty-copy b/empty-copy |
|
128 | diff --git a/empty-copy b/empty-copy | |
129 | deleted file mode 100644 |
|
129 | deleted file mode 100644 | |
130 | examine changes to 'empty-copy'? [Ynesfdaq?] |
|
130 | examine changes to 'empty-copy'? [Ynesfdaq?] | |
131 |
|
131 | |||
132 | $ hg tip -p |
|
132 | $ hg tip -p | |
133 | changeset: 3:b39a238f01a1 |
|
133 | changeset: 3:b39a238f01a1 | |
134 | tag: tip |
|
134 | tag: tip | |
135 | user: test |
|
135 | user: test | |
136 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
136 | date: Thu Jan 01 00:00:03 1970 +0000 | |
137 | summary: delete |
|
137 | summary: delete | |
138 |
|
138 | |||
139 |
|
139 | |||
140 |
|
140 | |||
141 | Add binary file |
|
141 | Add binary file | |
142 |
|
142 | |||
143 | $ hg bundle --base -2 tip.bundle |
|
143 | $ hg bundle --base -2 tip.bundle | |
144 | 1 changesets found |
|
144 | 1 changesets found | |
145 | $ hg add tip.bundle |
|
145 | $ hg add tip.bundle | |
146 | $ hg record -d '4 0' -m binary<<EOF |
|
146 | $ hg record -d '4 0' -m binary<<EOF | |
147 | > y |
|
147 | > y | |
148 | > EOF |
|
148 | > EOF | |
149 | diff --git a/tip.bundle b/tip.bundle |
|
149 | diff --git a/tip.bundle b/tip.bundle | |
150 | new file mode 100644 |
|
150 | new file mode 100644 | |
151 | this is a binary file |
|
151 | this is a binary file | |
152 | examine changes to 'tip.bundle'? [Ynesfdaq?] |
|
152 | examine changes to 'tip.bundle'? [Ynesfdaq?] | |
153 |
|
153 | |||
154 | $ hg tip -p |
|
154 | $ hg tip -p | |
155 | changeset: 4:ad816da3711e |
|
155 | changeset: 4:ad816da3711e | |
156 | tag: tip |
|
156 | tag: tip | |
157 | user: test |
|
157 | user: test | |
158 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
158 | date: Thu Jan 01 00:00:04 1970 +0000 | |
159 | summary: binary |
|
159 | summary: binary | |
160 |
|
160 | |||
161 | diff -r b39a238f01a1 -r ad816da3711e tip.bundle |
|
161 | diff -r b39a238f01a1 -r ad816da3711e tip.bundle | |
162 | Binary file tip.bundle has changed |
|
162 | Binary file tip.bundle has changed | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | Change binary file |
|
165 | Change binary file | |
166 |
|
166 | |||
167 | $ hg bundle --base -2 tip.bundle |
|
167 | $ hg bundle --base -2 tip.bundle | |
168 | 1 changesets found |
|
168 | 1 changesets found | |
169 | $ hg record -d '5 0' -m binary-change<<EOF |
|
169 | $ hg record -d '5 0' -m binary-change<<EOF | |
170 | > y |
|
170 | > y | |
171 | > EOF |
|
171 | > EOF | |
172 | diff --git a/tip.bundle b/tip.bundle |
|
172 | diff --git a/tip.bundle b/tip.bundle | |
173 | this modifies a binary file (all or nothing) |
|
173 | this modifies a binary file (all or nothing) | |
174 | examine changes to 'tip.bundle'? [Ynesfdaq?] |
|
174 | examine changes to 'tip.bundle'? [Ynesfdaq?] | |
175 |
|
175 | |||
176 | $ hg tip -p |
|
176 | $ hg tip -p | |
177 | changeset: 5:dccd6f3eb485 |
|
177 | changeset: 5:dccd6f3eb485 | |
178 | tag: tip |
|
178 | tag: tip | |
179 | user: test |
|
179 | user: test | |
180 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
180 | date: Thu Jan 01 00:00:05 1970 +0000 | |
181 | summary: binary-change |
|
181 | summary: binary-change | |
182 |
|
182 | |||
183 | diff -r ad816da3711e -r dccd6f3eb485 tip.bundle |
|
183 | diff -r ad816da3711e -r dccd6f3eb485 tip.bundle | |
184 | Binary file tip.bundle has changed |
|
184 | Binary file tip.bundle has changed | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | Rename and change binary file |
|
187 | Rename and change binary file | |
188 |
|
188 | |||
189 | $ hg mv tip.bundle top.bundle |
|
189 | $ hg mv tip.bundle top.bundle | |
190 | $ hg bundle --base -2 top.bundle |
|
190 | $ hg bundle --base -2 top.bundle | |
191 | 1 changesets found |
|
191 | 1 changesets found | |
192 | $ hg record -d '6 0' -m binary-change-rename<<EOF |
|
192 | $ hg record -d '6 0' -m binary-change-rename<<EOF | |
193 | > y |
|
193 | > y | |
194 | > EOF |
|
194 | > EOF | |
195 | diff --git a/tip.bundle b/top.bundle |
|
195 | diff --git a/tip.bundle b/top.bundle | |
196 | rename from tip.bundle |
|
196 | rename from tip.bundle | |
197 | rename to top.bundle |
|
197 | rename to top.bundle | |
198 | this modifies a binary file (all or nothing) |
|
198 | this modifies a binary file (all or nothing) | |
199 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] |
|
199 | examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] | |
200 |
|
200 | |||
201 | $ hg tip -p |
|
201 | $ hg tip -p | |
202 | changeset: 6:7fa44105f5b3 |
|
202 | changeset: 6:7fa44105f5b3 | |
203 | tag: tip |
|
203 | tag: tip | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:06 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:06 1970 +0000 | |
206 | summary: binary-change-rename |
|
206 | summary: binary-change-rename | |
207 |
|
207 | |||
208 | diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle |
|
208 | diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle | |
209 | Binary file tip.bundle has changed |
|
209 | Binary file tip.bundle has changed | |
210 | diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle |
|
210 | diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle | |
211 | Binary file top.bundle has changed |
|
211 | Binary file top.bundle has changed | |
212 |
|
212 | |||
213 |
|
213 | |||
214 | Add plain file |
|
214 | Add plain file | |
215 |
|
215 | |||
216 | $ for i in 1 2 3 4 5 6 7 8 9 10; do |
|
216 | $ for i in 1 2 3 4 5 6 7 8 9 10; do | |
217 | > echo $i >> plain |
|
217 | > echo $i >> plain | |
218 | > done |
|
218 | > done | |
219 |
|
219 | |||
220 | $ hg add plain |
|
220 | $ hg add plain | |
221 | $ hg record -d '7 0' -m plain plain<<EOF |
|
221 | $ hg record -d '7 0' -m plain plain<<EOF | |
222 | > y |
|
222 | > y | |
223 | > y |
|
223 | > y | |
224 | > EOF |
|
224 | > EOF | |
225 | diff --git a/plain b/plain |
|
225 | diff --git a/plain b/plain | |
226 | new file mode 100644 |
|
226 | new file mode 100644 | |
227 | examine changes to 'plain'? [Ynesfdaq?] |
|
227 | examine changes to 'plain'? [Ynesfdaq?] | |
228 |
|
228 | |||
229 | $ hg tip -p |
|
229 | $ hg tip -p | |
230 | changeset: 7:11fb457c1be4 |
|
230 | changeset: 7:11fb457c1be4 | |
231 | tag: tip |
|
231 | tag: tip | |
232 | user: test |
|
232 | user: test | |
233 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
233 | date: Thu Jan 01 00:00:07 1970 +0000 | |
234 | summary: plain |
|
234 | summary: plain | |
235 |
|
235 | |||
236 | diff -r 7fa44105f5b3 -r 11fb457c1be4 plain |
|
236 | diff -r 7fa44105f5b3 -r 11fb457c1be4 plain | |
237 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
237 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
238 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 |
|
238 | +++ b/plain Thu Jan 01 00:00:07 1970 +0000 | |
239 | @@ -0,0 +1,10 @@ |
|
239 | @@ -0,0 +1,10 @@ | |
240 | +1 |
|
240 | +1 | |
241 | +2 |
|
241 | +2 | |
242 | +3 |
|
242 | +3 | |
243 | +4 |
|
243 | +4 | |
244 | +5 |
|
244 | +5 | |
245 | +6 |
|
245 | +6 | |
246 | +7 |
|
246 | +7 | |
247 | +8 |
|
247 | +8 | |
248 | +9 |
|
248 | +9 | |
249 | +10 |
|
249 | +10 | |
250 |
|
250 | |||
251 |
|
251 | |||
252 | Modify end of plain file |
|
252 | Modify end of plain file | |
253 |
|
253 | |||
254 | $ echo 11 >> plain |
|
254 | $ echo 11 >> plain | |
255 | $ hg record -d '8 0' -m end plain <<EOF |
|
255 | $ hg record -d '8 0' -m end plain <<EOF | |
256 | > y |
|
256 | > y | |
257 | > y |
|
257 | > y | |
258 | > EOF |
|
258 | > EOF | |
259 | diff --git a/plain b/plain |
|
259 | diff --git a/plain b/plain | |
260 | 1 hunks, 1 lines changed |
|
260 | 1 hunks, 1 lines changed | |
261 | examine changes to 'plain'? [Ynesfdaq?] |
|
261 | examine changes to 'plain'? [Ynesfdaq?] | |
262 | @@ -8,3 +8,4 @@ |
|
262 | @@ -8,3 +8,4 @@ | |
263 | 8 |
|
263 | 8 | |
264 | 9 |
|
264 | 9 | |
265 | 10 |
|
265 | 10 | |
266 | +11 |
|
266 | +11 | |
267 | record this change to 'plain'? [Ynesfdaq?] |
|
267 | record this change to 'plain'? [Ynesfdaq?] | |
268 |
|
268 | |||
269 | Modify end of plain file, no EOL |
|
269 | Modify end of plain file, no EOL | |
270 |
|
270 | |||
271 | $ hg tip --template '{node}' >> plain |
|
271 | $ hg tip --template '{node}' >> plain | |
272 | $ hg record -d '9 0' -m noeol plain <<EOF |
|
272 | $ hg record -d '9 0' -m noeol plain <<EOF | |
273 | > y |
|
273 | > y | |
274 | > y |
|
274 | > y | |
275 | > EOF |
|
275 | > EOF | |
276 | diff --git a/plain b/plain |
|
276 | diff --git a/plain b/plain | |
277 | 1 hunks, 1 lines changed |
|
277 | 1 hunks, 1 lines changed | |
278 | examine changes to 'plain'? [Ynesfdaq?] |
|
278 | examine changes to 'plain'? [Ynesfdaq?] | |
279 | @@ -9,3 +9,4 @@ |
|
279 | @@ -9,3 +9,4 @@ | |
280 | 9 |
|
280 | 9 | |
281 | 10 |
|
281 | 10 | |
282 | 11 |
|
282 | 11 | |
283 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
283 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
284 | \ No newline at end of file |
|
284 | \ No newline at end of file | |
285 | record this change to 'plain'? [Ynesfdaq?] |
|
285 | record this change to 'plain'? [Ynesfdaq?] | |
286 |
|
286 | |||
287 | Modify end of plain file, add EOL |
|
287 | Modify end of plain file, add EOL | |
288 |
|
288 | |||
289 | $ echo >> plain |
|
289 | $ echo >> plain | |
290 | $ echo 1 > plain2 |
|
290 | $ echo 1 > plain2 | |
291 | $ hg add plain2 |
|
291 | $ hg add plain2 | |
292 | $ hg record -d '10 0' -m eol plain plain2 <<EOF |
|
292 | $ hg record -d '10 0' -m eol plain plain2 <<EOF | |
293 | > y |
|
293 | > y | |
294 | > y |
|
294 | > y | |
295 | > y |
|
295 | > y | |
296 | > EOF |
|
296 | > EOF | |
297 | diff --git a/plain b/plain |
|
297 | diff --git a/plain b/plain | |
298 | 1 hunks, 1 lines changed |
|
298 | 1 hunks, 1 lines changed | |
299 | examine changes to 'plain'? [Ynesfdaq?] |
|
299 | examine changes to 'plain'? [Ynesfdaq?] | |
300 | @@ -9,4 +9,4 @@ |
|
300 | @@ -9,4 +9,4 @@ | |
301 | 9 |
|
301 | 9 | |
302 | 10 |
|
302 | 10 | |
303 | 11 |
|
303 | 11 | |
304 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
304 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
305 | \ No newline at end of file |
|
305 | \ No newline at end of file | |
306 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
306 | +7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
307 | record change 1/2 to 'plain'? [Ynesfdaq?] |
|
307 | record change 1/2 to 'plain'? [Ynesfdaq?] | |
308 | diff --git a/plain2 b/plain2 |
|
308 | diff --git a/plain2 b/plain2 | |
309 | new file mode 100644 |
|
309 | new file mode 100644 | |
310 | examine changes to 'plain2'? [Ynesfdaq?] |
|
310 | examine changes to 'plain2'? [Ynesfdaq?] | |
311 |
|
311 | |||
312 | Modify beginning, trim end, record both, add another file to test |
|
312 | Modify beginning, trim end, record both, add another file to test | |
313 | changes numbering |
|
313 | changes numbering | |
314 |
|
314 | |||
315 | $ rm plain |
|
315 | $ rm plain | |
316 | $ for i in 2 2 3 4 5 6 7 8 9 10; do |
|
316 | $ for i in 2 2 3 4 5 6 7 8 9 10; do | |
317 | > echo $i >> plain |
|
317 | > echo $i >> plain | |
318 | > done |
|
318 | > done | |
319 | $ echo 2 >> plain2 |
|
319 | $ echo 2 >> plain2 | |
320 |
|
320 | |||
321 | $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF |
|
321 | $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF | |
322 | > y |
|
322 | > y | |
323 | > y |
|
323 | > y | |
324 | > y |
|
324 | > y | |
325 | > y |
|
325 | > y | |
326 | > y |
|
326 | > y | |
327 | > EOF |
|
327 | > EOF | |
328 | diff --git a/plain b/plain |
|
328 | diff --git a/plain b/plain | |
329 | 2 hunks, 3 lines changed |
|
329 | 2 hunks, 3 lines changed | |
330 | examine changes to 'plain'? [Ynesfdaq?] |
|
330 | examine changes to 'plain'? [Ynesfdaq?] | |
331 | @@ -1,4 +1,4 @@ |
|
331 | @@ -1,4 +1,4 @@ | |
332 | -1 |
|
332 | -1 | |
333 | +2 |
|
333 | +2 | |
334 | 2 |
|
334 | 2 | |
335 | 3 |
|
335 | 3 | |
336 | 4 |
|
336 | 4 | |
337 | record change 1/3 to 'plain'? [Ynesfdaq?] |
|
337 | record change 1/3 to 'plain'? [Ynesfdaq?] | |
338 | @@ -8,5 +8,3 @@ |
|
338 | @@ -8,5 +8,3 @@ | |
339 | 8 |
|
339 | 8 | |
340 | 9 |
|
340 | 9 | |
341 | 10 |
|
341 | 10 | |
342 | -11 |
|
342 | -11 | |
343 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
343 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
344 | record change 2/3 to 'plain'? [Ynesfdaq?] |
|
344 | record change 2/3 to 'plain'? [Ynesfdaq?] | |
345 | diff --git a/plain2 b/plain2 |
|
345 | diff --git a/plain2 b/plain2 | |
346 | 1 hunks, 1 lines changed |
|
346 | 1 hunks, 1 lines changed | |
347 | examine changes to 'plain2'? [Ynesfdaq?] |
|
347 | examine changes to 'plain2'? [Ynesfdaq?] | |
348 | @@ -1,1 +1,2 @@ |
|
348 | @@ -1,1 +1,2 @@ | |
349 | 1 |
|
349 | 1 | |
350 | +2 |
|
350 | +2 | |
351 | record change 3/3 to 'plain2'? [Ynesfdaq?] |
|
351 | record change 3/3 to 'plain2'? [Ynesfdaq?] | |
352 |
|
352 | |||
353 | $ hg tip -p |
|
353 | $ hg tip -p | |
354 | changeset: 11:21df83db12b8 |
|
354 | changeset: 11:21df83db12b8 | |
355 | tag: tip |
|
355 | tag: tip | |
356 | user: test |
|
356 | user: test | |
357 | date: Thu Jan 01 00:00:10 1970 +0000 |
|
357 | date: Thu Jan 01 00:00:10 1970 +0000 | |
358 | summary: begin-and-end |
|
358 | summary: begin-and-end | |
359 |
|
359 | |||
360 | diff -r ddb8b281c3ff -r 21df83db12b8 plain |
|
360 | diff -r ddb8b281c3ff -r 21df83db12b8 plain | |
361 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
361 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 | |
362 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 |
|
362 | +++ b/plain Thu Jan 01 00:00:10 1970 +0000 | |
363 | @@ -1,4 +1,4 @@ |
|
363 | @@ -1,4 +1,4 @@ | |
364 | -1 |
|
364 | -1 | |
365 | +2 |
|
365 | +2 | |
366 | 2 |
|
366 | 2 | |
367 | 3 |
|
367 | 3 | |
368 | 4 |
|
368 | 4 | |
369 | @@ -8,5 +8,3 @@ |
|
369 | @@ -8,5 +8,3 @@ | |
370 | 8 |
|
370 | 8 | |
371 | 9 |
|
371 | 9 | |
372 | 10 |
|
372 | 10 | |
373 | -11 |
|
373 | -11 | |
374 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 |
|
374 | -7264f99c5f5ff3261504828afa4fb4d406c3af54 | |
375 | diff -r ddb8b281c3ff -r 21df83db12b8 plain2 |
|
375 | diff -r ddb8b281c3ff -r 21df83db12b8 plain2 | |
376 | --- a/plain2 Thu Jan 01 00:00:10 1970 +0000 |
|
376 | --- a/plain2 Thu Jan 01 00:00:10 1970 +0000 | |
377 | +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000 |
|
377 | +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000 | |
378 | @@ -1,1 +1,2 @@ |
|
378 | @@ -1,1 +1,2 @@ | |
379 | 1 |
|
379 | 1 | |
380 | +2 |
|
380 | +2 | |
381 |
|
381 | |||
382 |
|
382 | |||
383 | Trim beginning, modify end |
|
383 | Trim beginning, modify end | |
384 |
|
384 | |||
385 | $ rm plain |
|
385 | $ rm plain | |
386 | > for i in 4 5 6 7 8 9 10.new; do |
|
386 | > for i in 4 5 6 7 8 9 10.new; do | |
387 | > echo $i >> plain |
|
387 | > echo $i >> plain | |
388 | > done |
|
388 | > done | |
389 |
|
389 | |||
390 | Record end |
|
390 | Record end | |
391 |
|
391 | |||
392 | $ hg record -d '11 0' -m end-only plain <<EOF |
|
392 | $ hg record -d '11 0' -m end-only plain <<EOF | |
393 | > y |
|
393 | > y | |
394 | > n |
|
394 | > n | |
395 | > y |
|
395 | > y | |
396 | > EOF |
|
396 | > EOF | |
397 | diff --git a/plain b/plain |
|
397 | diff --git a/plain b/plain | |
398 | 2 hunks, 4 lines changed |
|
398 | 2 hunks, 4 lines changed | |
399 | examine changes to 'plain'? [Ynesfdaq?] |
|
399 | examine changes to 'plain'? [Ynesfdaq?] | |
400 | @@ -1,9 +1,6 @@ |
|
400 | @@ -1,9 +1,6 @@ | |
401 | -2 |
|
401 | -2 | |
402 | -2 |
|
402 | -2 | |
403 | -3 |
|
403 | -3 | |
404 | 4 |
|
404 | 4 | |
405 | 5 |
|
405 | 5 | |
406 | 6 |
|
406 | 6 | |
407 | 7 |
|
407 | 7 | |
408 | 8 |
|
408 | 8 | |
409 | 9 |
|
409 | 9 | |
410 | record change 1/2 to 'plain'? [Ynesfdaq?] |
|
410 | record change 1/2 to 'plain'? [Ynesfdaq?] | |
411 | @@ -4,7 +1,7 @@ |
|
411 | @@ -4,7 +1,7 @@ | |
412 | 4 |
|
412 | 4 | |
413 | 5 |
|
413 | 5 | |
414 | 6 |
|
414 | 6 | |
415 | 7 |
|
415 | 7 | |
416 | 8 |
|
416 | 8 | |
417 | 9 |
|
417 | 9 | |
418 | -10 |
|
418 | -10 | |
419 | +10.new |
|
419 | +10.new | |
420 | record change 2/2 to 'plain'? [Ynesfdaq?] |
|
420 | record change 2/2 to 'plain'? [Ynesfdaq?] | |
421 |
|
421 | |||
422 | $ hg tip -p |
|
422 | $ hg tip -p | |
423 | changeset: 12:99337501826f |
|
423 | changeset: 12:99337501826f | |
424 | tag: tip |
|
424 | tag: tip | |
425 | user: test |
|
425 | user: test | |
426 | date: Thu Jan 01 00:00:11 1970 +0000 |
|
426 | date: Thu Jan 01 00:00:11 1970 +0000 | |
427 | summary: end-only |
|
427 | summary: end-only | |
428 |
|
428 | |||
429 | diff -r 21df83db12b8 -r 99337501826f plain |
|
429 | diff -r 21df83db12b8 -r 99337501826f plain | |
430 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 |
|
430 | --- a/plain Thu Jan 01 00:00:10 1970 +0000 | |
431 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 |
|
431 | +++ b/plain Thu Jan 01 00:00:11 1970 +0000 | |
432 | @@ -7,4 +7,4 @@ |
|
432 | @@ -7,4 +7,4 @@ | |
433 | 7 |
|
433 | 7 | |
434 | 8 |
|
434 | 8 | |
435 | 9 |
|
435 | 9 | |
436 | -10 |
|
436 | -10 | |
437 | +10.new |
|
437 | +10.new | |
438 |
|
438 | |||
439 |
|
439 | |||
440 | Record beginning |
|
440 | Record beginning | |
441 |
|
441 | |||
442 | $ hg record -d '12 0' -m begin-only plain <<EOF |
|
442 | $ hg record -d '12 0' -m begin-only plain <<EOF | |
443 | > y |
|
443 | > y | |
444 | > y |
|
444 | > y | |
445 | > EOF |
|
445 | > EOF | |
446 | diff --git a/plain b/plain |
|
446 | diff --git a/plain b/plain | |
447 | 1 hunks, 3 lines changed |
|
447 | 1 hunks, 3 lines changed | |
448 | examine changes to 'plain'? [Ynesfdaq?] |
|
448 | examine changes to 'plain'? [Ynesfdaq?] | |
449 | @@ -1,6 +1,3 @@ |
|
449 | @@ -1,6 +1,3 @@ | |
450 | -2 |
|
450 | -2 | |
451 | -2 |
|
451 | -2 | |
452 | -3 |
|
452 | -3 | |
453 | 4 |
|
453 | 4 | |
454 | 5 |
|
454 | 5 | |
455 | 6 |
|
455 | 6 | |
456 | record this change to 'plain'? [Ynesfdaq?] |
|
456 | record this change to 'plain'? [Ynesfdaq?] | |
457 |
|
457 | |||
458 | $ hg tip -p |
|
458 | $ hg tip -p | |
459 | changeset: 13:bbd45465d540 |
|
459 | changeset: 13:bbd45465d540 | |
460 | tag: tip |
|
460 | tag: tip | |
461 | user: test |
|
461 | user: test | |
462 | date: Thu Jan 01 00:00:12 1970 +0000 |
|
462 | date: Thu Jan 01 00:00:12 1970 +0000 | |
463 | summary: begin-only |
|
463 | summary: begin-only | |
464 |
|
464 | |||
465 | diff -r 99337501826f -r bbd45465d540 plain |
|
465 | diff -r 99337501826f -r bbd45465d540 plain | |
466 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 |
|
466 | --- a/plain Thu Jan 01 00:00:11 1970 +0000 | |
467 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 |
|
467 | +++ b/plain Thu Jan 01 00:00:12 1970 +0000 | |
468 | @@ -1,6 +1,3 @@ |
|
468 | @@ -1,6 +1,3 @@ | |
469 | -2 |
|
469 | -2 | |
470 | -2 |
|
470 | -2 | |
471 | -3 |
|
471 | -3 | |
472 | 4 |
|
472 | 4 | |
473 | 5 |
|
473 | 5 | |
474 | 6 |
|
474 | 6 | |
475 |
|
475 | |||
476 |
|
476 | |||
477 | Add to beginning, trim from end |
|
477 | Add to beginning, trim from end | |
478 |
|
478 | |||
479 | $ rm plain |
|
479 | $ rm plain | |
480 | $ for i in 1 2 3 4 5 6 7 8 9; do |
|
480 | $ for i in 1 2 3 4 5 6 7 8 9; do | |
481 | > echo $i >> plain |
|
481 | > echo $i >> plain | |
482 | > done |
|
482 | > done | |
483 |
|
483 | |||
484 | Record end |
|
484 | Record end | |
485 |
|
485 | |||
486 | $ hg record --traceback -d '13 0' -m end-again plain<<EOF |
|
486 | $ hg record --traceback -d '13 0' -m end-again plain<<EOF | |
487 | > y |
|
487 | > y | |
488 | > n |
|
488 | > n | |
489 | > y |
|
489 | > y | |
490 | > EOF |
|
490 | > EOF | |
491 | diff --git a/plain b/plain |
|
491 | diff --git a/plain b/plain | |
492 | 2 hunks, 4 lines changed |
|
492 | 2 hunks, 4 lines changed | |
493 | examine changes to 'plain'? [Ynesfdaq?] |
|
493 | examine changes to 'plain'? [Ynesfdaq?] | |
494 | @@ -1,6 +1,9 @@ |
|
494 | @@ -1,6 +1,9 @@ | |
495 | +1 |
|
495 | +1 | |
496 | +2 |
|
496 | +2 | |
497 | +3 |
|
497 | +3 | |
498 | 4 |
|
498 | 4 | |
499 | 5 |
|
499 | 5 | |
500 | 6 |
|
500 | 6 | |
501 | 7 |
|
501 | 7 | |
502 | 8 |
|
502 | 8 | |
503 | 9 |
|
503 | 9 | |
504 | record change 1/2 to 'plain'? [Ynesfdaq?] |
|
504 | record change 1/2 to 'plain'? [Ynesfdaq?] | |
505 | @@ -1,7 +4,6 @@ |
|
505 | @@ -1,7 +4,6 @@ | |
506 | 4 |
|
506 | 4 | |
507 | 5 |
|
507 | 5 | |
508 | 6 |
|
508 | 6 | |
509 | 7 |
|
509 | 7 | |
510 | 8 |
|
510 | 8 | |
511 | 9 |
|
511 | 9 | |
512 | -10.new |
|
512 | -10.new | |
513 | record change 2/2 to 'plain'? [Ynesfdaq?] |
|
513 | record change 2/2 to 'plain'? [Ynesfdaq?] | |
514 |
|
514 | |||
515 | Add to beginning, middle, end |
|
515 | Add to beginning, middle, end | |
516 |
|
516 | |||
517 | $ rm plain |
|
517 | $ rm plain | |
518 | $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do |
|
518 | $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do | |
519 | > echo $i >> plain |
|
519 | > echo $i >> plain | |
520 | > done |
|
520 | > done | |
521 |
|
521 | |||
522 | Record beginning, middle |
|
522 | Record beginning, middle | |
523 |
|
523 | |||
524 | $ hg record -d '14 0' -m middle-only plain <<EOF |
|
524 | $ hg record -d '14 0' -m middle-only plain <<EOF | |
525 | > y |
|
525 | > y | |
526 | > y |
|
526 | > y | |
527 | > y |
|
527 | > y | |
528 | > n |
|
528 | > n | |
529 | > EOF |
|
529 | > EOF | |
530 | diff --git a/plain b/plain |
|
530 | diff --git a/plain b/plain | |
531 | 3 hunks, 7 lines changed |
|
531 | 3 hunks, 7 lines changed | |
532 | examine changes to 'plain'? [Ynesfdaq?] |
|
532 | examine changes to 'plain'? [Ynesfdaq?] | |
533 | @@ -1,2 +1,5 @@ |
|
533 | @@ -1,2 +1,5 @@ | |
534 | +1 |
|
534 | +1 | |
535 | +2 |
|
535 | +2 | |
536 | +3 |
|
536 | +3 | |
537 | 4 |
|
537 | 4 | |
538 | 5 |
|
538 | 5 | |
539 | record change 1/3 to 'plain'? [Ynesfdaq?] |
|
539 | record change 1/3 to 'plain'? [Ynesfdaq?] | |
540 | @@ -1,6 +4,8 @@ |
|
540 | @@ -1,6 +4,8 @@ | |
541 | 4 |
|
541 | 4 | |
542 | 5 |
|
542 | 5 | |
543 | +5.new |
|
543 | +5.new | |
544 | +5.reallynew |
|
544 | +5.reallynew | |
545 | 6 |
|
545 | 6 | |
546 | 7 |
|
546 | 7 | |
547 | 8 |
|
547 | 8 | |
548 | 9 |
|
548 | 9 | |
549 | record change 2/3 to 'plain'? [Ynesfdaq?] |
|
549 | record change 2/3 to 'plain'? [Ynesfdaq?] | |
550 | @@ -3,4 +8,6 @@ |
|
550 | @@ -3,4 +8,6 @@ | |
551 | 6 |
|
551 | 6 | |
552 | 7 |
|
552 | 7 | |
553 | 8 |
|
553 | 8 | |
554 | 9 |
|
554 | 9 | |
555 | +10 |
|
555 | +10 | |
556 | +11 |
|
556 | +11 | |
557 | record change 3/3 to 'plain'? [Ynesfdaq?] |
|
557 | record change 3/3 to 'plain'? [Ynesfdaq?] | |
558 |
|
558 | |||
559 | $ hg tip -p |
|
559 | $ hg tip -p | |
560 | changeset: 15:f34a7937ec33 |
|
560 | changeset: 15:f34a7937ec33 | |
561 | tag: tip |
|
561 | tag: tip | |
562 | user: test |
|
562 | user: test | |
563 | date: Thu Jan 01 00:00:14 1970 +0000 |
|
563 | date: Thu Jan 01 00:00:14 1970 +0000 | |
564 | summary: middle-only |
|
564 | summary: middle-only | |
565 |
|
565 | |||
566 | diff -r 82c065d0b850 -r f34a7937ec33 plain |
|
566 | diff -r 82c065d0b850 -r f34a7937ec33 plain | |
567 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 |
|
567 | --- a/plain Thu Jan 01 00:00:13 1970 +0000 | |
568 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 |
|
568 | +++ b/plain Thu Jan 01 00:00:14 1970 +0000 | |
569 | @@ -1,5 +1,10 @@ |
|
569 | @@ -1,5 +1,10 @@ | |
570 | +1 |
|
570 | +1 | |
571 | +2 |
|
571 | +2 | |
572 | +3 |
|
572 | +3 | |
573 | 4 |
|
573 | 4 | |
574 | 5 |
|
574 | 5 | |
575 | +5.new |
|
575 | +5.new | |
576 | +5.reallynew |
|
576 | +5.reallynew | |
577 | 6 |
|
577 | 6 | |
578 | 7 |
|
578 | 7 | |
579 | 8 |
|
579 | 8 | |
580 |
|
580 | |||
581 |
|
581 | |||
582 | Record end |
|
582 | Record end | |
583 |
|
583 | |||
584 | $ hg record -d '15 0' -m end-only plain <<EOF |
|
584 | $ hg record -d '15 0' -m end-only plain <<EOF | |
585 | > y |
|
585 | > y | |
586 | > y |
|
586 | > y | |
587 | > EOF |
|
587 | > EOF | |
588 | diff --git a/plain b/plain |
|
588 | diff --git a/plain b/plain | |
589 | 1 hunks, 2 lines changed |
|
589 | 1 hunks, 2 lines changed | |
590 | examine changes to 'plain'? [Ynesfdaq?] |
|
590 | examine changes to 'plain'? [Ynesfdaq?] | |
591 | @@ -9,3 +9,5 @@ |
|
591 | @@ -9,3 +9,5 @@ | |
592 | 7 |
|
592 | 7 | |
593 | 8 |
|
593 | 8 | |
594 | 9 |
|
594 | 9 | |
595 | +10 |
|
595 | +10 | |
596 | +11 |
|
596 | +11 | |
597 | record this change to 'plain'? [Ynesfdaq?] |
|
597 | record this change to 'plain'? [Ynesfdaq?] | |
598 |
|
598 | |||
599 | $ hg tip -p |
|
599 | $ hg tip -p | |
600 | changeset: 16:f9900b71a04c |
|
600 | changeset: 16:f9900b71a04c | |
601 | tag: tip |
|
601 | tag: tip | |
602 | user: test |
|
602 | user: test | |
603 | date: Thu Jan 01 00:00:15 1970 +0000 |
|
603 | date: Thu Jan 01 00:00:15 1970 +0000 | |
604 | summary: end-only |
|
604 | summary: end-only | |
605 |
|
605 | |||
606 | diff -r f34a7937ec33 -r f9900b71a04c plain |
|
606 | diff -r f34a7937ec33 -r f9900b71a04c plain | |
607 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 |
|
607 | --- a/plain Thu Jan 01 00:00:14 1970 +0000 | |
608 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 |
|
608 | +++ b/plain Thu Jan 01 00:00:15 1970 +0000 | |
609 | @@ -9,3 +9,5 @@ |
|
609 | @@ -9,3 +9,5 @@ | |
610 | 7 |
|
610 | 7 | |
611 | 8 |
|
611 | 8 | |
612 | 9 |
|
612 | 9 | |
613 | +10 |
|
613 | +10 | |
614 | +11 |
|
614 | +11 | |
615 |
|
615 | |||
616 |
|
616 | |||
617 | $ mkdir subdir |
|
617 | $ mkdir subdir | |
618 | $ cd subdir |
|
618 | $ cd subdir | |
619 | $ echo a > a |
|
619 | $ echo a > a | |
620 | $ hg ci -d '16 0' -Amsubdir |
|
620 | $ hg ci -d '16 0' -Amsubdir | |
621 | adding subdir/a |
|
621 | adding subdir/a | |
622 |
|
622 | |||
623 | $ echo a >> a |
|
623 | $ echo a >> a | |
624 | $ hg record -d '16 0' -m subdir-change a <<EOF |
|
624 | $ hg record -d '16 0' -m subdir-change a <<EOF | |
625 | > y |
|
625 | > y | |
626 | > y |
|
626 | > y | |
627 | > EOF |
|
627 | > EOF | |
628 | diff --git a/subdir/a b/subdir/a |
|
628 | diff --git a/subdir/a b/subdir/a | |
629 | 1 hunks, 1 lines changed |
|
629 | 1 hunks, 1 lines changed | |
630 | examine changes to 'subdir/a'? [Ynesfdaq?] |
|
630 | examine changes to 'subdir/a'? [Ynesfdaq?] | |
631 | @@ -1,1 +1,2 @@ |
|
631 | @@ -1,1 +1,2 @@ | |
632 | a |
|
632 | a | |
633 | +a |
|
633 | +a | |
634 | record this change to 'subdir/a'? [Ynesfdaq?] |
|
634 | record this change to 'subdir/a'? [Ynesfdaq?] | |
635 |
|
635 | |||
636 | $ hg tip -p |
|
636 | $ hg tip -p | |
637 | changeset: 18:61be427a9deb |
|
637 | changeset: 18:61be427a9deb | |
638 | tag: tip |
|
638 | tag: tip | |
639 | user: test |
|
639 | user: test | |
640 | date: Thu Jan 01 00:00:16 1970 +0000 |
|
640 | date: Thu Jan 01 00:00:16 1970 +0000 | |
641 | summary: subdir-change |
|
641 | summary: subdir-change | |
642 |
|
642 | |||
643 | diff -r a7ffae4d61cb -r 61be427a9deb subdir/a |
|
643 | diff -r a7ffae4d61cb -r 61be427a9deb subdir/a | |
644 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
644 | --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000 | |
645 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 |
|
645 | +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000 | |
646 | @@ -1,1 +1,2 @@ |
|
646 | @@ -1,1 +1,2 @@ | |
647 | a |
|
647 | a | |
648 | +a |
|
648 | +a | |
649 |
|
649 | |||
650 |
|
650 | |||
651 | $ echo a > f1 |
|
651 | $ echo a > f1 | |
652 | $ echo b > f2 |
|
652 | $ echo b > f2 | |
653 | $ hg add f1 f2 |
|
653 | $ hg add f1 f2 | |
654 |
|
654 | |||
655 | $ hg ci -mz -d '17 0' |
|
655 | $ hg ci -mz -d '17 0' | |
656 |
|
656 | |||
657 | $ echo a >> f1 |
|
657 | $ echo a >> f1 | |
658 | $ echo b >> f2 |
|
658 | $ echo b >> f2 | |
659 |
|
659 | |||
660 | Help, quit |
|
660 | Help, quit | |
661 |
|
661 | |||
662 | $ hg record <<EOF |
|
662 | $ hg record <<EOF | |
663 | > ? |
|
663 | > ? | |
664 | > q |
|
664 | > q | |
665 | > EOF |
|
665 | > EOF | |
666 | diff --git a/subdir/f1 b/subdir/f1 |
|
666 | diff --git a/subdir/f1 b/subdir/f1 | |
667 | 1 hunks, 1 lines changed |
|
667 | 1 hunks, 1 lines changed | |
668 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
668 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
669 | y - record this change |
|
669 | y - record this change | |
670 | n - skip this change |
|
670 | n - skip this change | |
671 | e - edit this change manually |
|
671 | e - edit this change manually | |
672 | s - skip remaining changes to this file |
|
672 | s - skip remaining changes to this file | |
673 | f - record remaining changes to this file |
|
673 | f - record remaining changes to this file | |
674 | d - done, skip remaining changes and files |
|
674 | d - done, skip remaining changes and files | |
675 | a - record all changes to all remaining files |
|
675 | a - record all changes to all remaining files | |
676 | q - quit, recording no changes |
|
676 | q - quit, recording no changes | |
677 | ? - display help |
|
677 | ? - display help | |
678 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
678 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
679 | abort: user quit |
|
679 | abort: user quit | |
680 | [255] |
|
680 | [255] | |
681 |
|
681 | |||
682 | Skip |
|
682 | Skip | |
683 |
|
683 | |||
684 | $ hg record <<EOF |
|
684 | $ hg record <<EOF | |
685 | > s |
|
685 | > s | |
686 | > EOF |
|
686 | > EOF | |
687 | diff --git a/subdir/f1 b/subdir/f1 |
|
687 | diff --git a/subdir/f1 b/subdir/f1 | |
688 | 1 hunks, 1 lines changed |
|
688 | 1 hunks, 1 lines changed | |
689 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
689 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
690 | diff --git a/subdir/f2 b/subdir/f2 |
|
690 | diff --git a/subdir/f2 b/subdir/f2 | |
691 | 1 hunks, 1 lines changed |
|
691 | 1 hunks, 1 lines changed | |
692 | examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected |
|
692 | examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected | |
693 | [255] |
|
693 | [255] | |
694 |
|
694 | |||
695 | No |
|
695 | No | |
696 |
|
696 | |||
697 | $ hg record <<EOF |
|
697 | $ hg record <<EOF | |
698 | > n |
|
698 | > n | |
699 | > EOF |
|
699 | > EOF | |
700 | diff --git a/subdir/f1 b/subdir/f1 |
|
700 | diff --git a/subdir/f1 b/subdir/f1 | |
701 | 1 hunks, 1 lines changed |
|
701 | 1 hunks, 1 lines changed | |
702 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
702 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
703 | diff --git a/subdir/f2 b/subdir/f2 |
|
703 | diff --git a/subdir/f2 b/subdir/f2 | |
704 | 1 hunks, 1 lines changed |
|
704 | 1 hunks, 1 lines changed | |
705 | examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected |
|
705 | examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected | |
706 | [255] |
|
706 | [255] | |
707 |
|
707 | |||
708 | f, quit |
|
708 | f, quit | |
709 |
|
709 | |||
710 | $ hg record <<EOF |
|
710 | $ hg record <<EOF | |
711 | > f |
|
711 | > f | |
712 | > q |
|
712 | > q | |
713 | > EOF |
|
713 | > EOF | |
714 | diff --git a/subdir/f1 b/subdir/f1 |
|
714 | diff --git a/subdir/f1 b/subdir/f1 | |
715 | 1 hunks, 1 lines changed |
|
715 | 1 hunks, 1 lines changed | |
716 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
716 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
717 | diff --git a/subdir/f2 b/subdir/f2 |
|
717 | diff --git a/subdir/f2 b/subdir/f2 | |
718 | 1 hunks, 1 lines changed |
|
718 | 1 hunks, 1 lines changed | |
719 | examine changes to 'subdir/f2'? [Ynesfdaq?] |
|
719 | examine changes to 'subdir/f2'? [Ynesfdaq?] | |
720 | abort: user quit |
|
720 | abort: user quit | |
721 | [255] |
|
721 | [255] | |
722 |
|
722 | |||
723 | s, all |
|
723 | s, all | |
724 |
|
724 | |||
725 | $ hg record -d '18 0' -mx <<EOF |
|
725 | $ hg record -d '18 0' -mx <<EOF | |
726 | > s |
|
726 | > s | |
727 | > a |
|
727 | > a | |
728 | > EOF |
|
728 | > EOF | |
729 | diff --git a/subdir/f1 b/subdir/f1 |
|
729 | diff --git a/subdir/f1 b/subdir/f1 | |
730 | 1 hunks, 1 lines changed |
|
730 | 1 hunks, 1 lines changed | |
731 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
731 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
732 | diff --git a/subdir/f2 b/subdir/f2 |
|
732 | diff --git a/subdir/f2 b/subdir/f2 | |
733 | 1 hunks, 1 lines changed |
|
733 | 1 hunks, 1 lines changed | |
734 | examine changes to 'subdir/f2'? [Ynesfdaq?] |
|
734 | examine changes to 'subdir/f2'? [Ynesfdaq?] | |
735 |
|
735 | |||
736 | $ hg tip -p |
|
736 | $ hg tip -p | |
737 | changeset: 20:b3df3dda369a |
|
737 | changeset: 20:b3df3dda369a | |
738 | tag: tip |
|
738 | tag: tip | |
739 | user: test |
|
739 | user: test | |
740 | date: Thu Jan 01 00:00:18 1970 +0000 |
|
740 | date: Thu Jan 01 00:00:18 1970 +0000 | |
741 | summary: x |
|
741 | summary: x | |
742 |
|
742 | |||
743 | diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2 |
|
743 | diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2 | |
744 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 |
|
744 | --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000 | |
745 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 |
|
745 | +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000 | |
746 | @@ -1,1 +1,2 @@ |
|
746 | @@ -1,1 +1,2 @@ | |
747 | b |
|
747 | b | |
748 | +b |
|
748 | +b | |
749 |
|
749 | |||
750 |
|
750 | |||
751 | f |
|
751 | f | |
752 |
|
752 | |||
753 | $ hg record -d '19 0' -my <<EOF |
|
753 | $ hg record -d '19 0' -my <<EOF | |
754 | > f |
|
754 | > f | |
755 | > EOF |
|
755 | > EOF | |
756 | diff --git a/subdir/f1 b/subdir/f1 |
|
756 | diff --git a/subdir/f1 b/subdir/f1 | |
757 | 1 hunks, 1 lines changed |
|
757 | 1 hunks, 1 lines changed | |
758 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
758 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
759 |
|
759 | |||
760 | $ hg tip -p |
|
760 | $ hg tip -p | |
761 | changeset: 21:38ec577f126b |
|
761 | changeset: 21:38ec577f126b | |
762 | tag: tip |
|
762 | tag: tip | |
763 | user: test |
|
763 | user: test | |
764 | date: Thu Jan 01 00:00:19 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:19 1970 +0000 | |
765 | summary: y |
|
765 | summary: y | |
766 |
|
766 | |||
767 | diff -r b3df3dda369a -r 38ec577f126b subdir/f1 |
|
767 | diff -r b3df3dda369a -r 38ec577f126b subdir/f1 | |
768 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 |
|
768 | --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000 | |
769 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 |
|
769 | +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000 | |
770 | @@ -1,1 +1,2 @@ |
|
770 | @@ -1,1 +1,2 @@ | |
771 | a |
|
771 | a | |
772 | +a |
|
772 | +a | |
773 |
|
773 | |||
774 |
|
774 | |||
|
775 | #if execbit | |||
|
776 | ||||
775 | Preserve chmod +x |
|
777 | Preserve chmod +x | |
776 |
|
778 | |||
777 | $ chmod +x f1 |
|
779 | $ chmod +x f1 | |
778 | $ echo a >> f1 |
|
780 | $ echo a >> f1 | |
779 | $ hg record -d '20 0' -mz <<EOF |
|
781 | $ hg record -d '20 0' -mz <<EOF | |
780 | > y |
|
782 | > y | |
781 | > y |
|
783 | > y | |
782 | > y |
|
784 | > y | |
783 | > EOF |
|
785 | > EOF | |
784 | diff --git a/subdir/f1 b/subdir/f1 |
|
786 | diff --git a/subdir/f1 b/subdir/f1 | |
785 | old mode 100644 |
|
787 | old mode 100644 | |
786 | new mode 100755 |
|
788 | new mode 100755 | |
787 | 1 hunks, 1 lines changed |
|
789 | 1 hunks, 1 lines changed | |
788 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
790 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
789 | @@ -1,2 +1,3 @@ |
|
791 | @@ -1,2 +1,3 @@ | |
790 | a |
|
792 | a | |
791 | a |
|
793 | a | |
792 | +a |
|
794 | +a | |
793 | record this change to 'subdir/f1'? [Ynesfdaq?] |
|
795 | record this change to 'subdir/f1'? [Ynesfdaq?] | |
794 |
|
796 | |||
795 | $ hg tip --config diff.git=True -p |
|
797 | $ hg tip --config diff.git=True -p | |
796 | changeset: 22:3261adceb075 |
|
798 | changeset: 22:3261adceb075 | |
797 | tag: tip |
|
799 | tag: tip | |
798 | user: test |
|
800 | user: test | |
799 | date: Thu Jan 01 00:00:20 1970 +0000 |
|
801 | date: Thu Jan 01 00:00:20 1970 +0000 | |
800 | summary: z |
|
802 | summary: z | |
801 |
|
803 | |||
802 | diff --git a/subdir/f1 b/subdir/f1 |
|
804 | diff --git a/subdir/f1 b/subdir/f1 | |
803 | old mode 100644 |
|
805 | old mode 100644 | |
804 | new mode 100755 |
|
806 | new mode 100755 | |
805 | --- a/subdir/f1 |
|
807 | --- a/subdir/f1 | |
806 | +++ b/subdir/f1 |
|
808 | +++ b/subdir/f1 | |
807 | @@ -1,2 +1,3 @@ |
|
809 | @@ -1,2 +1,3 @@ | |
808 | a |
|
810 | a | |
809 | a |
|
811 | a | |
810 | +a |
|
812 | +a | |
811 |
|
813 | |||
812 |
|
814 | |||
813 | Preserve execute permission on original |
|
815 | Preserve execute permission on original | |
814 |
|
816 | |||
815 | $ echo b >> f1 |
|
817 | $ echo b >> f1 | |
816 | $ hg record -d '21 0' -maa <<EOF |
|
818 | $ hg record -d '21 0' -maa <<EOF | |
817 | > y |
|
819 | > y | |
818 | > y |
|
820 | > y | |
819 | > y |
|
821 | > y | |
820 | > EOF |
|
822 | > EOF | |
821 | diff --git a/subdir/f1 b/subdir/f1 |
|
823 | diff --git a/subdir/f1 b/subdir/f1 | |
822 | 1 hunks, 1 lines changed |
|
824 | 1 hunks, 1 lines changed | |
823 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
825 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
824 | @@ -1,3 +1,4 @@ |
|
826 | @@ -1,3 +1,4 @@ | |
825 | a |
|
827 | a | |
826 | a |
|
828 | a | |
827 | a |
|
829 | a | |
828 | +b |
|
830 | +b | |
829 | record this change to 'subdir/f1'? [Ynesfdaq?] |
|
831 | record this change to 'subdir/f1'? [Ynesfdaq?] | |
830 |
|
832 | |||
831 | $ hg tip --config diff.git=True -p |
|
833 | $ hg tip --config diff.git=True -p | |
832 | changeset: 23:b429867550db |
|
834 | changeset: 23:b429867550db | |
833 | tag: tip |
|
835 | tag: tip | |
834 | user: test |
|
836 | user: test | |
835 | date: Thu Jan 01 00:00:21 1970 +0000 |
|
837 | date: Thu Jan 01 00:00:21 1970 +0000 | |
836 | summary: aa |
|
838 | summary: aa | |
837 |
|
839 | |||
838 | diff --git a/subdir/f1 b/subdir/f1 |
|
840 | diff --git a/subdir/f1 b/subdir/f1 | |
839 | --- a/subdir/f1 |
|
841 | --- a/subdir/f1 | |
840 | +++ b/subdir/f1 |
|
842 | +++ b/subdir/f1 | |
841 | @@ -1,3 +1,4 @@ |
|
843 | @@ -1,3 +1,4 @@ | |
842 | a |
|
844 | a | |
843 | a |
|
845 | a | |
844 | a |
|
846 | a | |
845 | +b |
|
847 | +b | |
846 |
|
848 | |||
847 |
|
849 | |||
848 | Preserve chmod -x |
|
850 | Preserve chmod -x | |
849 |
|
851 | |||
850 | $ chmod -x f1 |
|
852 | $ chmod -x f1 | |
851 | $ echo c >> f1 |
|
853 | $ echo c >> f1 | |
852 | $ hg record -d '22 0' -mab <<EOF |
|
854 | $ hg record -d '22 0' -mab <<EOF | |
853 | > y |
|
855 | > y | |
854 | > y |
|
856 | > y | |
855 | > y |
|
857 | > y | |
856 | > EOF |
|
858 | > EOF | |
857 | diff --git a/subdir/f1 b/subdir/f1 |
|
859 | diff --git a/subdir/f1 b/subdir/f1 | |
858 | old mode 100755 |
|
860 | old mode 100755 | |
859 | new mode 100644 |
|
861 | new mode 100644 | |
860 | 1 hunks, 1 lines changed |
|
862 | 1 hunks, 1 lines changed | |
861 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
863 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
862 | @@ -2,3 +2,4 @@ |
|
864 | @@ -2,3 +2,4 @@ | |
863 | a |
|
865 | a | |
864 | a |
|
866 | a | |
865 | b |
|
867 | b | |
866 | +c |
|
868 | +c | |
867 | record this change to 'subdir/f1'? [Ynesfdaq?] |
|
869 | record this change to 'subdir/f1'? [Ynesfdaq?] | |
868 |
|
870 | |||
869 | $ hg tip --config diff.git=True -p |
|
871 | $ hg tip --config diff.git=True -p | |
870 | changeset: 24:0b082130c20a |
|
872 | changeset: 24:0b082130c20a | |
871 | tag: tip |
|
873 | tag: tip | |
872 | user: test |
|
874 | user: test | |
873 | date: Thu Jan 01 00:00:22 1970 +0000 |
|
875 | date: Thu Jan 01 00:00:22 1970 +0000 | |
874 | summary: ab |
|
876 | summary: ab | |
875 |
|
877 | |||
876 | diff --git a/subdir/f1 b/subdir/f1 |
|
878 | diff --git a/subdir/f1 b/subdir/f1 | |
877 | old mode 100755 |
|
879 | old mode 100755 | |
878 | new mode 100644 |
|
880 | new mode 100644 | |
879 | --- a/subdir/f1 |
|
881 | --- a/subdir/f1 | |
880 | +++ b/subdir/f1 |
|
882 | +++ b/subdir/f1 | |
881 | @@ -2,3 +2,4 @@ |
|
883 | @@ -2,3 +2,4 @@ | |
882 | a |
|
884 | a | |
883 | a |
|
885 | a | |
884 | b |
|
886 | b | |
885 | +c |
|
887 | +c | |
886 |
|
888 | |||
887 |
|
889 | |||
|
890 | #else | |||
|
891 | ||||
|
892 | Slightly bogus tests to get almost same repo structure as when x bit is used | |||
|
893 | - but with different hashes. | |||
|
894 | ||||
|
895 | Mock "Preserve chmod +x" | |||
|
896 | ||||
|
897 | $ echo a >> f1 | |||
|
898 | $ hg record -d '20 0' -mz <<EOF | |||
|
899 | > y | |||
|
900 | > y | |||
|
901 | > y | |||
|
902 | > EOF | |||
|
903 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
904 | 1 hunks, 1 lines changed | |||
|
905 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |||
|
906 | @@ -1,2 +1,3 @@ | |||
|
907 | a | |||
|
908 | a | |||
|
909 | +a | |||
|
910 | record this change to 'subdir/f1'? [Ynesfdaq?] | |||
|
911 | ||||
|
912 | $ hg tip --config diff.git=True -p | |||
|
913 | changeset: 22:0d463bd428f5 | |||
|
914 | tag: tip | |||
|
915 | user: test | |||
|
916 | date: Thu Jan 01 00:00:20 1970 +0000 | |||
|
917 | summary: z | |||
|
918 | ||||
|
919 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
920 | --- a/subdir/f1 | |||
|
921 | +++ b/subdir/f1 | |||
|
922 | @@ -1,2 +1,3 @@ | |||
|
923 | a | |||
|
924 | a | |||
|
925 | +a | |||
|
926 | ||||
|
927 | ||||
|
928 | Mock "Preserve execute permission on original" | |||
|
929 | ||||
|
930 | $ echo b >> f1 | |||
|
931 | $ hg record -d '21 0' -maa <<EOF | |||
|
932 | > y | |||
|
933 | > y | |||
|
934 | > y | |||
|
935 | > EOF | |||
|
936 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
937 | 1 hunks, 1 lines changed | |||
|
938 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |||
|
939 | @@ -1,3 +1,4 @@ | |||
|
940 | a | |||
|
941 | a | |||
|
942 | a | |||
|
943 | +b | |||
|
944 | record this change to 'subdir/f1'? [Ynesfdaq?] | |||
|
945 | ||||
|
946 | $ hg tip --config diff.git=True -p | |||
|
947 | changeset: 23:0eab41a3e524 | |||
|
948 | tag: tip | |||
|
949 | user: test | |||
|
950 | date: Thu Jan 01 00:00:21 1970 +0000 | |||
|
951 | summary: aa | |||
|
952 | ||||
|
953 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
954 | --- a/subdir/f1 | |||
|
955 | +++ b/subdir/f1 | |||
|
956 | @@ -1,3 +1,4 @@ | |||
|
957 | a | |||
|
958 | a | |||
|
959 | a | |||
|
960 | +b | |||
|
961 | ||||
|
962 | ||||
|
963 | Mock "Preserve chmod -x" | |||
|
964 | ||||
|
965 | $ chmod -x f1 | |||
|
966 | $ echo c >> f1 | |||
|
967 | $ hg record -d '22 0' -mab <<EOF | |||
|
968 | > y | |||
|
969 | > y | |||
|
970 | > y | |||
|
971 | > EOF | |||
|
972 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
973 | 1 hunks, 1 lines changed | |||
|
974 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |||
|
975 | @@ -2,3 +2,4 @@ | |||
|
976 | a | |||
|
977 | a | |||
|
978 | b | |||
|
979 | +c | |||
|
980 | record this change to 'subdir/f1'? [Ynesfdaq?] | |||
|
981 | ||||
|
982 | $ hg tip --config diff.git=True -p | |||
|
983 | changeset: 24:f4f718f27b7c | |||
|
984 | tag: tip | |||
|
985 | user: test | |||
|
986 | date: Thu Jan 01 00:00:22 1970 +0000 | |||
|
987 | summary: ab | |||
|
988 | ||||
|
989 | diff --git a/subdir/f1 b/subdir/f1 | |||
|
990 | --- a/subdir/f1 | |||
|
991 | +++ b/subdir/f1 | |||
|
992 | @@ -2,3 +2,4 @@ | |||
|
993 | a | |||
|
994 | a | |||
|
995 | b | |||
|
996 | +c | |||
|
997 | ||||
|
998 | ||||
|
999 | #endif | |||
|
1000 | ||||
888 | $ cd .. |
|
1001 | $ cd .. | |
889 |
|
1002 | |||
|
1003 | ||||
890 | Abort early when a merge is in progress |
|
1004 | Abort early when a merge is in progress | |
891 |
|
1005 | |||
892 | $ hg up 4 |
|
1006 | $ hg up 4 | |
893 | 1 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
1007 | 1 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
894 |
|
1008 | |||
895 | $ touch iwillmergethat |
|
1009 | $ touch iwillmergethat | |
896 | $ hg add iwillmergethat |
|
1010 | $ hg add iwillmergethat | |
897 |
|
1011 | |||
898 | $ hg branch thatbranch |
|
1012 | $ hg branch thatbranch | |
899 | marked working directory as branch thatbranch |
|
1013 | marked working directory as branch thatbranch | |
900 | (branches are permanent and global, did you want a bookmark?) |
|
1014 | (branches are permanent and global, did you want a bookmark?) | |
901 |
|
1015 | |||
902 | $ hg ci -m'new head' |
|
1016 | $ hg ci -m'new head' | |
903 |
|
1017 | |||
904 | $ hg up default |
|
1018 | $ hg up default | |
905 | 6 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1019 | 6 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
906 |
|
1020 | |||
907 | $ hg merge thatbranch |
|
1021 | $ hg merge thatbranch | |
908 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1022 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
909 | (branch merge, don't forget to commit) |
|
1023 | (branch merge, don't forget to commit) | |
910 |
|
1024 | |||
911 | $ hg record -m'will abort' |
|
1025 | $ hg record -m'will abort' | |
912 | abort: cannot partially commit a merge (use "hg commit" instead) |
|
1026 | abort: cannot partially commit a merge (use "hg commit" instead) | |
913 | [255] |
|
1027 | [255] | |
914 |
|
1028 | |||
915 | $ hg up -C |
|
1029 | $ hg up -C | |
916 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1030 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
917 |
|
1031 | |||
918 | Editing patch |
|
1032 | Editing patch | |
919 |
|
1033 | |||
920 | $ cat > editor << '__EOF__' |
|
1034 | $ cat > editor << '__EOF__' | |
921 | > #!/bin/sh |
|
1035 | > #!/bin/sh | |
922 | > sed -e 7d -e '5s/^-/ /' "$1" > tmp |
|
1036 | > sed -e 7d -e '5s/^-/ /' "$1" > tmp | |
923 | > mv tmp "$1" |
|
1037 | > mv tmp "$1" | |
924 | > __EOF__ |
|
1038 | > __EOF__ | |
925 | $ chmod +x editor |
|
1039 | $ chmod +x editor | |
926 | $ cat > editedfile << '__EOF__' |
|
1040 | $ cat > editedfile << '__EOF__' | |
927 | > This is the first line |
|
1041 | > This is the first line | |
928 | > This is the second line |
|
1042 | > This is the second line | |
929 | > This is the third line |
|
1043 | > This is the third line | |
930 | > __EOF__ |
|
1044 | > __EOF__ | |
931 | $ hg add editedfile |
|
1045 | $ hg add editedfile | |
932 | $ hg commit -medit-patch-1 |
|
1046 | $ hg commit -medit-patch-1 | |
933 | $ cat > editedfile << '__EOF__' |
|
1047 | $ cat > editedfile << '__EOF__' | |
934 | > This line has changed |
|
1048 | > This line has changed | |
935 | > This change will be committed |
|
1049 | > This change will be committed | |
936 | > This is the third line |
|
1050 | > This is the third line | |
937 | > __EOF__ |
|
1051 | > __EOF__ | |
938 | $ HGEDITOR="'`pwd`'"/editor hg record -d '23 0' -medit-patch-2 <<EOF |
|
1052 | $ HGEDITOR="'`pwd`'"/editor hg record -d '23 0' -medit-patch-2 <<EOF | |
939 | > y |
|
1053 | > y | |
940 | > e |
|
1054 | > e | |
941 | > EOF |
|
1055 | > EOF | |
942 | diff --git a/editedfile b/editedfile |
|
1056 | diff --git a/editedfile b/editedfile | |
943 | 1 hunks, 2 lines changed |
|
1057 | 1 hunks, 2 lines changed | |
944 | examine changes to 'editedfile'? [Ynesfdaq?] |
|
1058 | examine changes to 'editedfile'? [Ynesfdaq?] | |
945 | @@ -1,3 +1,3 @@ |
|
1059 | @@ -1,3 +1,3 @@ | |
946 | -This is the first line |
|
1060 | -This is the first line | |
947 | -This is the second line |
|
1061 | -This is the second line | |
948 | +This line has changed |
|
1062 | +This line has changed | |
949 | +This change will be committed |
|
1063 | +This change will be committed | |
950 | This is the third line |
|
1064 | This is the third line | |
951 | record this change to 'editedfile'? [Ynesfdaq?] |
|
1065 | record this change to 'editedfile'? [Ynesfdaq?] | |
952 | $ cat editedfile |
|
1066 | $ cat editedfile | |
953 | This line has changed |
|
1067 | This line has changed | |
954 | This change will be committed |
|
1068 | This change will be committed | |
955 | This is the third line |
|
1069 | This is the third line | |
956 | $ hg cat -r tip editedfile |
|
1070 | $ hg cat -r tip editedfile | |
957 | This is the first line |
|
1071 | This is the first line | |
958 | This change will be committed |
|
1072 | This change will be committed | |
959 | This is the third line |
|
1073 | This is the third line | |
960 | $ hg revert editedfile |
|
1074 | $ hg revert editedfile | |
961 |
|
1075 | |||
962 | Trying to edit patch for whole file |
|
1076 | Trying to edit patch for whole file | |
963 |
|
1077 | |||
964 | $ echo "This is the fourth line" >> editedfile |
|
1078 | $ echo "This is the fourth line" >> editedfile | |
965 | $ hg record <<EOF |
|
1079 | $ hg record <<EOF | |
966 | > e |
|
1080 | > e | |
967 | > q |
|
1081 | > q | |
968 | > EOF |
|
1082 | > EOF | |
969 | diff --git a/editedfile b/editedfile |
|
1083 | diff --git a/editedfile b/editedfile | |
970 | 1 hunks, 1 lines changed |
|
1084 | 1 hunks, 1 lines changed | |
971 | examine changes to 'editedfile'? [Ynesfdaq?] |
|
1085 | examine changes to 'editedfile'? [Ynesfdaq?] | |
972 | cannot edit patch for whole file |
|
1086 | cannot edit patch for whole file | |
973 | examine changes to 'editedfile'? [Ynesfdaq?] |
|
1087 | examine changes to 'editedfile'? [Ynesfdaq?] | |
974 | abort: user quit |
|
1088 | abort: user quit | |
975 | [255] |
|
1089 | [255] | |
976 | $ hg revert editedfile |
|
1090 | $ hg revert editedfile | |
977 |
|
1091 | |||
978 | Removing changes from patch |
|
1092 | Removing changes from patch | |
979 |
|
1093 | |||
980 | $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp |
|
1094 | $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp | |
981 | $ mv tmp editedfile |
|
1095 | $ mv tmp editedfile | |
982 | $ echo "This line has been added" >> editedfile |
|
1096 | $ echo "This line has been added" >> editedfile | |
983 | $ cat > editor << '__EOF__' |
|
1097 | $ cat > editor << '__EOF__' | |
984 | > #!/bin/sh |
|
1098 | > #!/bin/sh | |
985 | > sed -e 's/^[-+]/ /' "$1" > tmp |
|
1099 | > sed -e 's/^[-+]/ /' "$1" > tmp | |
986 | > mv tmp "$1" |
|
1100 | > mv tmp "$1" | |
987 | > __EOF__ |
|
1101 | > __EOF__ | |
988 | $ chmod +x editor |
|
1102 | $ chmod +x editor | |
989 | $ HGEDITOR="'`pwd`'"/editor hg record <<EOF |
|
1103 | $ HGEDITOR="'`pwd`'"/editor hg record <<EOF | |
990 | > y |
|
1104 | > y | |
991 | > e |
|
1105 | > e | |
992 | > EOF |
|
1106 | > EOF | |
993 | diff --git a/editedfile b/editedfile |
|
1107 | diff --git a/editedfile b/editedfile | |
994 | 1 hunks, 3 lines changed |
|
1108 | 1 hunks, 3 lines changed | |
995 | examine changes to 'editedfile'? [Ynesfdaq?] |
|
1109 | examine changes to 'editedfile'? [Ynesfdaq?] | |
996 | @@ -1,3 +1,3 @@ |
|
1110 | @@ -1,3 +1,3 @@ | |
997 | -This is the first line |
|
1111 | -This is the first line | |
998 | -This change will be committed |
|
1112 | -This change will be committed | |
999 | -This is the third line |
|
1113 | -This is the third line | |
1000 | +This change will not be committed |
|
1114 | +This change will not be committed | |
1001 | +This is the second line |
|
1115 | +This is the second line | |
1002 | +This line has been added |
|
1116 | +This line has been added | |
1003 | record this change to 'editedfile'? [Ynesfdaq?] |
|
1117 | record this change to 'editedfile'? [Ynesfdaq?] | |
1004 | no changes to record |
|
1118 | no changes to record | |
1005 | $ cat editedfile |
|
1119 | $ cat editedfile | |
1006 | This change will not be committed |
|
1120 | This change will not be committed | |
1007 | This is the second line |
|
1121 | This is the second line | |
1008 | This line has been added |
|
1122 | This line has been added | |
1009 | $ hg cat -r tip editedfile |
|
1123 | $ hg cat -r tip editedfile | |
1010 | This is the first line |
|
1124 | This is the first line | |
1011 | This change will be committed |
|
1125 | This change will be committed | |
1012 | This is the third line |
|
1126 | This is the third line | |
1013 | $ hg revert editedfile |
|
1127 | $ hg revert editedfile | |
1014 |
|
1128 | |||
1015 | Invalid patch |
|
1129 | Invalid patch | |
1016 |
|
1130 | |||
1017 | $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp |
|
1131 | $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp | |
1018 | $ mv tmp editedfile |
|
1132 | $ mv tmp editedfile | |
1019 | $ echo "This line has been added" >> editedfile |
|
1133 | $ echo "This line has been added" >> editedfile | |
1020 | $ cat > editor << '__EOF__' |
|
1134 | $ cat > editor << '__EOF__' | |
1021 | > #!/bin/sh |
|
1135 | > #!/bin/sh | |
1022 | > sed s/This/That/ "$1" > tmp |
|
1136 | > sed s/This/That/ "$1" > tmp | |
1023 | > mv tmp "$1" |
|
1137 | > mv tmp "$1" | |
1024 | > __EOF__ |
|
1138 | > __EOF__ | |
1025 | $ chmod +x editor |
|
1139 | $ chmod +x editor | |
1026 | $ HGEDITOR="'`pwd`'"/editor hg record <<EOF |
|
1140 | $ HGEDITOR="'`pwd`'"/editor hg record <<EOF | |
1027 | > y |
|
1141 | > y | |
1028 | > e |
|
1142 | > e | |
1029 | > EOF |
|
1143 | > EOF | |
1030 | diff --git a/editedfile b/editedfile |
|
1144 | diff --git a/editedfile b/editedfile | |
1031 | 1 hunks, 3 lines changed |
|
1145 | 1 hunks, 3 lines changed | |
1032 | examine changes to 'editedfile'? [Ynesfdaq?] |
|
1146 | examine changes to 'editedfile'? [Ynesfdaq?] | |
1033 | @@ -1,3 +1,3 @@ |
|
1147 | @@ -1,3 +1,3 @@ | |
1034 | -This is the first line |
|
1148 | -This is the first line | |
1035 | -This change will be committed |
|
1149 | -This change will be committed | |
1036 | -This is the third line |
|
1150 | -This is the third line | |
1037 | +This change will not be committed |
|
1151 | +This change will not be committed | |
1038 | +This is the second line |
|
1152 | +This is the second line | |
1039 | +This line has been added |
|
1153 | +This line has been added | |
1040 | record this change to 'editedfile'? [Ynesfdaq?] |
|
1154 | record this change to 'editedfile'? [Ynesfdaq?] | |
1041 | patching file editedfile |
|
1155 | patching file editedfile | |
1042 | Hunk #1 FAILED at 0 |
|
1156 | Hunk #1 FAILED at 0 | |
1043 | 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej |
|
1157 | 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej | |
1044 | abort: patch failed to apply |
|
1158 | abort: patch failed to apply | |
1045 | [255] |
|
1159 | [255] | |
1046 | $ cat editedfile |
|
1160 | $ cat editedfile | |
1047 | This change will not be committed |
|
1161 | This change will not be committed | |
1048 | This is the second line |
|
1162 | This is the second line | |
1049 | This line has been added |
|
1163 | This line has been added | |
1050 | $ hg cat -r tip editedfile |
|
1164 | $ hg cat -r tip editedfile | |
1051 | This is the first line |
|
1165 | This is the first line | |
1052 | This change will be committed |
|
1166 | This change will be committed | |
1053 | This is the third line |
|
1167 | This is the third line | |
1054 | $ cat editedfile.rej |
|
1168 | $ cat editedfile.rej | |
1055 | --- editedfile |
|
1169 | --- editedfile | |
1056 | +++ editedfile |
|
1170 | +++ editedfile | |
1057 | @@ -1,3 +1,3 @@ |
|
1171 | @@ -1,3 +1,3 @@ | |
1058 | -That is the first line |
|
1172 | -That is the first line | |
1059 | -That change will be committed |
|
1173 | -That change will be committed | |
1060 | -That is the third line |
|
1174 | -That is the third line | |
1061 | +That change will not be committed |
|
1175 | +That change will not be committed | |
1062 | +That is the second line |
|
1176 | +That is the second line | |
1063 | +That line has been added |
|
1177 | +That line has been added | |
1064 | $ hg up -C |
|
1178 | $ hg up -C | |
1065 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1179 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1066 |
|
1180 | |||
1067 | With win32text |
|
1181 | With win32text | |
1068 |
|
1182 | |||
1069 | $ echo '[extensions]' >> .hg/hgrc |
|
1183 | $ echo '[extensions]' >> .hg/hgrc | |
1070 | $ echo 'win32text = ' >> .hg/hgrc |
|
1184 | $ echo 'win32text = ' >> .hg/hgrc | |
1071 | $ echo '[decode]' >> .hg/hgrc |
|
1185 | $ echo '[decode]' >> .hg/hgrc | |
1072 | $ echo '** = cleverdecode:' >> .hg/hgrc |
|
1186 | $ echo '** = cleverdecode:' >> .hg/hgrc | |
1073 | $ echo '[encode]' >> .hg/hgrc |
|
1187 | $ echo '[encode]' >> .hg/hgrc | |
1074 | $ echo '** = cleverencode:' >> .hg/hgrc |
|
1188 | $ echo '** = cleverencode:' >> .hg/hgrc | |
1075 | $ echo '[patch]' >> .hg/hgrc |
|
1189 | $ echo '[patch]' >> .hg/hgrc | |
1076 | $ echo 'eol = crlf' >> .hg/hgrc |
|
1190 | $ echo 'eol = crlf' >> .hg/hgrc | |
1077 |
|
1191 | |||
1078 | Ignore win32text deprecation warning for now: |
|
1192 | Ignore win32text deprecation warning for now: | |
1079 |
|
1193 | |||
1080 | $ echo '[win32text]' >> .hg/hgrc |
|
1194 | $ echo '[win32text]' >> .hg/hgrc | |
1081 | $ echo 'warn = no' >> .hg/hgrc |
|
1195 | $ echo 'warn = no' >> .hg/hgrc | |
1082 |
|
1196 | |||
1083 | $ echo d >> subdir/f1 |
|
1197 | $ echo d >> subdir/f1 | |
1084 | $ hg record -d '24 0' -mw1 <<EOF |
|
1198 | $ hg record -d '24 0' -mw1 <<EOF | |
1085 | > y |
|
1199 | > y | |
1086 | > y |
|
1200 | > y | |
1087 | > EOF |
|
1201 | > EOF | |
1088 | diff --git a/subdir/f1 b/subdir/f1 |
|
1202 | diff --git a/subdir/f1 b/subdir/f1 | |
1089 | 1 hunks, 1 lines changed |
|
1203 | 1 hunks, 1 lines changed | |
1090 | examine changes to 'subdir/f1'? [Ynesfdaq?] |
|
1204 | examine changes to 'subdir/f1'? [Ynesfdaq?] | |
1091 | @@ -3,3 +3,4 @@ |
|
1205 | @@ -3,3 +3,4 @@ | |
1092 | a |
|
1206 | a | |
1093 | b |
|
1207 | b | |
1094 | c |
|
1208 | c | |
1095 | +d |
|
1209 | +d | |
1096 | record this change to 'subdir/f1'? [Ynesfdaq?] |
|
1210 | record this change to 'subdir/f1'? [Ynesfdaq?] | |
1097 |
|
1211 | |||
1098 | $ hg tip -p |
|
1212 | $ hg tip -p | |
1099 |
changeset: 28: |
|
1213 | changeset: 28:* (glob) | |
1100 | tag: tip |
|
1214 | tag: tip | |
1101 | user: test |
|
1215 | user: test | |
1102 | date: Thu Jan 01 00:00:24 1970 +0000 |
|
1216 | date: Thu Jan 01 00:00:24 1970 +0000 | |
1103 | summary: w1 |
|
1217 | summary: w1 | |
1104 |
|
1218 | |||
1105 | diff -r 65ce23a81197 -r 287ad1f41a72 subdir/f1 |
|
1219 | diff -r ???????????? -r ???????????? subdir/f1 (glob) | |
1106 | --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000 |
|
1220 | --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000 | |
1107 | +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000 |
|
1221 | +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000 | |
1108 | @@ -3,3 +3,4 @@ |
|
1222 | @@ -3,3 +3,4 @@ | |
1109 | a |
|
1223 | a | |
1110 | b |
|
1224 | b | |
1111 | c |
|
1225 | c | |
1112 | +d |
|
1226 | +d | |
1113 |
|
1227 |
General Comments 0
You need to be logged in to leave comments.
Login now