I have a rather large project (13 GB) and a poor internet connection. I brought a copy of my working directory home on a flash
drive – but without the .svn directory which would have doubled the
size.
I was hoping to copy the flash drive contents and then turn it into a proper working directory. Essentially a checkout, but with the 13 GB of files provided by my flash drive.
- This idea https://stackoverflow.com/a/861020/826062 is to import the flash drive files into a new local repo, check out that repo, then sw –relocate that checkout to the online one. Note that this requires setting the UUID of the local repo otherwise SVN balks.
This clever idea doesn’t work for various reasons (E155017: Checksum mismatch or “An obstructing working copy was found”).
- My next idea was to create an empty tree of the checkout (cheap to do over my connection), then rsync my files into it. SVN isn’t terribly interested in doing this (various problems with restoring depth to infinity).
With many of these ideas/experiments, SVN tries to download the whole thing over my connection again (possibly because it can’t checksum to compare local with remote?)
Sorry for the long explanation, but I think it’s necessary for the whole picture.
Anybody else try to bring copied local files into sync with an existing SVN repo?
The
.svndirectory contains a “clean” copy of each of the versioned source files, which is what makes it so big. It also contains metadata though, which would be very difficult to reconstruct.In contrast, the working files can be easily reconstructed from the clean copies in
.svn. So an alternative approach would be to copy only the.svndirectory, and then runsvn revert -R .to restore the working files with no further network traffic.