'svnadmin recover' in FSFS recreates 'current', and maybe a few other
things, but it most definitely doesn't fix broken svndiff deltas. (How
would it do so? The filesystem may not have the redundant storage from
which to reconstruct them...)
>
> I furthermore integrated svn into my IDE (Eclipse Helios) and also tried a
> checkout of the project, of which revision 2 (the corrupt one) consisted.
> The process aborts, showing the following error:
> Get content for 'svn+ssh://server.fqdn.com/path/to/rep/ProjectName/.project'
> failed.
> svn: Malformed representation header
> svn: Corrupt representation '2 325 387 370 d66781ba03f9571d044bf8f257601485
> 0fd3590a02c19961e78d0ef76efa710d9d6ef194 1-2/_c'
>
That's the interesting part. It tells you that the representation
(either the full plaintext or a binary delta) which starts at byte 325
of the r2 revision file is corrupt. You can continue by looking at that
offset of that revision and see what bytes you find there. ('xxd -s 325
-l 488 /path/to/revs/0/2' for example.)
A representation header is either "PLAIN\n" or "DELTA\n" or "DELTA $some
$numeric $parameters\n". A representation terminates in the word
"ENDREP\n". The representation's length (excluding header and trailer)
should be 387 bytes. Details in the file subversion/libsvn_fs_fs/structure
in the source tree.
Here's an example:
[[[
DELTA
SVN[9 chars]This is the file 'iota'.
ENDREP
...
text: 1 605 37 25 2d18c5e57e84c5b8a5e9a6e13fa394dc 2c0aa9014a0cd07f01795a333d82485ef6d083e2 0-0/_14
]]]
Happy digging,
Daniel
You probably know that, but:
You should have taken a backup before running this.
>That's the interesting part. It tells you that the representation
> I furthermore integrated svn into my IDE (Eclipse Helios) and also tried a
> checkout of the project, of which revision 2 (the corrupt one) consisted.
> The process aborts, showing the following error:
> Get content for 'svn+ssh://server.fqdn.com/path/to/rep/ProjectName/.project'
> failed.
> svn: Malformed representation header
> svn: Corrupt representation '2 325 387 370 d66781ba03f9571d044bf8f257601485
> 0fd3590a02c19961e78d0ef76efa710d9d6ef194 1-2/_c'
>
(either the full plaintext or a binary delta) which starts at byte 325
of the r2 revision file is corrupt. You can continue by looking at that
offset of that revision and see what bytes you find there. ('xxd -s 325
-l 488 /path/to/revs/0/2' for example.)
A representation header is either "PLAIN\n" or "DELTA\n" or "DELTA $some
$numeric $parameters\n". A representation terminates in the word
"ENDREP\n". The representation's length (excluding header and trailer)
should be 387 bytes. Details in the file subversion/libsvn_fs_fs/structure
in the source tree.
Here's an example:
[[[
DELTA
SVN[9 chars]This is the file 'iota'.
ENDREP
...
text: 1 605 37 25 2d18c5e57e84c5b8a5e9a6e13fa394dc 2c0aa9014a0cd07f01795a333d82485ef6d083e2 0-0/_14
]]]
No, that's okay: the bytes there (0xC3 0xB3) are one UTF-8 encoding of "�".
>
> > A representation header is either "PLAIN\n" or "DELTA\n" or "DELTA $some
> > $numeric $parameters\n". A representation terminates in the word
> > "ENDREP\n". The representation's length (excluding header and trailer)
> > should be 387 bytes. Details in the file subversion/libsvn_fs_fs/structure
> > in the source tree.
> >
> > Here's an example:
> >
> > [[[
> > DELTA
> > SVN[9 chars]This is the file 'iota'.
> > ENDREP
> >
> > ...
> >
> > text: 1 605 37 25 2d18c5e57e84c5b8a5e9a6e13fa394dc
> > 2c0aa9014a0cd07f01795a333d82485ef6d083e2 0-0/_14
> > ]]]
> >
>
> The intersting thing is that the ID in my error message belongs does not
> belong to the same representation as the part extracted by xxd around the
> specified bytes...?!
Well, it's corrupted. The correct representation might be somewhere
nearby --- perhaps a few hundred bytes away (in either direction)?
No, that's okay: the bytes there (0xC3 0xB3) are one UTF-8 encoding of "ü".> it should be "Fünfter" - I did some Special-Character-Testing here. Might
> this be some problem?
>
Well, it's corrupted. The correct representation might be somewhere
>
> > A representation header is either "PLAIN\n" or "DELTA\n" or "DELTA $some
> > $numeric $parameters\n". A representation terminates in the word
> > "ENDREP\n". The representation's length (excluding header and trailer)
> > should be 387 bytes. Details in the file subversion/libsvn_fs_fs/structure
> > in the source tree.
> >
> > Here's an example:
> >
> > [[[
> > DELTA
> > SVN[9 chars]This is the file 'iota'.
> > ENDREP
> >
> > ...
> >
> > text: 1 605 37 25 2d18c5e57e84c5b8a5e9a6e13fa394dc
> > 2c0aa9014a0cd07f01795a333d82485ef6d083e2 0-0/_14
> > ]]]
> >
>
> The intersting thing is that the ID in my error message belongs does not
> belong to the same representation as the part extracted by xxd around the
> specified bytes...?!
nearby --- perhaps a few hundred bytes away (in either direction)?
Yes, with a bit of skill and luck. Do you have a working copy of r2?
Does the rev file contain all the information (just possibly in the
wrong place)? Do you have backups?
The solutions I'm getting at are "manual revision file surgery/reconstruction".
(You may be able to do it yourself if you study the 'structure' file and
have some patience.) There may be other classes of solutions.
> And where could this inconsistence possibly come from?
>
"Bug in libsvn_fs_fs". (See issue #3705.) Or bug in any of N other
things, including but not limited to hardware bugs.
By the way: did you say what version of svn your server was running?
> By the way, I just remarked, that "svnadmin verify ...-r x" is wrong ONLY
> for x=2, not for x>=2 as I wrote before. So correcting this one should make
> the repository be OK again, I guess?
Yes. I'd expect verify to fail only for r2, but checkout to fail for
(at least some) later revisions as well.
I have not used that tool or reviewed it.