Re: Add as copy?
"Thomas Singer via dev" <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Stefan, Thanks. OK, that's even better. -- Thomas On Wed, 08-Jul-26 11:42, Stefan Sperling wrote: > On Wed, Jul 08, 2026 at 11:13:18AM +0200, Thomas Singer via dev wrote: >> Hi all, >> >> We use our SVN repository mostly for binary files and it happens quite often >> to have the same file contents at different paths/names (intentionally). We >> do not use SVN commands to create copies, but just copy them using normal >> file operations. >> >> Is there a command that compares the hash of the file to add with the ones >> of existing tracked files and instead of adding a new file, just marking it >> as a copy of another? > > De-duplication of file content is already handled internally in two ways: > > There will only be one copy of the file's content in the working copy's > pristine store (where content is indexed by SHA1 checksum rather than by > path), and only one copy of the file's content in the repository (unless > you have explicitly disabled representation sharing in the fsfs.conf file > on the server). > > However, there will be multiple on-disk copies of file content in the > working copy since Subversion was designed to enable independent > modifications at each path in the working copy. If you need de-duplication > of the working files as well then consider storing your working copies on > a filesystem which supports de-duplication and copy-on-write internally, > if your operating system offers such a feature. See this fairly recent > discussion thread for some hints: https://marc.info/?t=178057784400005&r=1&w=2