[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Keep only one copy of each unique file in the repository

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-02-08 22:18:50 CET

On Feb 8, 2007, at 15:12, MrR08040 wrote:

> It seems that if I add two files that have the same cryptographic hash
> (but different filenames) Subversion saves both files in the
> repository. I tested this with a fresh repository and the same 10MB
> file named foo and bar. After adding foo the repository was ~13MB and
> after adding bar it grew another ~10MB.
>
> I searched the issue tracker and mailing list archives but I didn't
> see anything about keeping only one copy of each unique file that's
> added to a repository.
>
> Has this been discussed before?

No, I haven't heard any discussion of this before. You would like for
Subversion to store only a single copy, to save disk space?

Subversion doesn't store complete files; it stores deltas against
previous revisions. So the only case in which this would help is if
you add two files of the same contents. It wouldn't help, for
example, if you have two files, make different edits to each, and
eventually arrive at two files that are the same.

The Subversion way to add two files of the same contents and store it
in the repository only once is to "svn add" the one, then "svn cp" it
to the other.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 8 22:19:20 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.