comparison tests/test-subrepo-recursion.t @ 37338:cbc4425e81b5

tests: conditionalize tests based on presence of revlogs for files ~85 tests don't like our non-revlog file store for various reasons. This commit introduces hghave functionality for declaring and querying repository features. By default, we assume repositories have revlog-based file storage. But if the HGREPOFEATURES environment variable is set, we can override the default set of repository features. If you run the test harness with our simplestorerepo extension and an environment variable set to the proper value, you can override the hghave defaults to agree with simplestorerepo's version of reality. Various tests have been modified so behavior dependent on revlog-based file storage is marked as such. This fixes a handful of test failures with our custom file storage extension. But dozens remain. The point of this commit is to demonstrate how tests will need to be modified to account for custom storage implementations. TBH, I'm not convinced hghave is the proper layer for repository feature detection. I /think/ we'll eventually want something in run-tests.py itself. But that would require inventing a new primitive in the test harness. This is all very alpha at the moment. So I think hghave is an acceptable place to hang this feature detection. I think the right time to be thinking about integrating this into run-tests.py is *after* we have a stable alternate storage implementation in core. For now, let's try to make progress towards the idea of an alternate storage backend. Differential Revision: https://phab.mercurial-scm.org/D3030
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 03 Apr 2018 18:15:24 -0700
parents fb278041df06
children c2c8962a9465
comparison
equal deleted inserted replaced
37337:d257c5f2a940 37338:cbc4425e81b5
460 linking [ <=> ] 4\r (no-eol) (esc) 460 linking [ <=> ] 4\r (no-eol) (esc)
461 linking [ <=> ] 5\r (no-eol) (esc) 461 linking [ <=> ] 5\r (no-eol) (esc)
462 linking [ <=> ] 6\r (no-eol) (esc) 462 linking [ <=> ] 6\r (no-eol) (esc)
463 linking [ <=> ] 7\r (no-eol) (esc) 463 linking [ <=> ] 7\r (no-eol) (esc)
464 linking [ <=> ] 8\r (no-eol) (esc) 464 linking [ <=> ] 8\r (no-eol) (esc)
465 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
466 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
467 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
468 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
469 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
465 \r (no-eol) (esc) 470 \r (no-eol) (esc)
466 #else 471 #else
467 $ hg clone -U . ../empty 472 $ hg clone -U . ../empty
468 \r (no-eol) (esc) 473 \r (no-eol) (esc)
469 linking [ <=> ] 1 (no-eol) 474 linking [ <=> ] 1 (no-eol)
485 linking [ <=> ] 4\r (no-eol) (esc) 490 linking [ <=> ] 4\r (no-eol) (esc)
486 linking [ <=> ] 5\r (no-eol) (esc) 491 linking [ <=> ] 5\r (no-eol) (esc)
487 linking [ <=> ] 6\r (no-eol) (esc) 492 linking [ <=> ] 6\r (no-eol) (esc)
488 linking [ <=> ] 7\r (no-eol) (esc) 493 linking [ <=> ] 7\r (no-eol) (esc)
489 linking [ <=> ] 8\r (no-eol) (esc) 494 linking [ <=> ] 8\r (no-eol) (esc)
495 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
496 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
497 linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !)
498 linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !)
499 linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !)
500 linking [ <=> ] 14\r (no-eol) (esc) (reposimplestore !)
501 linking [ <=> ] 15\r (no-eol) (esc) (reposimplestore !)
490 \r (no-eol) (esc) 502 \r (no-eol) (esc)
491 \r (no-eol) (esc) 503 \r (no-eol) (esc)
492 archiving (foo) [ ] 0/3\r (no-eol) (esc) 504 archiving (foo) [ ] 0/3\r (no-eol) (esc)
493 archiving (foo) [===========> ] 1/3\r (no-eol) (esc) 505 archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
494 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) 506 archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
499 linking [ <=> ] 2\r (no-eol) (esc) 511 linking [ <=> ] 2\r (no-eol) (esc)
500 linking [ <=> ] 3\r (no-eol) (esc) 512 linking [ <=> ] 3\r (no-eol) (esc)
501 linking [ <=> ] 4\r (no-eol) (esc) 513 linking [ <=> ] 4\r (no-eol) (esc)
502 linking [ <=> ] 5\r (no-eol) (esc) 514 linking [ <=> ] 5\r (no-eol) (esc)
503 linking [ <=> ] 6\r (no-eol) (esc) 515 linking [ <=> ] 6\r (no-eol) (esc)
516 linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !)
517 linking [ <=> ] 8\r (no-eol) (esc) (reposimplestore !)
518 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
504 \r (no-eol) (esc) 519 \r (no-eol) (esc)
505 \r (no-eol) (esc) 520 \r (no-eol) (esc)
506 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) 521 archiving (foo/bar) [ ] 0/1\r (no-eol) (esc)
507 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) 522 archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
508 \r (no-eol) (esc) 523 \r (no-eol) (esc)