You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by km...@rockwellcollins.com on 2008/01/17 21:24:29 UTC
svnadmin verify rev 0 always succeeds?
I was trying to purposely corrupt a test repository to test my nightly
repo verification scripts.
However, I noticed rev 0 in the repo does not seem to ever be verified. Is
this by design?
I would imagine it is identical for every repo created, but the svnadmin
verify command
indicates it is verifying revision 0.
Reproduction recipe:
$ svnadmin create test_repo
$ svnadmin verify test_repo
* Verified revision 0.
$ rm -f test_repo/dv/revs/0
$ svnadmin verify test_repo
* Verified revision 0.
$ echo garbage > test_repo/db/revs/0
$ svnadmin verify test_repo
* Verified revision 0.
Does the contents of revision 0 really not ever matter?
Kevin R.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svnadmin verify rev 0 always succeeds?
Posted by km...@rockwellcollins.com.
kmradke@rockwellcollins.com wrote on 01/17/2008 03:53:52 PM:
> kmradke@rockwellcollins.com wrote on 01/17/2008 03:24:29 PM:
> > I was trying to purposely corrupt a test repository to test my nightly
> > repo verification scripts.
> >
> > However, I noticed rev 0 in the repo does not seem to ever be
verified.
> Is
> > this by design?
> > I would imagine it is identical for every repo created, but the
svnadmin
>
> > verify command
> > indicates it is verifying revision 0.
> >
> > Reproduction recipe:
> >
> > $ svnadmin create test_repo
> > $ svnadmin verify test_repo
> > * Verified revision 0.
> > $ rm -f test_repo/dv/revs/0
> > $ svnadmin verify test_repo
> > * Verified revision 0.
> > $ echo garbage > test_repo/db/revs/0
> > $ svnadmin verify test_repo
> > * Verified revision 0.
> >
> > Does the contents of revision 0 really not ever matter?
>
> Minor typo when copying to the email. The rm command should have been:
>
> $ rm -f test_repo/db/revs/0
Guess I really should have dug into the source a little.
(libsvn_repos/dump.c around line 980)
It does appear that a dump does not use the true rev 0, but creates a
default one. Because of this, 'svnadmin verify' will never catch
a rev 0 corruption.
However, if rev 0 is corrupted, you may have problems using the repo:
$ svn mkdir file:///tmp/test_repo/trunk -m"trunk"
svn: No such revision 0
$ echo garbage > test_repo/db/revs/0
$ svn mkdir file:///tmp/test_repo/trunk -m"trunk"
svn: Can't set position pointer in file '/tmp/test_repo/db/revs/0':
Invalid argument
A "simple" fix/workaround in this case would be:
$ svnadmin dump test_repo > test_repo.dump
$ mv test_repo test_repo_old
$ svnadmin create test_repo
$ svnadmin load test_repo < test_repo.dump
Not sure this is important enough for a bug report, but I wanted to make
sure the workaround was documented in the mailing list.
Should the dump routine be getting the actual contents of rev 0 instead
of just creating a default one?
Kevin R.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svnadmin verify rev 0 always succeeds?
Posted by km...@rockwellcollins.com.
kmradke@rockwellcollins.com wrote on 01/17/2008 03:24:29 PM:
> I was trying to purposely corrupt a test repository to test my nightly
> repo verification scripts.
>
> However, I noticed rev 0 in the repo does not seem to ever be verified.
Is
> this by design?
> I would imagine it is identical for every repo created, but the svnadmin
> verify command
> indicates it is verifying revision 0.
>
> Reproduction recipe:
>
> $ svnadmin create test_repo
> $ svnadmin verify test_repo
> * Verified revision 0.
> $ rm -f test_repo/dv/revs/0
> $ svnadmin verify test_repo
> * Verified revision 0.
> $ echo garbage > test_repo/db/revs/0
> $ svnadmin verify test_repo
> * Verified revision 0.
>
> Does the contents of revision 0 really not ever matter?
Minor typo when copying to the email. The rm command should have been:
$ rm -f test_repo/db/revs/0
^
Kevin R.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org