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

Re: Missing checks for error diagnostics

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Fri, 05 Sep 2008 15:37:33 -0400

Julian Foad <julianfoad_at_btopenworld.com> writes:
> Thank you. This reproduction recipe makes it very clear what the problem
> is and how to reproduce it.
>
> I hope somebody will think of a solution and volunteer to fix it. (I
> don't suppose you know anybody who could do it, do you? The rest of us
> would be available to help, of course.)

Actually, an *enormous* help would just be to write a test case for
this, Jens, if you have time/energy for it. See

   http://svn.collab.net/viewvc/svn?view=rev&revision=32142

for an example of how a test is added (although note that that test is
rather more complex than yours would need to be).

If we had a regression test for this, that would reduce the amount of
time needed to fix it by at least half. And I think this test would be
fairly easy to write...

-Karl

>> $ svnadmin create repos
>> $ svnadmin create repos2
>> $ R=file://$(pwd)/repos
>> $ R2=file://$(pwd)/repos2
>>
>> Create a directory wc2/dir/ with a .svn/ subdirectory:
>>
>> $ svn co $R2 wc2
>> Checked out revision 0.
>> $ svn mkdir wc2/dir
>> A wc2/dir
>> $ touch wc2/dir/file
>> $ svn add wc2/dir/file
>> A wc2/dir/file
>> $ svn ci -m"Created dir/ with a file" wc2
>> Adding wc2/dir
>> Adding wc2/dir/file
>> Transmitting file data .
>> Committed revision 1.
>>
>> Try to add the directory (but you do not remember about the old
>> repository and the contained (hidden) .svn/):
>>
>> $ svn co $R wc
>> Checked out revision 0.
>> $ cp -r wc2/dir wc
>> $ svn add wc/dir
>> svn: warning: 'wc/dir' is already under version control
>>
>>
>> Now you could spend hours searching for a problem, inspecting the log,
>> dumping and reloading the repository, calling svnadmin verify, ...
>>
>>
>> $ svn info wc/dir
>> Path: wc/dir
>> URL: file:///tmp/svn/repos2/dir
>> Repository Root: file:///tmp/svn/repos2
>> Revision: 1
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: jens
>> Last Changed Rev: 1
>> Last Changed Date: 2008-08-29 09:54:31 +0200 (Fri, 29 Aug 2008)
>>
>> Ths doesn't match as it still refers to the old repository :-)
>>
>> > > The reason is indeed simple but could nevertheless be hard to find:
>> > > The directory I tried to add contained a subdirectory .svn/ from another
>> > > repository.
>> > >
>> > > Could Subversion stop using bogus .svn data or at least print a proper
>> > > diagnostics?
>>
>> Jens
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-05 21:37:51 CEST

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.