Johan Corveleyn <jcor...@gmail.com> writes: > Thanks for your help, Philip. > > $ sqlite3 .svn/wc.db "select * from work_queue" > 1|(file-install trunk/rootdir/the/file/with/missing/pristine.java 1 0 1 1) > >> These may show something: >> >> sqlite3 wc/.svn/wc.db "select * from nodes where local_relpath = >> '/the/file/with/missing/pristine.java'" >> >> sqlite3 wc/.svn/wc.db "select * from nodes where checksum like >> '%6d6e0892990e945b03a15b8e518dbef26848dc75'" > > Both of the above show the same: > 1|the/file/with/missing/pristine.java|0|the/file/with/missing|1|trunk/rootdir/the/file/with/missing/pristine.java|176219|normal|||file|(svn:eol-style > native)||$sha1$6d6e0892990e945b03a15b8e518dbef26848dc75||175563|1332375850493000|username|56722|1332709446087164|| > >> sqlite3 wc/.svn/wc.db "select * from pristine where checksum like >> '%6d6e0892990e945b03a15b8e518dbef26848dc75'" > > That shows nothing.
That really is broken. By the time the file-install wq item exists there should be a pristine row with the checksum as well as the pristine file. So just adding the missing file would not be enough, you need to add the pristine row as well. You might be able to restore the missing file. Probably easiest to checkout a temporary copy of the parent using --depth=empty, then update the one file required. Now in the temporary wc sqlite3 .svn/wc.db "select * from pristine" should show the required row. In the broken wc sqlite3 .svn/wc.db "insert into pristine values (sha1, null, size, 1, md5) then copy/move the pristine file itself from the temporary wc to the broken wc. >> Depending on what the work_queue shows you may be able to further >> corrupt your working copy and then recover by doing this: >> >> sqlite .svn/wc.db "delete from work_queue" >> svn up -r0 file >> >> IMPORTANT! Deleting the work_queue does generally make the working copy >> invalid, it is then up to you to ensure it returns to a valid state. > > Heh :-). I'll give it a try (I'll wait a while, in case you have > something more to add given my feedback ...). You have the checksum in the nodes row, so you will probably need to delete that nodes row as well. > Is this a situation from which svn could ultimately become self-healing? I suppose it might get fixed as a side-effect of somebody implementing "optional pristine" but generally wq items are not supposed to fail. -- Philip