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'
--
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 10 08:26:47 2004