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

Re: WC database corruption (1.7.1)

From: Neil Bird <neil_at_jibbyjobby.co.uk>
Date: Tue, 15 Nov 2011 17:02:06 +0000

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:




> Drop and recreate 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_at_fnx ~]# rm -f .signature
[neil_at_fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil_at_fnx ~]# exit
Received on 2011-11-15 18:02:43 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.