I want to sync/copy a single project out of a moderate large SVN repo using the (usual) sequence
svnadmin create %mirror%
rem make insecure dummy hook
echo rem dummy > %mirror%\hooks\pre-revprop-change.bat
svnsync init %mirror_url% http://svn/original/...
svnsync sync %mirror_url%
This works but takes long time, see related question. In fact I do not need any revisions prior to e.g. r=17830. And the real problem is that the original repo seems to be corrupt before this revision and I can't convert it to hg, so I try to workaround ...
Question: Is there a way to fake the newly created repo (after 4th line) so it "believes" it has revision 17830 already and continues with newer ones. (Maybe some propset magic?) There are no changes in the project/folder before that revision.
svnsync will copy revisions based on value in the 'current' file (of the destination repo), and the entry in the svnsync revprop 0 file that says which is the last revision copied. Initialise svnsync, then fudge both of these numbers to your desired revision and it should work as you want.
From my experiments based and helped by the answers, I believe this is not possible.
Try this, (just figured this out)
1) check out a working copy of the repository you are syncing to
2a) generate a patch with svn diff -rcurrent:next from the source repository (so current is the current revision, and next is the next one that is broken) however, most of the I found svn diff still works
2b) or, add a dummy file to the repository you are syncing to and tag it (so you can check in something)
3) do a svn ci -m 'syncfix' which will bump the repository you are syncing to
4) after this, svnsync sync will continue most of the time
5) sometimes it will complain the HEAD is one revision in the future. To fix this go to /db/revprops/0 edit the 0 file, chmod +w 0 bump the revision,
6) after this, svnsync sync will continue
7) below is a script I just made to get over the bumps, the end result will probably not be perfect but it will get most of the stuff in. then you can fix the end result by exporting into it from the HEAD of the repository you are syncing from.
Ondrej Popp
The SVN mailing list has an answer to that topic; see http://svn.haxx.se/dev/archive-2010-02/0114.shtml
This is possible.
You need to create dummy rev files in the folders
\db\revprops\0
and\db\revs\0
so that you don't get the errorthere is no revision 17830
.