On Mon, Jan 24, 2022 at 11:50 AM Karl Fogel <kfo...@red-bean.com> wrote:
> On 24 Jan 2022, Daniel Shahaf wrote: > > >Which brings me to a less contrived / more general point: What if > >the user _knows in advance_ they'll need a pristine? Shouldn't > >there be: — - a way to say "I'm about to change a large, > >diffable file; detranslate > > it into the pristine store before I touch it"? Perhaps even > > make files read-only at the OS level (as with svn:needs-lock) > > so the user doesn't modify the file accidentally until its > > pristine has been set aside? > > 'svn hydrate'? (I can't even tell if I'm joking.) Suppose that in the future we get a "history depth" feature. I vaguely recall a discussion about that. It is possible we even have a feature request filed. In any event the idea of history depth is like that of directory tree depth, but for locally cached history. To illustrate, SVN today always has a history depth of one, meaning that pristines serve as a local cache of BASE. Pristines-on-demand can be seen as a history depth of zero, meaning no local cache (until needed for specific files). A future history depth feature may make it possible to locally cache the last n revisions, or even infinity (full DVCS). Perhaps the command to hydrate/dehydrate pristines should be designed with this possibility in mind, i.e., not limit it only to a true/false value. E.g., # "Normal" pristines $ svn update --set-history-depth=immediates . # Pristines-on-demand: $ svn update --set-history-depth=none . With the limitation, currently, that it may be applied only to the wc root since the underlying logic is currently a wc-wide on/off switch. Cheers, Nathan