Show More
@@ -1,345 +1,347 b'' | |||||
|
1 | #require no-reposimplestore | |||
|
2 | ||||
1 | $ . "$TESTDIR/narrow-library.sh" |
|
3 | $ . "$TESTDIR/narrow-library.sh" | |
2 |
|
4 | |||
3 | create full repo |
|
5 | create full repo | |
4 |
|
6 | |||
5 | $ hg init master |
|
7 | $ hg init master | |
6 | $ cd master |
|
8 | $ cd master | |
7 | $ cat >> .hg/hgrc <<EOF |
|
9 | $ cat >> .hg/hgrc <<EOF | |
8 | > [narrow] |
|
10 | > [narrow] | |
9 | > serveellipses=True |
|
11 | > serveellipses=True | |
10 | > EOF |
|
12 | > EOF | |
11 |
|
13 | |||
12 | $ mkdir inside |
|
14 | $ mkdir inside | |
13 | $ echo 1 > inside/f |
|
15 | $ echo 1 > inside/f | |
14 | $ hg commit -Aqm 'initial inside' |
|
16 | $ hg commit -Aqm 'initial inside' | |
15 |
|
17 | |||
16 | $ mkdir outside |
|
18 | $ mkdir outside | |
17 | $ echo 1 > outside/f |
|
19 | $ echo 1 > outside/f | |
18 | $ hg commit -Aqm 'initial outside' |
|
20 | $ hg commit -Aqm 'initial outside' | |
19 |
|
21 | |||
20 | $ echo 2a > outside/f |
|
22 | $ echo 2a > outside/f | |
21 | $ hg commit -Aqm 'outside 2a' |
|
23 | $ hg commit -Aqm 'outside 2a' | |
22 | $ echo 3 > inside/f |
|
24 | $ echo 3 > inside/f | |
23 | $ hg commit -Aqm 'inside 3' |
|
25 | $ hg commit -Aqm 'inside 3' | |
24 | $ echo 4a > outside/f |
|
26 | $ echo 4a > outside/f | |
25 | $ hg commit -Aqm 'outside 4a' |
|
27 | $ hg commit -Aqm 'outside 4a' | |
26 | $ hg update '.~3' |
|
28 | $ hg update '.~3' | |
27 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 |
|
30 | |||
29 | $ echo 2b > outside/f |
|
31 | $ echo 2b > outside/f | |
30 | $ hg commit -Aqm 'outside 2b' |
|
32 | $ hg commit -Aqm 'outside 2b' | |
31 | $ echo 3 > inside/f |
|
33 | $ echo 3 > inside/f | |
32 | $ hg commit -Aqm 'inside 3' |
|
34 | $ hg commit -Aqm 'inside 3' | |
33 | $ echo 4b > outside/f |
|
35 | $ echo 4b > outside/f | |
34 | $ hg commit -Aqm 'outside 4b' |
|
36 | $ hg commit -Aqm 'outside 4b' | |
35 | $ hg update '.~3' |
|
37 | $ hg update '.~3' | |
36 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
38 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
37 |
|
39 | |||
38 | $ echo 2c > outside/f |
|
40 | $ echo 2c > outside/f | |
39 | $ hg commit -Aqm 'outside 2c' |
|
41 | $ hg commit -Aqm 'outside 2c' | |
40 | $ echo 3 > inside/f |
|
42 | $ echo 3 > inside/f | |
41 | $ hg commit -Aqm 'inside 3' |
|
43 | $ hg commit -Aqm 'inside 3' | |
42 | $ echo 4c > outside/f |
|
44 | $ echo 4c > outside/f | |
43 | $ hg commit -Aqm 'outside 4c' |
|
45 | $ hg commit -Aqm 'outside 4c' | |
44 | $ hg update '.~3' |
|
46 | $ hg update '.~3' | |
45 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
47 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 |
|
48 | |||
47 | $ echo 2d > outside/f |
|
49 | $ echo 2d > outside/f | |
48 | $ hg commit -Aqm 'outside 2d' |
|
50 | $ hg commit -Aqm 'outside 2d' | |
49 | $ echo 3 > inside/f |
|
51 | $ echo 3 > inside/f | |
50 | $ hg commit -Aqm 'inside 3' |
|
52 | $ hg commit -Aqm 'inside 3' | |
51 | $ echo 4d > outside/f |
|
53 | $ echo 4d > outside/f | |
52 | $ hg commit -Aqm 'outside 4d' |
|
54 | $ hg commit -Aqm 'outside 4d' | |
53 |
|
55 | |||
54 | $ hg update -r 'desc("outside 4a")' |
|
56 | $ hg update -r 'desc("outside 4a")' | |
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
56 | $ hg merge -r 'desc("outside 4b")' 2>&1 | egrep -v '(warning:|incomplete!)' |
|
58 | $ hg merge -r 'desc("outside 4b")' 2>&1 | egrep -v '(warning:|incomplete!)' | |
57 | merging outside/f |
|
59 | merging outside/f | |
58 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
60 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
59 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
61 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
60 | $ echo 5 > outside/f |
|
62 | $ echo 5 > outside/f | |
61 | $ rm outside/f.orig |
|
63 | $ rm outside/f.orig | |
62 | $ hg resolve --mark outside/f |
|
64 | $ hg resolve --mark outside/f | |
63 | (no more unresolved files) |
|
65 | (no more unresolved files) | |
64 | $ hg commit -m 'merge a/b 5' |
|
66 | $ hg commit -m 'merge a/b 5' | |
65 | $ echo 6 > outside/f |
|
67 | $ echo 6 > outside/f | |
66 | $ hg commit -Aqm 'outside 6' |
|
68 | $ hg commit -Aqm 'outside 6' | |
67 |
|
69 | |||
68 | $ hg merge -r 'desc("outside 4c")' 2>&1 | egrep -v '(warning:|incomplete!)' |
|
70 | $ hg merge -r 'desc("outside 4c")' 2>&1 | egrep -v '(warning:|incomplete!)' | |
69 | merging outside/f |
|
71 | merging outside/f | |
70 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
72 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
71 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
73 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
72 | $ echo 7 > outside/f |
|
74 | $ echo 7 > outside/f | |
73 | $ rm outside/f.orig |
|
75 | $ rm outside/f.orig | |
74 | $ hg resolve --mark outside/f |
|
76 | $ hg resolve --mark outside/f | |
75 | (no more unresolved files) |
|
77 | (no more unresolved files) | |
76 | $ hg commit -Aqm 'merge a/b/c 7' |
|
78 | $ hg commit -Aqm 'merge a/b/c 7' | |
77 | $ echo 8 > outside/f |
|
79 | $ echo 8 > outside/f | |
78 | $ hg commit -Aqm 'outside 8' |
|
80 | $ hg commit -Aqm 'outside 8' | |
79 |
|
81 | |||
80 | $ hg merge -r 'desc("outside 4d")' 2>&1 | egrep -v '(warning:|incomplete!)' |
|
82 | $ hg merge -r 'desc("outside 4d")' 2>&1 | egrep -v '(warning:|incomplete!)' | |
81 | merging outside/f |
|
83 | merging outside/f | |
82 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
84 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
83 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
85 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
84 | $ echo 9 > outside/f |
|
86 | $ echo 9 > outside/f | |
85 | $ rm outside/f.orig |
|
87 | $ rm outside/f.orig | |
86 | $ hg resolve --mark outside/f |
|
88 | $ hg resolve --mark outside/f | |
87 | (no more unresolved files) |
|
89 | (no more unresolved files) | |
88 | $ hg commit -Aqm 'merge a/b/c/d 9' |
|
90 | $ hg commit -Aqm 'merge a/b/c/d 9' | |
89 | $ echo 10 > outside/f |
|
91 | $ echo 10 > outside/f | |
90 | $ hg commit -Aqm 'outside 10' |
|
92 | $ hg commit -Aqm 'outside 10' | |
91 |
|
93 | |||
92 | $ echo 11 > inside/f |
|
94 | $ echo 11 > inside/f | |
93 | $ hg commit -Aqm 'inside 11' |
|
95 | $ hg commit -Aqm 'inside 11' | |
94 | $ echo 12 > outside/f |
|
96 | $ echo 12 > outside/f | |
95 | $ hg commit -Aqm 'outside 12' |
|
97 | $ hg commit -Aqm 'outside 12' | |
96 |
|
98 | |||
97 | $ hg log -G -T '{rev} {node|short} {desc}\n' |
|
99 | $ hg log -G -T '{rev} {node|short} {desc}\n' | |
98 | @ 21 8d874d57adea outside 12 |
|
100 | @ 21 8d874d57adea outside 12 | |
99 | | |
|
101 | | | |
100 | o 20 7ef88b4dd4fa inside 11 |
|
102 | o 20 7ef88b4dd4fa inside 11 | |
101 | | |
|
103 | | | |
102 | o 19 2a20009de83e outside 10 |
|
104 | o 19 2a20009de83e outside 10 | |
103 | | |
|
105 | | | |
104 | o 18 3ac1f5779de3 merge a/b/c/d 9 |
|
106 | o 18 3ac1f5779de3 merge a/b/c/d 9 | |
105 | |\ |
|
107 | |\ | |
106 | | o 17 38a9c2f7e546 outside 8 |
|
108 | | o 17 38a9c2f7e546 outside 8 | |
107 | | | |
|
109 | | | | |
108 | | o 16 094aa62fc898 merge a/b/c 7 |
|
110 | | o 16 094aa62fc898 merge a/b/c 7 | |
109 | | |\ |
|
111 | | |\ | |
110 | | | o 15 f29d083d32e4 outside 6 |
|
112 | | | o 15 f29d083d32e4 outside 6 | |
111 | | | | |
|
113 | | | | | |
112 | | | o 14 2dc11382541d merge a/b 5 |
|
114 | | | o 14 2dc11382541d merge a/b 5 | |
113 | | | |\ |
|
115 | | | |\ | |
114 | o | | | 13 27d07ef97221 outside 4d |
|
116 | o | | | 13 27d07ef97221 outside 4d | |
115 | | | | | |
|
117 | | | | | | |
116 | o | | | 12 465567bdfb2d inside 3 |
|
118 | o | | | 12 465567bdfb2d inside 3 | |
117 | | | | | |
|
119 | | | | | | |
118 | o | | | 11 d1c61993ec83 outside 2d |
|
120 | o | | | 11 d1c61993ec83 outside 2d | |
119 | | | | | |
|
121 | | | | | | |
120 | | o | | 10 56859a8e33b9 outside 4c |
|
122 | | o | | 10 56859a8e33b9 outside 4c | |
121 | | | | | |
|
123 | | | | | | |
122 | | o | | 9 bb96a08b062a inside 3 |
|
124 | | o | | 9 bb96a08b062a inside 3 | |
123 | | | | | |
|
125 | | | | | | |
124 | | o | | 8 b844052e7b3b outside 2c |
|
126 | | o | | 8 b844052e7b3b outside 2c | |
125 | |/ / / |
|
127 | |/ / / | |
126 | | | o 7 9db2d8fcc2a6 outside 4b |
|
128 | | | o 7 9db2d8fcc2a6 outside 4b | |
127 | | | | |
|
129 | | | | | |
128 | | | o 6 6418167787a6 inside 3 |
|
130 | | | o 6 6418167787a6 inside 3 | |
129 | | | | |
|
131 | | | | | |
130 | +---o 5 77344f344d83 outside 2b |
|
132 | +---o 5 77344f344d83 outside 2b | |
131 | | | |
|
133 | | | | |
132 | | o 4 9cadde08dc9f outside 4a |
|
134 | | o 4 9cadde08dc9f outside 4a | |
133 | | | |
|
135 | | | | |
134 | | o 3 019ef06f125b inside 3 |
|
136 | | o 3 019ef06f125b inside 3 | |
135 | | | |
|
137 | | | | |
136 | | o 2 75e40c075a19 outside 2a |
|
138 | | o 2 75e40c075a19 outside 2a | |
137 | |/ |
|
139 | |/ | |
138 | o 1 906d6c682641 initial outside |
|
140 | o 1 906d6c682641 initial outside | |
139 | | |
|
141 | | | |
140 | o 0 9f8e82b51004 initial inside |
|
142 | o 0 9f8e82b51004 initial inside | |
141 |
|
143 | |||
142 |
|
144 | |||
143 | Now narrow and shallow clone this and get a hopefully correct graph |
|
145 | Now narrow and shallow clone this and get a hopefully correct graph | |
144 |
|
146 | |||
145 | $ cd .. |
|
147 | $ cd .. | |
146 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside --depth 7 |
|
148 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside --depth 7 | |
147 | requesting all changes |
|
149 | requesting all changes | |
148 | adding changesets |
|
150 | adding changesets | |
149 | adding manifests |
|
151 | adding manifests | |
150 | adding file changes |
|
152 | adding file changes | |
151 | added 8 changesets with 3 changes to 1 files |
|
153 | added 8 changesets with 3 changes to 1 files | |
152 | new changesets *:* (glob) |
|
154 | new changesets *:* (glob) | |
153 | updating to branch default |
|
155 | updating to branch default | |
154 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
156 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 | $ cd narrow |
|
157 | $ cd narrow | |
156 |
|
158 | |||
157 | To make updating the tests easier, we print the emitted nodes |
|
159 | To make updating the tests easier, we print the emitted nodes | |
158 | sorted. This makes it easier to identify when the same node structure |
|
160 | sorted. This makes it easier to identify when the same node structure | |
159 | has been emitted, just in a different order. |
|
161 | has been emitted, just in a different order. | |
160 |
|
162 | |||
161 | $ hg log -G -T '{rev} {node|short}{if(ellipsis,"...")} {desc}\n' |
|
163 | $ hg log -G -T '{rev} {node|short}{if(ellipsis,"...")} {desc}\n' | |
162 | @ 7 8d874d57adea... outside 12 |
|
164 | @ 7 8d874d57adea... outside 12 | |
163 | | |
|
165 | | | |
164 | o 6 7ef88b4dd4fa inside 11 |
|
166 | o 6 7ef88b4dd4fa inside 11 | |
165 | | |
|
167 | | | |
166 | o 5 2a20009de83e... outside 10 |
|
168 | o 5 2a20009de83e... outside 10 | |
167 | | |
|
169 | | | |
168 | o 4 3ac1f5779de3... merge a/b/c/d 9 |
|
170 | o 4 3ac1f5779de3... merge a/b/c/d 9 | |
169 | |\ |
|
171 | |\ | |
170 | | o 3 465567bdfb2d inside 3 |
|
172 | | o 3 465567bdfb2d inside 3 | |
171 | | | |
|
173 | | | | |
172 | | o 2 d1c61993ec83... outside 2d |
|
174 | | o 2 d1c61993ec83... outside 2d | |
173 | | |
|
175 | | | |
174 | o 1 bb96a08b062a inside 3 |
|
176 | o 1 bb96a08b062a inside 3 | |
175 | | |
|
177 | | | |
176 | o 0 b844052e7b3b... outside 2c |
|
178 | o 0 b844052e7b3b... outside 2c | |
177 |
|
179 | |||
178 |
|
180 | |||
179 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort |
|
181 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort | |
180 | ...2a20009de83e 000000000000 3ac1f5779de3 outside 10 |
|
182 | ...2a20009de83e 000000000000 3ac1f5779de3 outside 10 | |
181 | ...3ac1f5779de3 bb96a08b062a 465567bdfb2d merge a/b/c/d 9 |
|
183 | ...3ac1f5779de3 bb96a08b062a 465567bdfb2d merge a/b/c/d 9 | |
182 | ...8d874d57adea 7ef88b4dd4fa 000000000000 outside 12 |
|
184 | ...8d874d57adea 7ef88b4dd4fa 000000000000 outside 12 | |
183 | ...b844052e7b3b 000000000000 000000000000 outside 2c |
|
185 | ...b844052e7b3b 000000000000 000000000000 outside 2c | |
184 | ...d1c61993ec83 000000000000 000000000000 outside 2d |
|
186 | ...d1c61993ec83 000000000000 000000000000 outside 2d | |
185 | 465567bdfb2d d1c61993ec83 000000000000 inside 3 |
|
187 | 465567bdfb2d d1c61993ec83 000000000000 inside 3 | |
186 | 7ef88b4dd4fa 2a20009de83e 000000000000 inside 11 |
|
188 | 7ef88b4dd4fa 2a20009de83e 000000000000 inside 11 | |
187 | bb96a08b062a b844052e7b3b 000000000000 inside 3 |
|
189 | bb96a08b062a b844052e7b3b 000000000000 inside 3 | |
188 |
|
190 | |||
189 | $ cd .. |
|
191 | $ cd .. | |
190 |
|
192 | |||
191 | Incremental test case: show a pull can pull in a conflicted merge even if elided |
|
193 | Incremental test case: show a pull can pull in a conflicted merge even if elided | |
192 |
|
194 | |||
193 | $ hg init pullmaster |
|
195 | $ hg init pullmaster | |
194 | $ cd pullmaster |
|
196 | $ cd pullmaster | |
195 | $ cat >> .hg/hgrc <<EOF |
|
197 | $ cat >> .hg/hgrc <<EOF | |
196 | > [narrow] |
|
198 | > [narrow] | |
197 | > serveellipses=True |
|
199 | > serveellipses=True | |
198 | > EOF |
|
200 | > EOF | |
199 | $ mkdir inside outside |
|
201 | $ mkdir inside outside | |
200 | $ echo v1 > inside/f |
|
202 | $ echo v1 > inside/f | |
201 | $ echo v1 > outside/f |
|
203 | $ echo v1 > outside/f | |
202 | $ hg add inside/f outside/f |
|
204 | $ hg add inside/f outside/f | |
203 | $ hg commit -m init |
|
205 | $ hg commit -m init | |
204 |
|
206 | |||
205 | $ for line in a b c d |
|
207 | $ for line in a b c d | |
206 | > do |
|
208 | > do | |
207 | > hg update -r 0 |
|
209 | > hg update -r 0 | |
208 | > echo v2$line > outside/f |
|
210 | > echo v2$line > outside/f | |
209 | > hg commit -m "outside 2$line" |
|
211 | > hg commit -m "outside 2$line" | |
210 | > echo v2$line > inside/f |
|
212 | > echo v2$line > inside/f | |
211 | > hg commit -m "inside 2$line" |
|
213 | > hg commit -m "inside 2$line" | |
212 | > echo v3$line > outside/f |
|
214 | > echo v3$line > outside/f | |
213 | > hg commit -m "outside 3$line" |
|
215 | > hg commit -m "outside 3$line" | |
214 | > echo v4$line > outside/f |
|
216 | > echo v4$line > outside/f | |
215 | > hg commit -m "outside 4$line" |
|
217 | > hg commit -m "outside 4$line" | |
216 | > done |
|
218 | > done | |
217 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
219 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
218 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
219 | created new head |
|
221 | created new head | |
220 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 | created new head |
|
223 | created new head | |
222 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
224 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
223 | created new head |
|
225 | created new head | |
224 |
|
226 | |||
225 | $ cd .. |
|
227 | $ cd .. | |
226 | $ hg clone --narrow ssh://user@dummy/pullmaster pullshallow \ |
|
228 | $ hg clone --narrow ssh://user@dummy/pullmaster pullshallow \ | |
227 | > --include inside --depth 3 |
|
229 | > --include inside --depth 3 | |
228 | requesting all changes |
|
230 | requesting all changes | |
229 | adding changesets |
|
231 | adding changesets | |
230 | adding manifests |
|
232 | adding manifests | |
231 | adding file changes |
|
233 | adding file changes | |
232 | added 12 changesets with 5 changes to 1 files (+3 heads) |
|
234 | added 12 changesets with 5 changes to 1 files (+3 heads) | |
233 | new changesets *:* (glob) |
|
235 | new changesets *:* (glob) | |
234 | updating to branch default |
|
236 | updating to branch default | |
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
237 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
236 | $ cd pullshallow |
|
238 | $ cd pullshallow | |
237 |
|
239 | |||
238 | $ hg log -G -T '{rev} {node|short}{if(ellipsis,"...")} {desc}\n' |
|
240 | $ hg log -G -T '{rev} {node|short}{if(ellipsis,"...")} {desc}\n' | |
239 | @ 11 0ebbd712a0c8... outside 4d |
|
241 | @ 11 0ebbd712a0c8... outside 4d | |
240 | | |
|
242 | | | |
241 | o 10 0d4c867aeb23 inside 2d |
|
243 | o 10 0d4c867aeb23 inside 2d | |
242 | | |
|
244 | | | |
243 | o 9 e932969c3961... outside 2d |
|
245 | o 9 e932969c3961... outside 2d | |
244 |
|
246 | |||
245 | o 8 33d530345455... outside 4c |
|
247 | o 8 33d530345455... outside 4c | |
246 | | |
|
248 | | | |
247 | o 7 0ce6481bfe07 inside 2c |
|
249 | o 7 0ce6481bfe07 inside 2c | |
248 | | |
|
250 | | | |
249 | o 6 caa65c940632... outside 2c |
|
251 | o 6 caa65c940632... outside 2c | |
250 |
|
252 | |||
251 | o 5 3df233defecc... outside 4b |
|
253 | o 5 3df233defecc... outside 4b | |
252 | | |
|
254 | | | |
253 | o 4 7162cc6d11a4 inside 2b |
|
255 | o 4 7162cc6d11a4 inside 2b | |
254 | | |
|
256 | | | |
255 | o 3 f2a632f0082d... outside 2b |
|
257 | o 3 f2a632f0082d... outside 2b | |
256 |
|
258 | |||
257 | o 2 b8a3da16ba49... outside 4a |
|
259 | o 2 b8a3da16ba49... outside 4a | |
258 | | |
|
260 | | | |
259 | o 1 53f543eb8e45 inside 2a |
|
261 | o 1 53f543eb8e45 inside 2a | |
260 | | |
|
262 | | | |
261 | o 0 1be3e5221c6a... outside 2a |
|
263 | o 0 1be3e5221c6a... outside 2a | |
262 |
|
264 | |||
263 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort |
|
265 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort | |
264 | ...0ebbd712a0c8 0d4c867aeb23 000000000000 outside 4d |
|
266 | ...0ebbd712a0c8 0d4c867aeb23 000000000000 outside 4d | |
265 | ...1be3e5221c6a 000000000000 000000000000 outside 2a |
|
267 | ...1be3e5221c6a 000000000000 000000000000 outside 2a | |
266 | ...33d530345455 0ce6481bfe07 000000000000 outside 4c |
|
268 | ...33d530345455 0ce6481bfe07 000000000000 outside 4c | |
267 | ...3df233defecc 7162cc6d11a4 000000000000 outside 4b |
|
269 | ...3df233defecc 7162cc6d11a4 000000000000 outside 4b | |
268 | ...b8a3da16ba49 53f543eb8e45 000000000000 outside 4a |
|
270 | ...b8a3da16ba49 53f543eb8e45 000000000000 outside 4a | |
269 | ...caa65c940632 000000000000 000000000000 outside 2c |
|
271 | ...caa65c940632 000000000000 000000000000 outside 2c | |
270 | ...e932969c3961 000000000000 000000000000 outside 2d |
|
272 | ...e932969c3961 000000000000 000000000000 outside 2d | |
271 | ...f2a632f0082d 000000000000 000000000000 outside 2b |
|
273 | ...f2a632f0082d 000000000000 000000000000 outside 2b | |
272 | 0ce6481bfe07 caa65c940632 000000000000 inside 2c |
|
274 | 0ce6481bfe07 caa65c940632 000000000000 inside 2c | |
273 | 0d4c867aeb23 e932969c3961 000000000000 inside 2d |
|
275 | 0d4c867aeb23 e932969c3961 000000000000 inside 2d | |
274 | 53f543eb8e45 1be3e5221c6a 000000000000 inside 2a |
|
276 | 53f543eb8e45 1be3e5221c6a 000000000000 inside 2a | |
275 | 7162cc6d11a4 f2a632f0082d 000000000000 inside 2b |
|
277 | 7162cc6d11a4 f2a632f0082d 000000000000 inside 2b | |
276 |
|
278 | |||
277 | $ cd ../pullmaster |
|
279 | $ cd ../pullmaster | |
278 | $ hg update -r 'desc("outside 4a")' |
|
280 | $ hg update -r 'desc("outside 4a")' | |
279 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
280 | $ hg merge -r 'desc("outside 4b")' 2>&1 | egrep -v '(warning:|incomplete!)' |
|
282 | $ hg merge -r 'desc("outside 4b")' 2>&1 | egrep -v '(warning:|incomplete!)' | |
281 | merging inside/f |
|
283 | merging inside/f | |
282 | merging outside/f |
|
284 | merging outside/f | |
283 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
285 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
284 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
286 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
285 | $ echo 3 > inside/f |
|
287 | $ echo 3 > inside/f | |
286 | $ echo 5 > outside/f |
|
288 | $ echo 5 > outside/f | |
287 | $ rm -f {in,out}side/f.orig |
|
289 | $ rm -f {in,out}side/f.orig | |
288 | $ hg resolve --mark inside/f outside/f |
|
290 | $ hg resolve --mark inside/f outside/f | |
289 | (no more unresolved files) |
|
291 | (no more unresolved files) | |
290 | $ hg commit -m 'merge a/b 5' |
|
292 | $ hg commit -m 'merge a/b 5' | |
291 |
|
293 | |||
292 | $ hg update -r 'desc("outside 4c")' |
|
294 | $ hg update -r 'desc("outside 4c")' | |
293 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
295 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
294 | $ hg merge -r 'desc("outside 4d")' 2>&1 | egrep -v '(warning:|incomplete!)' |
|
296 | $ hg merge -r 'desc("outside 4d")' 2>&1 | egrep -v '(warning:|incomplete!)' | |
295 | merging inside/f |
|
297 | merging inside/f | |
296 | merging outside/f |
|
298 | merging outside/f | |
297 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
299 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
298 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
300 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
299 | $ echo 3 > inside/f |
|
301 | $ echo 3 > inside/f | |
300 | $ echo 5 > outside/f |
|
302 | $ echo 5 > outside/f | |
301 | $ rm -f {in,out}side/f.orig |
|
303 | $ rm -f {in,out}side/f.orig | |
302 | $ hg resolve --mark inside/f outside/f |
|
304 | $ hg resolve --mark inside/f outside/f | |
303 | (no more unresolved files) |
|
305 | (no more unresolved files) | |
304 | $ hg commit -m 'merge c/d 5' |
|
306 | $ hg commit -m 'merge c/d 5' | |
305 |
|
307 | |||
306 | $ hg update -r 'desc("merge a/b 5")' |
|
308 | $ hg update -r 'desc("merge a/b 5")' | |
307 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
308 | $ hg merge -r 'desc("merge c/d 5")' |
|
310 | $ hg merge -r 'desc("merge c/d 5")' | |
309 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
311 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
310 | (branch merge, don't forget to commit) |
|
312 | (branch merge, don't forget to commit) | |
311 | $ echo 6 > outside/f |
|
313 | $ echo 6 > outside/f | |
312 | $ hg commit -m 'outside 6' |
|
314 | $ hg commit -m 'outside 6' | |
313 | $ echo 7 > outside/f |
|
315 | $ echo 7 > outside/f | |
314 | $ hg commit -m 'outside 7' |
|
316 | $ hg commit -m 'outside 7' | |
315 | $ echo 8 > outside/f |
|
317 | $ echo 8 > outside/f | |
316 | $ hg commit -m 'outside 8' |
|
318 | $ hg commit -m 'outside 8' | |
317 |
|
319 | |||
318 | $ cd ../pullshallow |
|
320 | $ cd ../pullshallow | |
319 | $ hg pull --depth 3 |
|
321 | $ hg pull --depth 3 | |
320 | pulling from ssh://user@dummy/pullmaster |
|
322 | pulling from ssh://user@dummy/pullmaster | |
321 | searching for changes |
|
323 | searching for changes | |
322 | adding changesets |
|
324 | adding changesets | |
323 | adding manifests |
|
325 | adding manifests | |
324 | adding file changes |
|
326 | adding file changes | |
325 | added 4 changesets with 3 changes to 1 files (-3 heads) |
|
327 | added 4 changesets with 3 changes to 1 files (-3 heads) | |
326 | new changesets *:* (glob) |
|
328 | new changesets *:* (glob) | |
327 | (run 'hg update' to get a working copy) |
|
329 | (run 'hg update' to get a working copy) | |
328 |
|
330 | |||
329 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort |
|
331 | $ hg log -T '{if(ellipsis,"...")}{node|short} {p1node|short} {p2node|short} {desc}\n' | sort | |
330 | ...0ebbd712a0c8 0d4c867aeb23 000000000000 outside 4d |
|
332 | ...0ebbd712a0c8 0d4c867aeb23 000000000000 outside 4d | |
331 | ...1be3e5221c6a 000000000000 000000000000 outside 2a |
|
333 | ...1be3e5221c6a 000000000000 000000000000 outside 2a | |
332 | ...33d530345455 0ce6481bfe07 000000000000 outside 4c |
|
334 | ...33d530345455 0ce6481bfe07 000000000000 outside 4c | |
333 | ...3df233defecc 7162cc6d11a4 000000000000 outside 4b |
|
335 | ...3df233defecc 7162cc6d11a4 000000000000 outside 4b | |
334 | ...b8a3da16ba49 53f543eb8e45 000000000000 outside 4a |
|
336 | ...b8a3da16ba49 53f543eb8e45 000000000000 outside 4a | |
335 | ...bf545653453e 968003d40c60 000000000000 outside 8 |
|
337 | ...bf545653453e 968003d40c60 000000000000 outside 8 | |
336 | ...caa65c940632 000000000000 000000000000 outside 2c |
|
338 | ...caa65c940632 000000000000 000000000000 outside 2c | |
337 | ...e932969c3961 000000000000 000000000000 outside 2d |
|
339 | ...e932969c3961 000000000000 000000000000 outside 2d | |
338 | ...f2a632f0082d 000000000000 000000000000 outside 2b |
|
340 | ...f2a632f0082d 000000000000 000000000000 outside 2b | |
339 | 0ce6481bfe07 caa65c940632 000000000000 inside 2c |
|
341 | 0ce6481bfe07 caa65c940632 000000000000 inside 2c | |
340 | 0d4c867aeb23 e932969c3961 000000000000 inside 2d |
|
342 | 0d4c867aeb23 e932969c3961 000000000000 inside 2d | |
341 | 53f543eb8e45 1be3e5221c6a 000000000000 inside 2a |
|
343 | 53f543eb8e45 1be3e5221c6a 000000000000 inside 2a | |
342 | 67d49c0bdbda b8a3da16ba49 3df233defecc merge a/b 5 |
|
344 | 67d49c0bdbda b8a3da16ba49 3df233defecc merge a/b 5 | |
343 | 7162cc6d11a4 f2a632f0082d 000000000000 inside 2b |
|
345 | 7162cc6d11a4 f2a632f0082d 000000000000 inside 2b | |
344 | 968003d40c60 67d49c0bdbda e867021d52c2 outside 6 |
|
346 | 968003d40c60 67d49c0bdbda e867021d52c2 outside 6 | |
345 | e867021d52c2 33d530345455 0ebbd712a0c8 merge c/d 5 |
|
347 | e867021d52c2 33d530345455 0ebbd712a0c8 merge c/d 5 |
@@ -1,122 +1,124 b'' | |||||
|
1 | #require no-reposimplestore | |||
|
2 | ||||
1 | $ . "$TESTDIR/narrow-library.sh" |
|
3 | $ . "$TESTDIR/narrow-library.sh" | |
2 |
|
4 | |||
3 | $ hg init master |
|
5 | $ hg init master | |
4 | $ cd master |
|
6 | $ cd master | |
5 | $ cat >> .hg/hgrc <<EOF |
|
7 | $ cat >> .hg/hgrc <<EOF | |
6 | > [narrow] |
|
8 | > [narrow] | |
7 | > serveellipses=True |
|
9 | > serveellipses=True | |
8 | > EOF |
|
10 | > EOF | |
9 | $ for x in `$TESTDIR/seq.py 10` |
|
11 | $ for x in `$TESTDIR/seq.py 10` | |
10 | > do |
|
12 | > do | |
11 | > echo $x > "f$x" |
|
13 | > echo $x > "f$x" | |
12 | > hg add "f$x" |
|
14 | > hg add "f$x" | |
13 | > done |
|
15 | > done | |
14 | $ hg commit -m "Add root files" |
|
16 | $ hg commit -m "Add root files" | |
15 | $ mkdir d1 d2 |
|
17 | $ mkdir d1 d2 | |
16 | $ for x in `$TESTDIR/seq.py 10` |
|
18 | $ for x in `$TESTDIR/seq.py 10` | |
17 | > do |
|
19 | > do | |
18 | > echo d1/$x > "d1/f$x" |
|
20 | > echo d1/$x > "d1/f$x" | |
19 | > hg add "d1/f$x" |
|
21 | > hg add "d1/f$x" | |
20 | > echo d2/$x > "d2/f$x" |
|
22 | > echo d2/$x > "d2/f$x" | |
21 | > hg add "d2/f$x" |
|
23 | > hg add "d2/f$x" | |
22 | > done |
|
24 | > done | |
23 | $ hg commit -m "Add d1 and d2" |
|
25 | $ hg commit -m "Add d1 and d2" | |
24 | $ for x in `$TESTDIR/seq.py 10` |
|
26 | $ for x in `$TESTDIR/seq.py 10` | |
25 | > do |
|
27 | > do | |
26 | > echo f$x rev2 > "f$x" |
|
28 | > echo f$x rev2 > "f$x" | |
27 | > echo d1/f$x rev2 > "d1/f$x" |
|
29 | > echo d1/f$x rev2 > "d1/f$x" | |
28 | > echo d2/f$x rev2 > "d2/f$x" |
|
30 | > echo d2/f$x rev2 > "d2/f$x" | |
29 | > hg commit -m "Commit rev2 of f$x, d1/f$x, d2/f$x" |
|
31 | > hg commit -m "Commit rev2 of f$x, d1/f$x, d2/f$x" | |
30 | > done |
|
32 | > done | |
31 | $ cd .. |
|
33 | $ cd .. | |
32 |
|
34 | |||
33 | narrow and shallow clone the d2 directory |
|
35 | narrow and shallow clone the d2 directory | |
34 |
|
36 | |||
35 | $ hg clone --narrow ssh://user@dummy/master shallow --include "d2" --depth 2 |
|
37 | $ hg clone --narrow ssh://user@dummy/master shallow --include "d2" --depth 2 | |
36 | requesting all changes |
|
38 | requesting all changes | |
37 | adding changesets |
|
39 | adding changesets | |
38 | adding manifests |
|
40 | adding manifests | |
39 | adding file changes |
|
41 | adding file changes | |
40 | added 4 changesets with 13 changes to 10 files |
|
42 | added 4 changesets with 13 changes to 10 files | |
41 | new changesets *:* (glob) |
|
43 | new changesets *:* (glob) | |
42 | updating to branch default |
|
44 | updating to branch default | |
43 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | $ cd shallow |
|
46 | $ cd shallow | |
45 | $ hg log -T '{rev}{if(ellipsis,"...")}: {desc}\n' |
|
47 | $ hg log -T '{rev}{if(ellipsis,"...")}: {desc}\n' | |
46 | 3: Commit rev2 of f10, d1/f10, d2/f10 |
|
48 | 3: Commit rev2 of f10, d1/f10, d2/f10 | |
47 | 2: Commit rev2 of f9, d1/f9, d2/f9 |
|
49 | 2: Commit rev2 of f9, d1/f9, d2/f9 | |
48 | 1: Commit rev2 of f8, d1/f8, d2/f8 |
|
50 | 1: Commit rev2 of f8, d1/f8, d2/f8 | |
49 | 0...: Commit rev2 of f7, d1/f7, d2/f7 |
|
51 | 0...: Commit rev2 of f7, d1/f7, d2/f7 | |
50 | $ hg update 0 |
|
52 | $ hg update 0 | |
51 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
52 | $ cat d2/f7 d2/f8 |
|
54 | $ cat d2/f7 d2/f8 | |
53 | d2/f7 rev2 |
|
55 | d2/f7 rev2 | |
54 | d2/8 |
|
56 | d2/8 | |
55 |
|
57 | |||
56 | $ cd .. |
|
58 | $ cd .. | |
57 |
|
59 | |||
58 | change every upstream file once |
|
60 | change every upstream file once | |
59 |
|
61 | |||
60 | $ cd master |
|
62 | $ cd master | |
61 | $ for x in `$TESTDIR/seq.py 10` |
|
63 | $ for x in `$TESTDIR/seq.py 10` | |
62 | > do |
|
64 | > do | |
63 | > echo f$x rev3 > "f$x" |
|
65 | > echo f$x rev3 > "f$x" | |
64 | > echo d1/f$x rev3 > "d1/f$x" |
|
66 | > echo d1/f$x rev3 > "d1/f$x" | |
65 | > echo d2/f$x rev3 > "d2/f$x" |
|
67 | > echo d2/f$x rev3 > "d2/f$x" | |
66 | > hg commit -m "Commit rev3 of f$x, d1/f$x, d2/f$x" |
|
68 | > hg commit -m "Commit rev3 of f$x, d1/f$x, d2/f$x" | |
67 | > done |
|
69 | > done | |
68 | $ cd .. |
|
70 | $ cd .. | |
69 |
|
71 | |||
70 | pull new changes with --depth specified. There were 10 changes to the d2 |
|
72 | pull new changes with --depth specified. There were 10 changes to the d2 | |
71 | directory but the shallow pull should only fetch 3. |
|
73 | directory but the shallow pull should only fetch 3. | |
72 |
|
74 | |||
73 | $ cd shallow |
|
75 | $ cd shallow | |
74 | $ hg pull --depth 2 |
|
76 | $ hg pull --depth 2 | |
75 | pulling from ssh://user@dummy/master |
|
77 | pulling from ssh://user@dummy/master | |
76 | searching for changes |
|
78 | searching for changes | |
77 | adding changesets |
|
79 | adding changesets | |
78 | adding manifests |
|
80 | adding manifests | |
79 | adding file changes |
|
81 | adding file changes | |
80 | added 4 changesets with 10 changes to 10 files |
|
82 | added 4 changesets with 10 changes to 10 files | |
81 | new changesets *:* (glob) |
|
83 | new changesets *:* (glob) | |
82 | (run 'hg update' to get a working copy) |
|
84 | (run 'hg update' to get a working copy) | |
83 | $ hg log -T '{rev}{if(ellipsis,"...")}: {desc}\n' |
|
85 | $ hg log -T '{rev}{if(ellipsis,"...")}: {desc}\n' | |
84 | 7: Commit rev3 of f10, d1/f10, d2/f10 |
|
86 | 7: Commit rev3 of f10, d1/f10, d2/f10 | |
85 | 6: Commit rev3 of f9, d1/f9, d2/f9 |
|
87 | 6: Commit rev3 of f9, d1/f9, d2/f9 | |
86 | 5: Commit rev3 of f8, d1/f8, d2/f8 |
|
88 | 5: Commit rev3 of f8, d1/f8, d2/f8 | |
87 | 4...: Commit rev3 of f7, d1/f7, d2/f7 |
|
89 | 4...: Commit rev3 of f7, d1/f7, d2/f7 | |
88 | 3: Commit rev2 of f10, d1/f10, d2/f10 |
|
90 | 3: Commit rev2 of f10, d1/f10, d2/f10 | |
89 | 2: Commit rev2 of f9, d1/f9, d2/f9 |
|
91 | 2: Commit rev2 of f9, d1/f9, d2/f9 | |
90 | 1: Commit rev2 of f8, d1/f8, d2/f8 |
|
92 | 1: Commit rev2 of f8, d1/f8, d2/f8 | |
91 | 0...: Commit rev2 of f7, d1/f7, d2/f7 |
|
93 | 0...: Commit rev2 of f7, d1/f7, d2/f7 | |
92 | $ hg update 4 |
|
94 | $ hg update 4 | |
93 | merging d2/f1 |
|
95 | merging d2/f1 | |
94 | merging d2/f2 |
|
96 | merging d2/f2 | |
95 | merging d2/f3 |
|
97 | merging d2/f3 | |
96 | merging d2/f4 |
|
98 | merging d2/f4 | |
97 | merging d2/f5 |
|
99 | merging d2/f5 | |
98 | merging d2/f6 |
|
100 | merging d2/f6 | |
99 | merging d2/f7 |
|
101 | merging d2/f7 | |
100 | 3 files updated, 7 files merged, 0 files removed, 0 files unresolved |
|
102 | 3 files updated, 7 files merged, 0 files removed, 0 files unresolved | |
101 | $ cat d2/f7 d2/f8 |
|
103 | $ cat d2/f7 d2/f8 | |
102 | d2/f7 rev3 |
|
104 | d2/f7 rev3 | |
103 | d2/f8 rev2 |
|
105 | d2/f8 rev2 | |
104 | $ hg update 7 |
|
106 | $ hg update 7 | |
105 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
106 | $ cat d2/f10 |
|
108 | $ cat d2/f10 | |
107 | d2/f10 rev3 |
|
109 | d2/f10 rev3 | |
108 |
|
110 | |||
109 | $ cd .. |
|
111 | $ cd .. | |
110 |
|
112 | |||
111 | cannot clone with zero or negative depth |
|
113 | cannot clone with zero or negative depth | |
112 |
|
114 | |||
113 | $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth 0 |
|
115 | $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth 0 | |
114 | requesting all changes |
|
116 | requesting all changes | |
115 | remote: abort: depth must be positive, got 0 |
|
117 | remote: abort: depth must be positive, got 0 | |
116 | abort: pull failed on remote |
|
118 | abort: pull failed on remote | |
117 | [255] |
|
119 | [255] | |
118 | $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth -1 |
|
120 | $ hg clone --narrow ssh://user@dummy/master bad --include "d2" --depth -1 | |
119 | requesting all changes |
|
121 | requesting all changes | |
120 | remote: abort: depth must be positive, got -1 |
|
122 | remote: abort: depth must be positive, got -1 | |
121 | abort: pull failed on remote |
|
123 | abort: pull failed on remote | |
122 | [255] |
|
124 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now