Commit Graph

10 Commits

Author SHA1 Message Date
Mike Edgar
919b082a9b contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict 2014-09-12 21:38:52 -04:00
Mike Edgar
6431a1d631 contrib/synthrepo: only generate 2 parents if model contains merges
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.
2014-09-12 17:43:37 -04:00
Mike Edgar
97e4932db0 contrib/synthrepo: return None to delete files on commit, don't raise IOError
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.
2014-09-15 16:07:54 -04:00
Sean Farley
1002b6c612 memfilectx: call super.__init__ instead of duplicating code
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.
2013-08-15 16:49:27 -05:00
Augie Fackler
46b365066d synthrepo: move from dict() construction to {} literals
The latter are both faster and more consistent across Python 2 and 3.
2014-03-12 13:12:26 -04:00
Simon Heimberg
8a32578a00 cleanup: remove unused imports
detected by pyflakes
2013-06-13 01:36:58 +02:00
Bryan O'Sullivan
fb4f6a8456 synthrepo: add missing import of sys
Found using Cython.
2013-04-12 18:48:02 -07:00
Bryan O'Sullivan
75dc399824 synthrepo: do not crash if a list is empty 2012-12-10 11:18:03 -08:00
Siddharth Agarwal
acc48ffd83 url: use open and not url.open for local files (issue3624) 2012-10-17 21:30:08 -07:00
Bryan O'Sullivan
b5a37656e8 contrib: add a commit synthesizer for reproducing scaling problems
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.
2012-10-08 15:57:21 -07:00