I like that Subversion 1.7 now has all the pristines in one place for a working copy. However, I often have several checkouts of the same codebase (largely to replicate the stash function that doesn’t exist yet).
To save disk space, is there any way to combine all these pristine folders, so I don’t have multiple clean copies? In particular:
- Is it unsafe to have “extra” clean files in there, that aren’t base copies of any of the currently checked-out files
- Can this be done using links somehow, especially on Windows?
I looked in Dmitry’s answer, but I think there’s an easier way, which is using hard links on the files in the pristine directories. Then deletion of one version of the file doesn’t affect the other copies. The downside is many tools (eg, backup software) will still backup the pristines multiple times, but my main disk isn’t eaten up as much.
Also, I’ve learned from this that running svn cleanup occasionally can save a lot of local disk space if you have big changes!
In summary, my svnclone.bat looks roughly like this:
This is much quicker than a straight copy as well.
The downside is that over time, if these clones are long-lived, then duplicates will appear. But I think for my usage it’s good enough.
The ln.exe is from http://schinagl.priv.at/nt/ln/ln.html