[PATCH 0 of 6] convert: add --startrev option

Patrick Mezard pmezard at gmail.com
Tue Jan 1 17:03:10 CST 2008


Add --startrev option to convert extension.

Only the start revision and its descendant are converted, others are marked as
skipped. It makes roundtripping with another SCM much faster, no need to
process the whole history with all possible conversion issues.

The current implementation is a trade-off between fetched history and fetched
data. Every --startrev run retrieves all non-skipped revisions to compute the
descendants set. This operation is cheap on local repositories but becomes more
and more expensive for remote ones. I do not think this should prevent this
feature to be added because the intended use case is to use these shallow
conversions as local bridges with other systems. If operations becomes too
slow, the base repository can be dropped and recreated again from a more recent
revision. Secondly, the "all non-skipped revisions" equals to "start revisions
descendants + new revisions since last run" because all non-descendants are
processed as skipped. Sources receive the start revision and can improve their
retrieval strategy, which is done in the subversion case. If the converted
repository is a cheap bridge and the source repository is not too branchy, then
only the initialization run needs --startrev. Following ones may generate fake
root revisions based on previously skipped parents but the conversion will be
much faster and will only requires new revisions history. Finally, if we really
want performance here, we could cache the converted source revision graph for
non-local repositories.


More information about the Mercurial-devel mailing list