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

Re: Feature request: Restoring pristines

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 10 Nov 2016 01:44:06 +0100

2016-11-08 17:08 GMT+01:00 Niemann, Hartmut <hartmut.niemann_at_siemens.com>:
> Hello!
>
> It happened to me a couple of times that subversion complains that a pristine file is missing from the .svn directory.
> AFAIK the only solution is to do a fresh checkout if this happens.

Several years ago I also ran into this a couple of times (during the
svn 1.7 era -- possibly also when mixing native svn clients with
svnkit (java client)). I have not encountered it anymore since 1.9 at
least (and not using svnkit anymore).

Back then, I also discussed this on the users list [1], and learned
about the following repairing technique:

    $ svn up --set-depth exclude X
    $ svn up X

Or, if the working copy is locked and you cannot execute any svn
command anymore, and even cleanup fails, you might need the following
(you need an sqlite3 executable):

    $ sqlite3 .svn/wc.db "delete from work_queue"
    $ svn cleanup
    $ svn up --set-depth exclude X
    $ svn up X

Apart from 'svn up --set-depth exclude X', sometimes also 'svn up -r0
X' works to fix similar wc-corruptions.

FWIW, there were several other interesting mail discussions on the
dev-list about this and other (in theory repairable) working copy
corruptions. See [2], [3], and [4]. Most people agreed that such
repairing features in core svn would be very useful, but unfortunately
the ideas never got anywhere.

> Would it be possible that subversion treats the .svn/pristine directory as a cache and simply fetches any missing files
> when it needs them?
> The information for this should be in the database.

Sounds a bit like the (very old) feature request for optional
pristines [5] (but then a non-intentional optionalilty) or other
similar feature-suggestions to avoid the disk space overhead of
pristine files. But it's an interesting suggestion.

[1] http://mail-archives.apache.org/mod_mbox/subversion-users/201203.mbox/%3CCAB84uBUv7dV9wY25W-oMYUvZvh5vXVm2RhuZpjRt8VjpeJm6GA@mail.gmail.com%3E

[2] http://mail-archives.apache.org/mod_mbox/subversion-dev/201206.mbox/%3CCAB84uBUJeZDHjhKP6Fz2hoU_g1oHUZyUq_wNVNC=pPyju7hVJw@mail.gmail.com%3E

[3] https://svn.haxx.se/dev/archive-2012-09/0304.shtml

[4] https://svn.haxx.se/dev/archive-2013-04/0426.shtml

[5] https://issues.apache.org/jira/browse/SVN-525

-- 
Johan
Received on 2016-11-10 01:44:32 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.