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

Re: Space wasting

From: Alvin Thompson <al_at_thompsonlogic.com>
Date: 2004-03-10 17:59:34 CET

yup, valid point, but wouldn't it be easier to prevent it from being
modified in the first place than have all those checks? see my response
to Philip Miller as i address this very thing there.

-alvin

Ben Gollmer wrote:
> On Tue, 9 Mar 2004 16:30:49 -0600, Alvin Thompson <al@thompsonlogic.com> wrote:
>
>>2. the point is, the svn commands use the contents of this directory as
>>well as the working copy when determining what to do. if the contents of
>>this directory were modified in a non-deterministic fashion, the
>>execution of svn commands may leave the wc in an undesired,
>>non-deterministic state, possibly unknown to the user. commits to the
>>repository would then leave the repository in an unknown,
>>non-deterministic state. further commands/commits may serve to aggravate
>>the problem.
>
>
> I still don't know how the repository can get into an unknown state if the wc's .svn dirs are
> munged. Subversion checksums the text-base on commit to guard against invalid diffs being sent. I
> tried to get bad data into a test repo, and failed. Maybe you can cook up an example that proves me
> wrong...
>
> $ svnadmin create foo
> $ svn co file:///home/ben/foo bar
> $ cd bar
> $ echo 'Test test test' > test1
> $ svn add test1
> $ svn ci -m "First commit"
>
> Now I have a file containing 'Test test test' in my repo. Time to b0rk the text-base...
>
> $ cd .svn/text-base
> $ echo 'This file is b0rked' > test1.svn-base
> test1.svn-base: Permission denied
>
> Clever! The text base is read-only. Well, I'll fix that...
>
> $ chmod 644 test1.svn-base
> $ echo 'This file is b0rked' > test1.svn-base
> $ cd ../../
> $ svn st
>
> Hmm, no output. I must have to update the timestamp.
>
> $ touch test1
> $ svn st
> M test1
>
> It shows the file as modified.
>
> $ svn diff test1
> Index: test1
> ===================================================================
> --- test1 (revision 1)
> +++ test1 (working copy)
> @@ -1 +1 @@
> -This file is borked
> +Test test test
>
> There's my diff. Time to commit my bad data.
>
> $ svn ci -m 'Bad commit'
> Sending test1
> Transmitting file data .svn: Commit failed (details follow):
> svn: Checksum mismatch for '/home/ben/bar/.svn/text-base/test1.svn-base': expected
> '52d9975b643290f73938ddf5142ce3d3', actual: 'bb41371d721f8469502441f1ad47a6bc'
>

-- 
Alvin Thompson
Navy: 34
Army: 6
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 10 19:51:22 2004

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.