You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hadmut Danisch <ha...@danisch.de> on 2006/08/26 09:03:49 UTC
Question about the diff algorithm...
Hi,
just a question about the diff algorithm:
When I do this with a new repository:
% date >test
% svn add test
A test
% svn commit -m ""
Adding test
Transmitting file data .
Committed revision 1.
% xxd some_large_file >>test
% ls -lF test
-rw-r----- 1 hadmut users 1741746 2006-08-26 10:56 test
% svn commit -m ""
Sending test
Transmitting file data .
Committed revision 2.
% date >> test
% svn commit -m ""
Sending test
Transmitting file data .
Committed revision 3.
% date >> test
% svn commit -m ""
Sending test
Transmitting file data .
Committed revision 4.
Then I have changed the file test only by adding one single line at
the end of the file between revision 2 and 3.
But then db/revs of the repository looks like that:
-rw-r----- 1 hadmut users 115 2006-08-26 10:52 0
-rw-r----- 1 hadmut users 375 2006-08-26 10:54 1
-rw-r----- 1 hadmut users 1405189 2006-08-26 10:56 2
-rw-r----- 1 hadmut users 1405227 2006-08-26 10:57 3
-rw-r----- 1 hadmut users 701 2006-08-26 10:58 4
Although the large amount of data was added only once, and revisions 2
and 3 differ only by one line of text, both revision files 2 and 3 are
large.
The difference between revisions 3 and 4 is similar to that between 2
and 3: Just a single line of text added at the end of the file. But
now the revision file is small.
Why is the revision file 3 big and the revision file 4 small? In both
cases I just did
date >> test
regards
Hadmut
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Question about the diff algorithm...
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 26, 2006, at 11:03, Hadmut Danisch wrote:
> Then I have changed the file test only by adding one single line at
> the end of the file between revision 2 and 3.
>
>
> But then db/revs of the repository looks like that:
>
> -rw-r----- 1 hadmut users 115 2006-08-26 10:52 0
> -rw-r----- 1 hadmut users 375 2006-08-26 10:54 1
> -rw-r----- 1 hadmut users 1405189 2006-08-26 10:56 2
> -rw-r----- 1 hadmut users 1405227 2006-08-26 10:57 3
> -rw-r----- 1 hadmut users 701 2006-08-26 10:58 4
>
>
> Although the large amount of data was added only once, and revisions 2
> and 3 differ only by one line of text, both revision files 2 and 3 are
> large.
>
> The difference between revisions 3 and 4 is similar to that between 2
> and 3: Just a single line of text added at the end of the file. But
> now the revision file is small.
>
>
> Why is the revision file 3 big and the revision file 4 small? In both
> cases I just did
>
> date >> test
That may be the skip-deltas algorithm at work. When storing in the
repository, a revision is not always diffed against the immediately
preceding revision, for performance reasons.
http://svn.collab.net/repos/svn/trunk/notes/skip-deltas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org