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

Re: text-base penalty: A proposed solution

From: Bob Gustafson <bobgus_at_rcnChicago.com>
Date: 2002-12-20 02:37:49 CET

Mummble, mumble..

The history of a file:

1) The file is stored read-only in the working directory.
2) The delta (empty file) is stored in the .svn/ area.

3) The client-user sucks the file up into the editor (vim) and makes
changes. All the changes are buffered under the control of the editor
(normal) either in memory or as a temp file on disk.

4) When the client-user writes the changes out to disk, the autowritepre
event triggers an editor script which checks:

a) if the file is read-only
b) if there is a .svn directory and
c) if there is a stack of deltas (may be empty) for that file

If abc are true, Vim then writes the changed file out to disk with a unique
name, calls the svn diff routine to create a delta, stores the delta into
the .svn/ area, renames the unique named file to the same name as the
unchanged file (wiping old file) and sets the read-only state on the newly
changed file.

---
5) When the file is edited again, the again changed file is in memory, the
previously changed file is read-only on disk. A new delta is calculated as
per 4 above and added to the previous stack of deltas in the .svn/
directory.
---
After awhile, there will be a stack of deltas for each changed file in the
.svn/ area, all the files in the working directory will be read-only (to
filter the Vim script action to only svn related actions) and the amount of
storage required will be the minimum possible.
BobG
>On 19 Dec 2002, Bob Gustafson <bobgus@rcnChicago.com> wrote:
>> And, yet another scheme to save storage would be to store the delta rather
>> than the whole pristine file. Initially, the delta would be an empty
>> file!
>
>The delta between what?  Between the basis and the working copy?  When
>the wc changes, how does it know to update this delta?
>
>Are you assuming an in-kernel system or something?
>
>--
>Martin
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 20 02:38:39 2002

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.