Mercurial > hg
comparison tests/test-issue6528.t @ 49458:b10e4c19f8c5 stable
tests: improve portability by no longer using the flag [tar --force-local]
A different way of making sure the path is not interpreted as a URL is to never
give this path to [tar], instead making tar read from stdin.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Tue, 30 Aug 2022 10:52:32 +0100 |
parents | e91aa800ae5b |
children | 58e38c1a2370 |
comparison
equal
deleted
inserted
replaced
49448:5579a5e18a9b | 49458:b10e4c19f8c5 |
---|---|
175 It's a tarball because unbundle might magically fix the issue later. | 175 It's a tarball because unbundle might magically fix the issue later. |
176 | 176 |
177 $ cd .. | 177 $ cd .. |
178 $ mkdir repo-to-fix | 178 $ mkdir repo-to-fix |
179 $ cd repo-to-fix | 179 $ cd repo-to-fix |
180 #if windows | 180 $ tar -x < $TESTDIR/bundles/issue6528.tar |
181 tar interprets `:` in paths (like `C:`) as being remote, force local on Windows | |
182 only since some versions of tar don't have this flag. | |
183 | |
184 $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar | |
185 #else | |
186 $ tar xf $TESTDIR/bundles/issue6528.tar | |
187 #endif | |
188 | 181 |
189 Check that the issue is present | 182 Check that the issue is present |
190 (It is currently not present with rhg but will be when optimizations are added | 183 (It is currently not present with rhg but will be when optimizations are added |
191 to resolve ambiguous files at the end of status without reading their content | 184 to resolve ambiguous files at the end of status without reading their content |
192 if the size differs, and reading the expected size without resolving filelog | 185 if the size differs, and reading the expected size without resolving filelog |
283 -------------------------------- | 276 -------------------------------- |
284 | 277 |
285 $ cd .. | 278 $ cd .. |
286 $ mkdir repo-to-fix-report | 279 $ mkdir repo-to-fix-report |
287 $ cd repo-to-fix | 280 $ cd repo-to-fix |
288 #if windows | 281 $ tar -x < "$TESTDIR"/bundles/issue6528.tar |
289 tar interprets `:` in paths (like `C:`) as being remote, force local on Windows | |
290 only since some versions of tar don't have this flag. | |
291 | |
292 $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar | |
293 #else | |
294 $ tar xf $TESTDIR/bundles/issue6528.tar | |
295 #endif | |
296 | 282 |
297 $ hg debug-repair-issue6528 --to-report $TESTTMP/report.txt | 283 $ hg debug-repair-issue6528 --to-report $TESTTMP/report.txt |
298 found affected revision 1 for filelog 'data/D.txt.i' | 284 found affected revision 1 for filelog 'data/D.txt.i' |
299 found affected revision 1 for filelog 'data/b.txt.i' | 285 found affected revision 1 for filelog 'data/b.txt.i' |
300 found affected revision 3 for filelog 'data/b.txt.i' | 286 found affected revision 3 for filelog 'data/b.txt.i' |
377 > small_inline=$TESTTMP/ext/small_inline.py | 363 > small_inline=$TESTTMP/ext/small_inline.py |
378 > EOF | 364 > EOF |
379 | 365 |
380 $ mkdir repo-to-fix-not-inline | 366 $ mkdir repo-to-fix-not-inline |
381 $ cd repo-to-fix-not-inline | 367 $ cd repo-to-fix-not-inline |
382 #if windows | 368 $ tar -x < "$TESTDIR"/bundles/issue6528.tar |
383 tar interprets `:` in paths (like `C:`) as being remote, force local on Windows | |
384 only since some versions of tar don't have this flag. | |
385 | |
386 $ tar --force-local -xf $TESTDIR/bundles/issue6528.tar | |
387 #else | |
388 $ tar xf $TESTDIR/bundles/issue6528.tar | |
389 #endif | |
390 $ echo b >> b.txt | 369 $ echo b >> b.txt |
391 $ hg commit -qm "inline -> separate" | 370 $ hg commit -qm "inline -> separate" |
392 $ find .hg -name *b.txt.d | 371 $ find .hg -name *b.txt.d |
393 .hg/store/data/b.txt.d | 372 .hg/store/data/b.txt.d |
394 | 373 |