##// END OF EJS Templates
tests: document a known failing interaction between narrow and lfs...
Matt Harbison -
r40657:7c5a922b default
parent child Browse files
Show More
@@ -1,210 +1,225 b''
1 #testcases lfs-on lfs-off
2
3 #if lfs-on
4 $ cat >> $HGRCPATH <<EOF
5 > [extensions]
6 > lfs =
7 > EOF
8 #endif
1
9
2 $ . "$TESTDIR/narrow-library.sh"
10 $ . "$TESTDIR/narrow-library.sh"
3
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
7 $ cd master
15 $ cd master
8 $ cat >> .hg/hgrc <<EOF
16 $ cat >> .hg/hgrc <<EOF
9 > [narrow]
17 > [narrow]
10 > serveellipses=True
18 > serveellipses=True
11 > EOF
19 > EOF
12
20
13 $ mkdir inside
21 $ mkdir inside
14 $ echo 1 > inside/f
22 $ echo 1 > inside/f
15 $ mkdir inside2
23 $ mkdir inside2
16 $ echo 1 > inside2/f
24 $ echo 1 > inside2/f
17 $ mkdir outside
25 $ mkdir outside
18 $ echo 1 > outside/f
26 $ echo 1 > outside/f
19 $ hg ci -Aqm 'initial'
27 $ hg ci -Aqm 'initial'
20
28
21 $ echo 2 > inside/f
29 $ echo 2 > inside/f
22 $ hg ci -qm 'inside 2'
30 $ hg ci -qm 'inside 2'
23
31
24 $ echo 2 > inside2/f
32 $ echo 2 > inside2/f
25 $ hg ci -qm 'inside2 2'
33 $ hg ci -qm 'inside2 2'
26
34
27 $ echo 2 > outside/f
35 $ echo 2 > outside/f
28 $ hg ci -qm 'outside 2'
36 $ hg ci -qm 'outside 2'
29
37
30 $ cd ..
38 $ cd ..
31
39
32 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
40 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
33 requesting all changes
41 requesting all changes
34 adding changesets
42 adding changesets
35 adding manifests
43 adding manifests
36 adding file changes
44 adding file changes
37 added 3 changesets with 2 changes to 1 files
45 added 3 changesets with 2 changes to 1 files
38 new changesets *:* (glob)
46 new changesets *:* (glob)
39 updating to branch default
47 updating to branch default
40 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41
49
42 $ hg clone --narrow ssh://user@dummy/master narrow2 --include inside --include inside2
50 $ hg clone --narrow ssh://user@dummy/master narrow2 --include inside --include inside2
43 requesting all changes
51 requesting all changes
44 adding changesets
52 adding changesets
45 adding manifests
53 adding manifests
46 adding file changes
54 adding file changes
47 added 4 changesets with 4 changes to 2 files
55 added 4 changesets with 4 changes to 2 files
48 new changesets *:* (glob)
56 new changesets *:* (glob)
49 updating to branch default
57 updating to branch default
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
51
59
52 Can push to wider repo if change does not affect paths in wider repo that are
60 Can push to wider repo if change does not affect paths in wider repo that are
53 not also in narrower repo
61 not also in narrower repo
54
62
55 $ cd narrow
63 $ cd narrow
56 $ echo 3 > inside/f
64 $ echo 3 > inside/f
57 $ hg ci -m 'inside 3'
65 $ hg ci -m 'inside 3'
58 $ hg push ssh://user@dummy/narrow2
66 $ hg push ssh://user@dummy/narrow2
59 pushing to ssh://user@dummy/narrow2
67 pushing to ssh://user@dummy/narrow2
60 searching for changes
68 searching for changes
61 remote: adding changesets
69 remote: adding changesets
62 remote: adding manifests
70 remote: adding manifests
63 remote: adding file changes
71 remote: adding file changes
64 remote: added 1 changesets with 1 changes to 1 files
72 remote: added 1 changesets with 1 changes to 1 files
65
73
66 Can push to narrower repo if change affects only paths within remote's
74 Can push to narrower repo if change affects only paths within remote's
67 narrow spec
75 narrow spec
68
76
69 $ cd ../narrow2
77 $ cd ../narrow2
70 $ cat >> .hg/hgrc <<EOF
78 $ cat >> .hg/hgrc <<EOF
71 > [narrow]
79 > [narrow]
72 > serveellipses=True
80 > serveellipses=True
73 > EOF
81 > EOF
74 $ hg co -r 'desc("inside 3")'
82 $ hg co -r 'desc("inside 3")'
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 $ echo 4 > inside/f
84 $ echo 4 > inside/f
77 $ hg ci -m 'inside 4'
85 $ hg ci -m 'inside 4'
78 $ hg push ssh://user@dummy/narrow
86 $ hg push ssh://user@dummy/narrow
79 pushing to ssh://user@dummy/narrow
87 pushing to ssh://user@dummy/narrow
80 searching for changes
88 searching for changes
81 remote: adding changesets
89 remote: adding changesets
82 remote: adding manifests
90 remote: adding manifests
83 remote: adding file changes
91 remote: adding file changes
84 remote: added 1 changesets with 1 changes to 1 files
92 remote: added 1 changesets with 1 changes to 1 files
85
93
86 Can push to narrow repo if change affects only paths outside remote's
94 Can push to narrow repo if change affects only paths outside remote's
87 narrow spec
95 narrow spec
88
96
89 $ echo 3 > inside2/f
97 $ echo 3 > inside2/f
90 $ hg ci -m 'inside2 3'
98 $ hg ci -m 'inside2 3'
91 TODO: this should be successful
99 TODO: this should be successful
92 $ hg push ssh://user@dummy/narrow
100 $ hg push ssh://user@dummy/narrow
93 pushing to ssh://user@dummy/narrow
101 pushing to ssh://user@dummy/narrow
94 searching for changes
102 searching for changes
95 remote: adding changesets
103 remote: adding changesets
96 remote: adding manifests
104 remote: adding manifests
97 remote: adding file changes
105 remote: adding file changes
98 remote: transaction abort!
106 remote: transaction abort!
99 remote: rollback completed
107 remote: rollback completed
100 remote: abort: data/inside2/f.i@4a1aa07735e6: unknown parent! (reporevlogstore !)
108 remote: abort: data/inside2/f.i@4a1aa07735e6: unknown parent! (reporevlogstore !)
101 remote: abort: data/inside2/f/index@4a1aa07735e6: no node! (reposimplestore !)
109 remote: abort: data/inside2/f/index@4a1aa07735e6: no node! (reposimplestore !)
102 abort: stream ended unexpectedly (got 0 bytes, expected 4)
110 abort: stream ended unexpectedly (got 0 bytes, expected 4)
103 [255]
111 [255]
104
112
105 Can pull from wider repo if change affects only paths outside remote's
113 Can pull from wider repo if change affects only paths outside remote's
106 narrow spec
114 narrow spec
107 $ echo 4 > inside2/f
115 $ echo 4 > inside2/f
108 $ hg ci -m 'inside2 4'
116 $ hg ci -m 'inside2 4'
109 $ hg log -G -T '{rev} {node|short} {files}\n'
117 $ hg log -G -T '{rev} {node|short} {files}\n'
110 @ 7 d78a96df731d inside2/f
118 @ 7 d78a96df731d inside2/f
111 |
119 |
112 o 6 8c26f5218962 inside2/f
120 o 6 8c26f5218962 inside2/f
113 |
121 |
114 o 5 ba3480e2f9de inside/f
122 o 5 ba3480e2f9de inside/f
115 |
123 |
116 o 4 4e5edd526618 inside/f
124 o 4 4e5edd526618 inside/f
117 |
125 |
118 o 3 81e7e07b7ab0 outside/f
126 o 3 81e7e07b7ab0 outside/f
119 |
127 |
120 o 2 f3993b8c0c2b inside2/f
128 o 2 f3993b8c0c2b inside2/f
121 |
129 |
122 o 1 8cd66ca966b4 inside/f
130 o 1 8cd66ca966b4 inside/f
123 |
131 |
124 o 0 c8057d6f53ab inside/f inside2/f outside/f
132 o 0 c8057d6f53ab inside/f inside2/f outside/f
125
133
126 $ cd ../narrow
134 $ cd ../narrow
127 $ hg log -G -T '{rev} {node|short} {files}\n'
135 $ hg log -G -T '{rev} {node|short} {files}\n'
128 o 4 ba3480e2f9de inside/f
136 o 4 ba3480e2f9de inside/f
129 |
137 |
130 @ 3 4e5edd526618 inside/f
138 @ 3 4e5edd526618 inside/f
131 |
139 |
132 o 2 81e7e07b7ab0 outside/f
140 o 2 81e7e07b7ab0 outside/f
133 |
141 |
134 o 1 8cd66ca966b4 inside/f
142 o 1 8cd66ca966b4 inside/f
135 |
143 |
136 o 0 c8057d6f53ab inside/f inside2/f outside/f
144 o 0 c8057d6f53ab inside/f inside2/f outside/f
137
145
138 $ hg pull ssh://user@dummy/narrow2
146 $ hg pull ssh://user@dummy/narrow2
139 pulling from ssh://user@dummy/narrow2
147 pulling from ssh://user@dummy/narrow2
140 searching for changes
148 searching for changes
141 adding changesets
149 adding changesets
142 adding manifests
150 adding manifests
143 adding file changes
151 adding file changes
144 added 1 changesets with 0 changes to 0 files
152 added 1 changesets with 0 changes to 0 files
145 new changesets d78a96df731d
153 new changesets d78a96df731d
146 (run 'hg update' to get a working copy)
154 (run 'hg update' to get a working copy)
147
155
148 Check that the resulting history is valid in the full repo
156 Check that the resulting history is valid in the full repo
149
157
150 $ cd ../narrow2
158 $ cd ../narrow2
151 $ hg push ssh://user@dummy/master
159 $ hg push ssh://user@dummy/master
152 pushing to ssh://user@dummy/master
160 pushing to ssh://user@dummy/master
153 searching for changes
161 searching for changes
154 remote: adding changesets
162 remote: adding changesets
155 remote: adding manifests
163 remote: adding manifests
156 remote: adding file changes
164 remote: adding file changes
157 remote: added 4 changesets with 4 changes to 2 files
165 remote: added 4 changesets with 4 changes to 2 files
158 $ cd ../master
166 $ cd ../master
159 $ hg verify
167 $ hg verify
160 checking changesets
168 checking changesets
161 checking manifests
169 checking manifests
162 crosschecking files in changesets and manifests
170 crosschecking files in changesets and manifests
163 checking files
171 checking files
164 checked 8 changesets with 10 changes to 3 files
172 checked 8 changesets with 10 changes to 3 files
165
173
166 Can not push to wider repo if change affects paths in wider repo that are
174 Can not push to wider repo if change affects paths in wider repo that are
167 not also in narrower repo
175 not also in narrower repo
168 $ cd ../master
176 $ cd ../master
169 $ hg co -r 'desc("inside2 4")'
177 $ hg co -r 'desc("inside2 4")'
170 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
178 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
171 $ echo 5 > inside2/f
179 $ echo 5 > inside2/f
172 $ hg ci -m 'inside2 5'
180 $ hg ci -m 'inside2 5'
173 $ hg log -G -T '{rev} {node|short} {files}\n'
181 $ hg log -G -T '{rev} {node|short} {files}\n'
174 @ 8 5970befb64ba inside2/f
182 @ 8 5970befb64ba inside2/f
175 |
183 |
176 o 7 d78a96df731d inside2/f
184 o 7 d78a96df731d inside2/f
177 |
185 |
178 o 6 8c26f5218962 inside2/f
186 o 6 8c26f5218962 inside2/f
179 |
187 |
180 o 5 ba3480e2f9de inside/f
188 o 5 ba3480e2f9de inside/f
181 |
189 |
182 o 4 4e5edd526618 inside/f
190 o 4 4e5edd526618 inside/f
183 |
191 |
184 o 3 81e7e07b7ab0 outside/f
192 o 3 81e7e07b7ab0 outside/f
185 |
193 |
186 o 2 f3993b8c0c2b inside2/f
194 o 2 f3993b8c0c2b inside2/f
187 |
195 |
188 o 1 8cd66ca966b4 inside/f
196 o 1 8cd66ca966b4 inside/f
189 |
197 |
190 o 0 c8057d6f53ab inside/f inside2/f outside/f
198 o 0 c8057d6f53ab inside/f inside2/f outside/f
191
199
192 $ cd ../narrow
200 $ cd ../narrow
193 $ hg pull
201 $ hg pull
194 pulling from ssh://user@dummy/master
202 pulling from ssh://user@dummy/master
195 searching for changes
203 searching for changes
196 adding changesets
204 adding changesets
197 adding manifests
205 adding manifests
198 adding file changes
206 adding file changes
199 added 1 changesets with 0 changes to 0 files
207 added 1 changesets with 0 changes to 0 files
200 new changesets * (glob)
208 new changesets * (glob)
201 (run 'hg update' to get a working copy)
209 (run 'hg update' to get a working copy)
202 TODO: this should tell the user that their narrow clone does not have the
210 TODO: this should tell the user that their narrow clone does not have the
203 necessary content to be able to push to the target
211 necessary content to be able to push to the target
204 $ hg push ssh://user@dummy/narrow2
212
213 TODO: lfs shouldn't abort like this
214 $ hg push ssh://user@dummy/narrow2 || true
205 pushing to ssh://user@dummy/narrow2
215 pushing to ssh://user@dummy/narrow2
206 searching for changes
216 searching for changes
207 remote: adding changesets
217 remote: adding changesets
208 remote: adding manifests
218 remote: adding manifests
209 remote: adding file changes
219 remote: adding file changes
210 remote: added 1 changesets with 0 changes to 0 files
220 remote: added 1 changesets with 0 changes to 0 files
221 remote: error: pretxnchangegroup.lfs hook raised an exception: data/inside2/f.i@f59b4e021835: no match found (lfs-on !)
222 remote: transaction abort! (lfs-on !)
223 remote: rollback completed (lfs-on !)
224 remote: abort: data/inside2/f.i@f59b4e021835: no match found! (lfs-on !)
225 abort: stream ended unexpectedly (got 0 bytes, expected 4) (lfs-on !)
General Comments 0
You need to be logged in to leave comments. Login now