Reputation: 63
I tried to run svn update on my working copy. The update fails, producing the following error.
Seems like an SVN base file in .svn/pristine got corrupted. Unfortunately, the working copy is large, so checking out a new working copy is infeasible.
Could anyone explain the error and its cause? How should I proceed?
Upvotes: 2
Views: 751
Reputation: 34418
Pristine files are just the base unmodified copies of files in your working copy. I'm a few years out of date but as far as I know they're still stored plain, uncompressed so any corruption here is likely to be a problem with your disk.
The easiest way to repair this without getting a full checkout is to either
find someone else with a checkout and take this file from their pristine folder. If you need to copy the whole pristine folder, i.e. there are other problems, then you should ideally both be on the same revision checked out.
work out which file this is an check out the same file again yourself. You'll need to query a sqlite database, e.g. download sqlite3 from sqlite.org and then in your .svn folder run
sqlite3 wc.db
select repos_path from NODES where checksum like '$sha1$b1807867%';
where the hex digits are from the start of your error message. That should give you the path of the file corrupted. You can then use svn export
or svn checkout --depth=empty; svn update
to fetch the file as described here: Checkout one file from Subversion and then drop that into your pristine folder. (If you use the checkout --depth=empty method you'll get a pristine folder with the correct filename.)
I'm not sure how portable the exact SQL here is across SVN versions but looks correct to me for both 1.8 and 1.9.
Upvotes: 1