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

Re: Extract of irc log 'the rsync issue'

From: Branko Čibej <brane_at_xbc.nu>
Date: 2001-10-12 00:03:42 CEST

Greg Hudson wrote:

>We've also had bad experiences with developers keeping working
>directories on local disk. One co-worker lost three months of effort
>when his workstation's hard disk crashed. His project was never

I have no sympathy at all. He should have a) committed daily, and b) had
his machine backed up.

Back to the topic: There is a way to empty ./svn/text-base *and* not
have too much extra network traffic.

1) Write-protect (unmodified) WC files on checkout/update.
Yes, this isn't 100% safe; but a determined (l)user can go and delete
the files in the text base today.

2) At checkout time, write an MD5 and SHA1 hash of the pristine file
into ./svn/entries, along with the timestamp.
These hashes would be used instead of the pristine copy to determine if
the file has changed locally. Two different hashes, to make it less
probable that changes go undetected.

3) Provide a new command, "svn modify":

   1. If the WC file hasn't changed since the last update, copy it to
      text-base . After that, commits and local mods will work as usual.
   2. If the WC file *has* changed, and the pristine copy isn't
      available,, fetch the pristine text from the server.
   3. Make the WC file writable

4) "svn up" should do the check under 2. above. Same for diff, etc.

5) "svn ci" should write-protect the file, update the hashes and clean
out text-base.

6) "svn revert" should undo "svn modify"

Yes, it's not trivial, but it's straight-forward. The nice thing is
that, in most cases and with well-behaved users, "svn mod" will be a
local operation (unlike "cvs edit").

Another nice point is that we could actually recover from the case where
the pristine copy is deleted by mistake. Today, that would totally hose
the WC.

(And my pet project: we could hook reserved checkouts on "svn mod".)

Brane �ibej   <brane_at_xbc.nu>            http://www.xbc.nu/brane/
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:44 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.