Johan Corveleyn <jcorvel_at_gmail.com> writes:
> For some reason, I lost a pristine file [*] in a 1.7 working copy. I'm
> trying to recover from this without having to throw away my entire
> working copy. So far I'm unsuccessful. Any help is appreciated.
>
> svn-1.7 is SlikSVN 1.7.4 (On Windows 7, 64bit):
> [[[
> C:\Work\WC-root>svn-1.7 update -r0 the\file\with\missing\pristine.java
> svn: E155037: Previous operation has not finished; run 'cleanup' if it
> was interrupted
>
> C:\Work\WC-root>svn-1.7 cleanup the\file\with\missing
> svn: E155004: Working copy 'C:\Work\WC-root\the\file\with\missing' locked.
> svn: E155004: 'C:\Work\WC-root' is already locked.
> svn: E155037: Previous operation has not finished; run 'cleanup' if it
> was interrupted
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
>
> C:\Work\WC-root>svn-1.7 cleanup
> svn: E720002: Can't open file
> 'C:\Work\WC-root\.svn\pristine\6d\6d6e0892990e945b03a15b8e518dbef26848dc75.svn-base':
> The system cannot find the file specified.
> ]]]
>
> (the fact that the working copy is locked to begin with, was because a
> normal 'svn update' failed because of the missing pristine, with "svn:
> E155004: There are unfinished work items in 'C:\Work\WC-root'; run
> 'svn cleanup' first.", which is why I first found out about the
> problem)
>
> Anything I can do to investigate further?
Use the sqlite3 utility
sqlite3 .svn/wc.db "select * from work_queue"
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'"
sqlite3 wc/.svn/wc.db "select * from pristine where checksum like '%6d6e0892990e945b03a15b8e518dbef26848dc75'"
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.
--
Philip
Received on 2012-03-28 14:13:06 CEST