On Tuesday 24 May 2011 12:58 AM, Stefan Sperling wrote:
> On Mon, May 23, 2011 at 11:07:50PM +0400, Konstantin Kolinko wrote:
>> In svn 1.7 there is pristine storage area in the working copy, where
>> all present files are stored by their checksums. If I understand this
>> pristine storage correctly, if you move a file remotely on the server
>> (svn mv URL URL) then when you update your working copy and both old
>> and new paths are in the same working copy, Subversion will find the
>> file in its pristine storage and won't re-download it over network. If
>> what I wrote is true (I have not verified whether this actually works
>> this way, but I have some hopes),
> Unfortunately, that's not how it works.
> When a new file is added during an update, the entire file content is
> first spooled to a temporary file to calculcate its checksum.
> If a pristine with the same checksum is already present, the temporary
> file is deleted.
> (see pristine_install_txn() in subversion/libsvn_wc/wc_db_pristine.c)
Why can't we send the recorded checksum from the server instead of
sending the whole file and then calculating it on the client side?
If the checksum matches one of the pristine files, then use that to
populate the nodes table. If there is no match, only then do we spool to
a temporary file and what not.
This seems like a straightforward idea. Any pitfalls to this approach?
Received on 2011-05-24 08:35:08 CEST