On Wed, Feb 16, 2022 at 9:59 AM Julian Foad <jul...@foad.me.uk> wrote: > > Mark Phippard wrote: > >> "The core idea is that we start to maintain the following invariant: only > >> the modified files have their pristine text-base files available on the > >> disk." > >> (https://svn.apache.org/repos/asf/subversion/branches/pristines-on-demand-on-mwf/BRANCH-README) > > > >That was where I read it! thanks > > (The Readme is Evgeny's text AFAIK.) > > >So this text confuses me and makes me assume I am not reading it > >correctly. Suppose I use this new feature to checkout a new WC without > >any pristines. I make edits to a large binary file using some tool. At > >this point, SVN does not even know I have done anything so I still > >have no pristines. > > Correct. > > >If I run svn status it will show me the file is modified. Are you > >saying that when I do this, SVN is going to pull down a pristine from > >the server? > > Not for "status". Does the further description from the readme help?: > """ > - To get into the appropriate state at the beginning of the operation, we > walk through the current text-base info in the db and check if the > corresponding working files are modified. The missing text-bases are fetched > using the svn_ra layer.
Yes and No. To truly understand this the way it is written requires a lot of internal knowledge about how SVN works. As someone whose knowledge is more as a user I am not clear what situations would require the missing text-bases to be fetched. I think that has been the heart of my question all along. I certainly understand they are needed for diff and revert, for example. I would want to know if the more day to day update/commit cycle needs them. If they do not, then it sounds good to me. > The operations also include a final step during which the no longer required > text-bases are removed from disk. This is slightly confusing. I assume it means that the pristines are not truly stored on disk in that by the time the command finishes they are gone again? So if I run svn diff, it will fetch the pristines, use them to complete the operation, and then discard them? FWIW, if this is how it works I think that is good. > - The operations that don't need to access the text-bases (such as "svn ls" > or the updated "svn st") do not perform this walk and do not synchronize the > text-base state. > """ So I would just reiterate the earlier comment that it is unclear which commands need to fetch pristines. It seems like it would be relatively easy to just spell it out in the docs? It has to be a smallish number of commands. > > > [...] My assumption is that if I have one of these new types of WC's that I > > will NEVER have any "pristines". > > Not correct, for this design. If the pristines are discarded at the end of a command, as I noted above, then I think it would be fair to simply describe this feature as a "bare WC" without pristines. The fact that the pristines temporarily exist during certain commands is an irrelevant detail. After all, they also exist during checkout before the final version of the file is written to disk with line endings and keywords expanded. > > >Please enlighten me as to when pristines will be created and stored > >and why I would want SVN to do that when I asked for no pristines? I > >think I must be overlooking something obvious. > > In my own words now: In this design, pristines are kept locally for modified > files (not never). During the new pristines-sync phase at the beginning of > any operation that might[1] want the pristine (e.g. diff, but *not* status), > if a file is detected to be locally modified and has no pristine locally, > then the pristine is fetched ("hydrated") and then kept locally... until, > during a sync pass at the end of any such operation, if any file is detected > to be not-modified and its pristine is present locally: then it is cleaned up > (dehydrated). > > Hope that's getting clearer. This all sounds super internal. It might be good for developer level explanation but not user level. If I have modified a file and currently there is no pristine. Now I run svn diff and I see the result. The command ends ... there is still no pristine. The fact that something existed during the operation in order to produce the result is uninteresting to me and it confuses the explanation. If, when the command finishes, there are no pristines stored on disk ... then there are no pristines. Does this make sense? Mark