On Tue, May 24, 2011 at 12:04:26PM +0530, Arwin Arni wrote:
> 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?
The pitfall is that you need to change the client<->server interface.
The current interface at subversion/include/svn_delta.h only transmits
checksums before and after applying deltas. First it transmits the checksum
of the expected base text for the delta (apply_textdelta), and then,
after the delta has been applied, it sends the expected checksum of the
content resulting from application of the delta to the base (close_file).
This interface doesn't prevent data from being transmitted.
A newer, albeit currently unusued, interface is at
This transmits the checksum of the expected content (svn_editor_set_text).
Supporting this new interface is a major piece of work planned for post-1.7.
Received on 2011-05-24 10:24:26 CEST