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.
Asked
Active
Viewed 126 times
1 Answers
0
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

Lazy Badger
- 94,711
- 9
- 78
- 110