If `hg analyze` is run on a revision set which contains no merges, then
`hg synthesize` will raise IndexError trying to select from p2distance,
which will be empty.
The internal commit API was changed in 2eef89bfd70d to expect None from the
filectx function when a file is to be deleted, not an IOError. This change
keeps synthrepo up-to-date.
This patch changes the calling signature of memfilectx's __init__ to fall in
line with the other file contexts.
Calling code and tests have been updated accordingly.
This adds two new commands:
- analyze examines an existing repo and writes out a statistical
description of its properties that contains no identifying
information.
- synthesize creates new commits based on the description generated
by analyze.
The intention is that a repo constructed using synthesize will have
properties that are vaguely statistically similar to the originating
repo, but entirely random content.
This can be useful for forecasting performance as a repo grows, and
for developers who want to find bottlenecks in proprietary repos
to which they do not have access.