3

I am trying to find out how svn stores text files internally.

For eg: I have an SVN repo, with the following sub-directory structure,

dirA/file_xx   - say size 10MB
dirB/file_xx   - identical file, but a copy - size is same 10MB

My question is, will SVN store 2 copies of the file internally even though they are identical or does it figure out, that it is a copy and store only 1 file with a total size of 10MB.

I tried the same test on GIT and was able to verify, that it was indeed only storing 1 copy. The online git documentation also had a mention of the same.

Since i have access to the SVN server, i tried doing a du -hs on the SVN DB and it seems like, SVN also stores just 1 copy of the file. I am unsure if this is because the files are compressed or because if it is indeed storing only 1 copy of the file.

PS:I am not interested in the size after multiple checkin's or deltas. Just the size of the repo after the initial checkin.

Thanks Abhi

Abhi Tk
  • 91
  • 7
  • I think this is answered here: http://stackoverflow.com/questions/2332833/how-exactly-does-subversion-store-files-in-the-repository – vielmetti Aug 11 '16 at 02:06
  • @vielmetti the link only answers w.r.t to delta's. But in my example there are no delta's or multiple checkins. I am curious about the storage after a single checkin. Hope that helps. – Abhi Tk Aug 11 '16 at 03:11
  • What back end database are you using for Subversion? If I read that post correctly, the answer is subject to variation depending on whether the underlying database is BDB or FSFS, and even then it's an implementation detail subject to change. – vielmetti Aug 11 '16 at 03:17

0 Answers0