Commit Graph

5 Commits

Author SHA1 Message Date
Jun Wu
af17261b14 treestate: enable by default
Summary:
Enable it by default so all tests run with it.

The test changes are mostly caused by repo requirement changes.

Reviewed By: DurhamG

Differential Revision: D8880991

fbshipit-source-id: f96cecfd85b8088098c3b55d06ab0374ee93437b
2018-07-27 18:04:56 -07:00
Jun Wu
5ee658c927 test-hgext-repogenerator: use treestate
Summary: The test change is caused by treestate having side effect on RNG.

Reviewed By: DurhamG

Differential Revision: D8907647

fbshipit-source-id: 71f4989a137454dd8717a734ee1905aa5b6a42de
2018-07-27 18:04:56 -07:00
Phil Cohen
eb1f92e6ec repogenerator: allow starting rev to be configured
Summary: Sometimes it's useful to be able to resume generation from a commit that isn't the tip (e.g., after recloning or pulling).

Reviewed By: singhsrb

Differential Revision: D8217644

fbshipit-source-id: fd622ed20e1e3782f3bc3e2df58a2d33425ea496
2018-05-31 12:33:26 -07:00
Jun Wu
77638ffcc0 treedirstate: actually enable it in tests
Summary:
Previously it is not actually used.

`test-hgext-repogenerator.t` changed because treedirstate uses random
number to generate file names.

`fakedirstatewritetime.py` was updated to be treedirstate-aware. This
makes test-revert.t test-merge-tools.t test-merge1.t pass.

Reviewed By: singhsrb

Differential Revision: D7844960

fbshipit-source-id: 33a1d0d4a8e22ea5e6bb6454956884571fcf6bab
2018-05-02 17:15:36 -07:00
Phil Cohen
487a3fb991 repogenerator: add new files and directories over time
Summary:
The megarepo generator now adds new directories and files automatically. We now pick folders and paths randomly, with a configurable number of subdirectories and a configurable length for the leaf filename, and a fixed alphabet.

The array of directories and leaf filenames are prorated: they start out constrained and grow as we approach our desired number of commits to generate (`repogenerator.numcommits`), so as not to be too sparse initially.

The directory array is randomized initially, so the above proration doesn't lead to a trivial edit pattern (e.g. everything in a/* initially.)

Lastly, we now stop generation when we hit our goal.

Reviewed By: quark-zju

Differential Revision: D7572968

fbshipit-source-id: b60d60b6262962ee114cb19b0989e6a1af8c0549
2018-04-13 21:51:54 -07:00