This is a detailed user guide to the "i525pod" feature.

$LastChangedDate: 2022-03-24 23:26:24 +0000 (Thu, 24 Mar 2022) $

$LastChangedRevision: 1899185 $

$URL: https://svn.apache.org/repos/asf/subversion/branches/pristines-on-demand-on-mwf/notes/i525/i525-user-guide.md $

Terminology

Place-holders:

Terminology:

"i525pod" User Guide

Functional and Timing Differences

This section details the functional and timing differences when the "i525pod" feature is used.

In a WC where "i525pod" is enabled (see other sections for how), basic usage differs from that found in previous versions of Subversion (1.14 in case of doubt) in the following ways.

Each of the following operations, that previously were offline operations, will now contact the repository to "hydrate" pristine copies before beginning its function, if (and only if) any pristines within the "sync scope" are found to be locally modified and currently "dehydrated".

Notes on previously offline operations,:

[TODO: update that if we add progress feedback]

Each of the following operations, that previously were online operations, also will now require the same.

Additional notes on previously online operations:

[TODO: check/eliminate the additional authentication? Issue filed?]

Disk Space Usage Differences

This section details the disk space usage differences when the feature is used.

Summary:

Initial WC size, from checkout/upgrade:

Size increase and decrease:

Disk Full:

Failure modes when disk becomes full during an operation...

Support, Compatibility, Enabling

In brief:

"i525pod" is an optional feature in Subversion 1.15. It can be enabled separately for each WC. By default "i525pod" is not enabled and WCs remain compatible with Subversion 1.8 through 1.14. To enable "i525pod" for a given WC, check out or upgrade the WC to 1.15's format. A WC in 1.15's format is no longer compatible with older Subversion clients.

For details: see "Working Copy Format Upgrade and Compatibility" section.

[TODO: update if/when we use a specific feature-enable flag.]

User Guide: Principle Of Operation

Quoting the original 'BRANCH-README':

"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."

When "i525pod" is enabled in a given WC, Subversion stores pristine copies according to the following principle:

Subversion updates the pristine storage to match this principle at certain times. - 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. The operations also include a final step during which the no longer required text-bases are removed from disk.

Subversion updates the pristine storage to match this principle at certain times.

The pristine storage state does not immediately change to match the principle:

The definition of "locally modified" takes into account Subversion's local "translation" options such as "keywords" and "eol-style". A working file that differs from the repository copy only in keywords and/or EOL-style is not regarded as locally modified. When Subversion needs to access a pristine copy of such a file, Subversion makes a temporary pristine copy by "detranslating" the working file. It may store this in temporary disk space for the duration of the operation, but does not keep this indefinitely.

Which operations will "hydrate" or "dehydrate" pristines?

The operations deemed to need the pristine copies of locally modified files, and which therefore "hydrate" (and "dehydrate") the pristine copies of locally modified files, are:

Which files does Subversion "hydrate" or "dehydrate" ("sync scope")?

Which files does Subversion "hydrate" or "dehydrate", whenever an eligible operation has the chance to do so?

The files that a given operation "hydrates" and/or "dehydrates" are neither all possible files in the working copy, nor the minimal subset necessary for the particular operation.

Not maximal:

Not minimal:

Working Copy Format Upgrade and Compatibility

Summary

Details

To use "i525pod" in a given working copy (WC), that WC's metadata needs to be in a new 1.15-compatible format (also called WC format 32). You need a Subversion 1.15 client to create or use a WC in this format.

You can either check out a working copy in this format:

svn checkout --compatible-version=1.15

or upgrade an existing working copy from a 1.8-compatible or older format to this format:

svn upgrade --compatible-version=1.15

That working copy:

[TODO] We might change this so that upgrading to 1.15-compatible format and enabling "i525pod" are separate steps and the latter is optional.

Subversion 1.15 also supports, and uses by default, the working copy format that has been in use since Subversion 1.8 (format 31). A working copy in that format does not support "i525pod" and is never "bare".

svn checkout --compatible-version=1.8
svn checkout  # the same, as 1.8 is the default

You do not need to use the new format for all your working copies. Subversion 1.15 can work with some working copies in 1.8-compatible format and others in 1.15-compatible format.

Upgrade / Downgrade

You can upgrade to 1.15-compatible format (WC format 32) with:

svn upgrade --compatible-version=1.15

from either

By default "svn upgrade" upgrades a working copy to 1.8-compatible format. This is useful for upgrading a WC from the 1.7 and older formats so Subversion 1.8 and newer can use it.

svn upgrade
svn upgrade --compatible-version=1.8  # the same

You CANNOT downgrade any working copy to an older format.

(If you need a working copy in an older format than your current Subversion client supports, you would have to check out a working copy using an older Subversion client that supports the format you want to use.)

[TODO] Enable/disable "i525pod" in a 1.15-compatible WC

[TODO] Not yet implemented (2022-03-08).