subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <>
Subject Re: Feature request: Restoring pristines
Date Thu, 10 Nov 2016 16:19:37 GMT
Stefan Hett wrote on Thu, Nov 10, 2016 at 11:52:43 +0100:
> On 11/10/2016 8:08 AM, Cooke, Mark wrote:
> >>-----Original Message-----
> >>From: Stefan []
> >>Sent: 09 November 2016 21:43
> >>To:
> >>Subject: Re: Feature request: Restoring pristines
> >>
> >>On 11/9/2016 21:22, Branko Čibej wrote:
> >>>On 08.11.2016 21:51, Stefan wrote:
> >>>>I didn't test this, but
> >>>This is how all down-voted stackoverflow answers start. :)
> >>>
> >>>-- Brane
> >>>
> >>OK, I see. Tested and it doesn't work. ;-)
> >>
> >>Certainly sounds like a reasonable request for an improvement to have at
> >>least svn co auto correct the case of missing pristine files, as far as
> >>I'm concerned.
> >>
> >>Regards,
> >>Stefan
> >Would this not fit better as part of `update` rather than `checkout` over an existing
working copy?
> >
> >~ mark c
> >
> IMO it should be part of both, since both operations (aka: svn update as
> well as svn checkout) will error out, if a pristine would be required but
> missing (and this is some error, the operation could easily resolve without
> user interaction).

I thought of 'cleanup' as the appropriate place, since fixing violated
invariants should be opt-in;

However, let's not bikeshed about the UI.  My concern about this change
is that by the time a pristine is absent, one invariant is no longer
holding so there may be additional problems.  I.e., there's no guarantee
that after running «svn cleanup --reinvariant=missing-pristines» the wc
will be in a valid state.

That said, the feature might be useful in certain cases and ought to be
pretty easy to implement, so perhaps someone will write it?  It might
even make sense to write it as an external script, at least at first, to
(a) shake out any bugs, (b) allow users of 1.9 and older to use it.

The external script should be quite short; it just needs to check
SVN_WC__VERSION, then to run `svn info` and `svn cat`.  (That's assuming
the on-disk file is missing but the sqlite entry (in the PRISTINES
table) is still present.)



View raw message