##// END OF EJS Templates
tests: remove GNU quoting in test-subrepo-deep-nested-change.t...
Mads Kiilerich -
r17113:d7493da2 default
parent child Browse files
Show More
@@ -1,265 +1,264 b''
1 1 Preparing the subrepository 'sub2'
2 2
3 3 $ hg init sub2
4 4 $ echo sub2 > sub2/sub2
5 5 $ hg add -R sub2
6 6 adding sub2/sub2 (glob)
7 7 $ hg commit -R sub2 -m "sub2 import"
8 8
9 9 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
10 10
11 11 $ hg init sub1
12 12 $ echo sub1 > sub1/sub1
13 13 $ echo "sub2 = ../sub2" > sub1/.hgsub
14 14 $ hg clone sub2 sub1/sub2
15 15 updating to branch default
16 16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 17 $ hg add -R sub1
18 18 adding sub1/.hgsub (glob)
19 19 adding sub1/sub1 (glob)
20 20 $ hg commit -R sub1 -m "sub1 import"
21 21
22 22 Preparing the 'main' repo which depends on the subrepo 'sub1'
23 23
24 24 $ hg init main
25 25 $ echo main > main/main
26 26 $ echo "sub1 = ../sub1" > main/.hgsub
27 27 $ hg clone sub1 main/sub1
28 28 updating to branch default
29 29 cloning subrepo sub2 from $TESTTMP/sub2
30 30 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 31 $ hg add -R main
32 32 adding main/.hgsub (glob)
33 33 adding main/main (glob)
34 34 $ hg commit -R main -m "main import"
35 35
36 36 Cleaning both repositories, just as a clone -U
37 37
38 38 $ hg up -C -R sub2 null
39 39 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
40 40 $ hg up -C -R sub1 null
41 41 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
42 42 $ hg up -C -R main null
43 43 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
44 44 $ rm -rf main/sub1
45 45 $ rm -rf sub1/sub2
46 46
47 47 Clone main
48 48
49 49 $ hg clone main cloned
50 50 updating to branch default
51 51 cloning subrepo sub1 from $TESTTMP/sub1
52 52 cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
53 53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 54
55 55 Checking cloned repo ids
56 56
57 57 $ printf "cloned " ; hg id -R cloned
58 58 cloned 7f491f53a367 tip
59 59 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
60 60 cloned/sub1 fc3b4ce2696f tip
61 61 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
62 62 cloned/sub1/sub2 c57a0840e3ba tip
63 63
64 64 debugsub output for main and sub1
65 65
66 66 $ hg debugsub -R cloned
67 67 path sub1
68 68 source ../sub1
69 69 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
70 70 $ hg debugsub -R cloned/sub1
71 71 path sub2
72 72 source ../sub2
73 73 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
74 74
75 75 Modifying deeply nested 'sub2'
76 76
77 77 $ echo modified > cloned/sub1/sub2/sub2
78 78 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
79 79 committing subrepository sub1
80 80 committing subrepository sub1/sub2 (glob)
81 81
82 82 Checking modified node ids
83 83
84 84 $ printf "cloned " ; hg id -R cloned
85 85 cloned ffe6649062fe tip
86 86 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
87 87 cloned/sub1 2ecb03bf44a9 tip
88 88 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
89 89 cloned/sub1/sub2 53dd3430bcaf tip
90 90
91 91 debugsub output for main and sub1
92 92
93 93 $ hg debugsub -R cloned
94 94 path sub1
95 95 source ../sub1
96 96 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
97 97 $ hg debugsub -R cloned/sub1
98 98 path sub2
99 99 source ../sub2
100 100 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
101 101
102 102 Check that deep archiving works
103 103
104 104 $ cd cloned
105 105 $ echo 'test' > sub1/sub2/test.txt
106 106 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
107 107 $ mkdir sub1/sub2/folder
108 108 $ echo 'subfolder' > sub1/sub2/folder/test.txt
109 109 $ hg --config extensions.largefiles=! add sub1/sub2/folder/test.txt
110 110 $ hg ci -Sm "add test.txt"
111 111 committing subrepository sub1
112 112 committing subrepository sub1/sub2 (glob)
113 113 $ hg --config extensions.largefiles=! archive -S ../archive_all
114 114 $ find ../archive_all | sort
115 115 ../archive_all
116 116 ../archive_all/.hg_archival.txt
117 117 ../archive_all/.hgsub
118 118 ../archive_all/.hgsubstate
119 119 ../archive_all/main
120 120 ../archive_all/sub1
121 121 ../archive_all/sub1/.hgsub
122 122 ../archive_all/sub1/.hgsubstate
123 123 ../archive_all/sub1/sub1
124 124 ../archive_all/sub1/sub2
125 125 ../archive_all/sub1/sub2/folder
126 126 ../archive_all/sub1/sub2/folder/test.txt
127 127 ../archive_all/sub1/sub2/sub2
128 128 ../archive_all/sub1/sub2/test.txt
129 129
130 130 Check that archive -X works in deep subrepos
131 131
132 132 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
133 133 $ find ../archive_exclude | sort
134 134 ../archive_exclude
135 135 ../archive_exclude/.hg_archival.txt
136 136 ../archive_exclude/.hgsub
137 137 ../archive_exclude/.hgsubstate
138 138 ../archive_exclude/main
139 139 ../archive_exclude/sub1
140 140 ../archive_exclude/sub1/.hgsub
141 141 ../archive_exclude/sub1/.hgsubstate
142 142 ../archive_exclude/sub1/sub1
143 143 ../archive_exclude/sub1/sub2
144 144 ../archive_exclude/sub1/sub2/sub2
145 145
146 146 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
147 147 $ find ../archive_include | sort
148 148 ../archive_include
149 149 ../archive_include/sub1
150 150 ../archive_include/sub1/sub2
151 151 ../archive_include/sub1/sub2/folder
152 152 ../archive_include/sub1/sub2/folder/test.txt
153 153 ../archive_include/sub1/sub2/test.txt
154 154
155 155 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
156 156 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
157 157 subrepos are archived properly.
158 158 Note that add --large through a subrepo currently adds the file as a normal file
159 159
160 160 $ echo "large" > sub1/sub2/large.bin
161 161 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
162 162 $ echo "large" > large.bin
163 163 $ hg --config extensions.largefiles= add --large large.bin
164 164 $ hg --config extensions.largefiles= ci -S -m "add large files"
165 165 committing subrepository sub1
166 166 committing subrepository sub1/sub2 (glob)
167 167
168 168 $ hg --config extensions.largefiles= archive -S ../archive_lf
169 169 $ find ../archive_lf | sort
170 170 ../archive_lf
171 171 ../archive_lf/.hg_archival.txt
172 172 ../archive_lf/.hgsub
173 173 ../archive_lf/.hgsubstate
174 174 ../archive_lf/large.bin
175 175 ../archive_lf/main
176 176 ../archive_lf/sub1
177 177 ../archive_lf/sub1/.hgsub
178 178 ../archive_lf/sub1/.hgsubstate
179 179 ../archive_lf/sub1/sub1
180 180 ../archive_lf/sub1/sub2
181 181 ../archive_lf/sub1/sub2/folder
182 182 ../archive_lf/sub1/sub2/folder/test.txt
183 183 ../archive_lf/sub1/sub2/large.bin
184 184 ../archive_lf/sub1/sub2/sub2
185 185 ../archive_lf/sub1/sub2/test.txt
186 186 $ rm -rf ../archive_lf
187 187
188 188 Exclude large files from main and sub-sub repo
189 189
190 190 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
191 191 $ find ../archive_lf | sort
192 192 ../archive_lf
193 193 ../archive_lf/.hg_archival.txt
194 194 ../archive_lf/.hgsub
195 195 ../archive_lf/.hgsubstate
196 196 ../archive_lf/main
197 197 ../archive_lf/sub1
198 198 ../archive_lf/sub1/.hgsub
199 199 ../archive_lf/sub1/.hgsubstate
200 200 ../archive_lf/sub1/sub1
201 201 ../archive_lf/sub1/sub2
202 202 ../archive_lf/sub1/sub2/folder
203 203 ../archive_lf/sub1/sub2/folder/test.txt
204 204 ../archive_lf/sub1/sub2/sub2
205 205 ../archive_lf/sub1/sub2/test.txt
206 206 $ rm -rf ../archive_lf
207 207
208 208 Exclude normal files from main and sub-sub repo
209 209
210 210 $ hg --config extensions.largefiles= archive -S -X '**.txt' ../archive_lf
211 211 $ find ../archive_lf | sort
212 212 ../archive_lf
213 213 ../archive_lf/.hgsub
214 214 ../archive_lf/.hgsubstate
215 215 ../archive_lf/large.bin
216 216 ../archive_lf/main
217 217 ../archive_lf/sub1
218 218 ../archive_lf/sub1/.hgsub
219 219 ../archive_lf/sub1/.hgsubstate
220 220 ../archive_lf/sub1/sub1
221 221 ../archive_lf/sub1/sub2
222 222 ../archive_lf/sub1/sub2/large.bin
223 223 ../archive_lf/sub1/sub2/sub2
224 224 $ rm -rf ../archive_lf
225 225
226 226 Include normal files from within a largefiles subrepo
227 227
228 228 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
229 229 $ find ../archive_lf | sort
230 230 ../archive_lf
231 231 ../archive_lf/.hg_archival.txt
232 232 ../archive_lf/sub1
233 233 ../archive_lf/sub1/sub2
234 234 ../archive_lf/sub1/sub2/folder
235 235 ../archive_lf/sub1/sub2/folder/test.txt
236 236 ../archive_lf/sub1/sub2/test.txt
237 237 $ rm -rf ../archive_lf
238 238
239 239 Include large files from within a largefiles subrepo
240 240
241 241 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
242 242 $ find ../archive_lf | sort
243 243 ../archive_lf
244 244 ../archive_lf/large.bin
245 245 ../archive_lf/sub1
246 246 ../archive_lf/sub1/sub2
247 247 ../archive_lf/sub1/sub2/large.bin
248 248 $ rm -rf ../archive_lf
249 249
250 250 Find an exact largefile match in a largefiles subrepo
251 251
252 252 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
253 253 $ find ../archive_lf | sort
254 254 ../archive_lf
255 255 ../archive_lf/sub1
256 256 ../archive_lf/sub1/sub2
257 257 ../archive_lf/sub1/sub2/large.bin
258 258 $ rm -rf ../archive_lf
259 259
260 260 Find an exact match to a standin (should archive nothing)
261 261 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
262 $ find ../archive_lf | sort
263 find: `../archive_lf': No such file or directory
262 $ find ../archive_lf 2> /dev/null | sort
264 263
265 264 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now