Importing multiple revisions in sync into SVN
Question: I have been developing a project without SVN for a while and now I wish to use
SVN. I have been keeping many revisions of this project as a series of
numbered tar.bz2 files (tarballs). I would like to import these many tarballs
into an SVN repository and keep the revision numbers all in sync (so that
tarball NNN becomes repository revision NNN). There are many of these versions
(a few hundred), so doing it all manually is not an option. I will automate
this in bash and/or Python. There are many gaps in the version sequence (about
500 versions go up to almost 700). Any suggestions on how to do this (SVN
features)? When I get done, the repository should look like I have been using
SVN all along. Only this one project will be in this one repository.


Answer: In short: you can't do it _easy_ , because:

  * revision-numbers in SVN-repo are a consecutive series of natural numbers without gaps (you can't commit r500 and r700 immediately after it)
  * for _useful history_ (which tracks not only _states_ , but also changes) you'll have **A Big Headache (tm)** for detecting and storing adding|deleting|moving files in WC

If you'll find _any automatable_ solution for p.2 (I can't see it in pure
Subversion) with p.1 (getting repo with gaps) you can try

  * Commit to repo all archives "as is", later dunp the whole repo to dump-file, edit (by hand?!) revision-numbers in human-readable dump and load dump into new fresh repo

or

  * Create gaps on comit stage: commit _anything_ unrelated to some special part of tree for revisions, which must not exist in final state, dump repo with exclusion of crap-tree (svnadmin dump + svndumpfilter or svnrdump) and restore dump in new fresh repo

PS - I'll recommend do not deceive or cheat (all of the described tricks can
be exposed relatively easy and fast; and not exposure, but just suspicion of
foul play will be enough): commit archives as is, use filenames of tarballs as
custom revision-property for navigation and history

