Around about 10/11/11 17:01, Philip Martin typed ...
It may be as simple as
sqlite .svn/wc.db "reindex nodes"
sqlite .svn/wc.db "reindex pristine"
Nope. “Error: database disk image is malformed”.
sqlite3 .svn/wc.db "select sql from sqlite_master where name='NODES'"
sqlite3 .svn/wc.db "select sql from sqlite_master where name='I_NODES_PARENT'"
will show you the SQL for the table and index that need to be recreated.
These work.
Make a backup copy of wc.db before going further!
Create a duplicate table NODES_COPY:
OK
Copy NODES into NODES_COPY
OK
Drop and recreate NODES:
OK
Copy NODES_COPY into NODES:
sqlite3 .svn/wc.db "insert into NODES select * from NODES_COPY"
Oops. “Error: database disk image is malformed”.
Which is a bit odd, since we copied NODES to NODES_COPY OK, and have
since re-created NODES!
I didn't go any further.
I should also point out that at this stage this is academic, as I'm using
a new checkout (actually, maybe naughtily, I renamed my dead WC, checked out
a clean WC to the same (old) name, then re-shuffled the names back, and
replaced the dead .svn with the fresh one. I think that was safe, as they
were based on the same rev.).
But I don't mind continuing to fiddle if it'll highlight anything. I
have kept a copy of the dead .svn just for that.
--
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit