revs can be skipped in replay mode, leading to history divergence
I've observed this happen several times while cloning a repo. (Pulling would also be affected, since it's the same code.)
An example scenario:
- Trunk-only clone.
- In the svn repo, trunk has been accidentally deleted, then restored via
- A directory that existed before trunk was deleted and restored is deleted long after the restore, and this delete is the only event in the rev.
- The rev is silently skipped while pulling from svn into hg.
I believe the root cause is that hgsubversion is not using replay mode correctly; it's calling
ra.get_log to retrieve a list of revs, then
ra.replay to replay each.
Alas, when called on a directory below root,
ra.get_log will happily not report certain events that relate to files or directories that existed before the delete/restore of that directory. Since
ra.get_log doesn't tell us about the revs in question, we never call
ra.replay on them, and they never show up.
svnsync does not suffer from this problem, and it uses a slightly different reply mechanism: the entire replay is driven by a call to