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

Re: svn and "mostly-binary" repositories

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-10-01 19:28:31 CEST

Timothee Besset <timo@qeradiant.com> writes:

> The main problem I think is how to decide wether the local binary file is
> different from the repository one. Implementing a comparison by hashing
> the file would make sense I think, since it doesn't make a lot of sense to
> apply the patching techniques of svn to binary files.

As Greg said, earlier, Subversion currently caches secret, "pristine"
copies of files in the SVN/ area. It lets us do nice things, like
send diffs from client to server, run 'svn diff' and 'svn revert' as
non-network commands, etc.

The working-copy library uses this algorithm to detect if any file is
locally modified:

   * if the timestamps between the working and "pristine" files are
     identical, return NOT_CHANGED

   * else if the filesizes are different, return CHANGED

   * else do a byte-for-byte brute force comparison, and return
     result.

All files are treated equally in this regard; binari-ness or
text-ness doesn't matter.

If you commit a locally-modified file, a binary diff algorithm is
always used to transmit changes. It's probably not as tricky as
rsync, but it seems to be working well.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:43 2006

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

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