Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version directory naming #31

Merged
merged 3 commits into from
Jul 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,28 @@ <h2>Top-level Inventory Checksum</h2>

<section id='versions-directories'>
<h2>Versions Directories</h2>

<p>
OCFL object content is stored as a sequence of one or more versions. Each object version is stored in a version
directory under the object root. The sequence of version numbers is the sequence of positive integers: 1, 2, 3, etc.,
and the version directory name is constructed by adding the prefix <code>v</code>.
</p>
<p>
It is RECOMMENDED that implementations use version directory names constructed without zero-padding the version
Copy link
Member

@awoods awoods Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to MUST/MAY/SHOULD language?

Implementations SHOULD use version directory...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RECOMMENDED is part of RFC2119... we should discuss this on our call (and add to the spec) --> #35

number, ie. <code>v1</code>, <code>v2</code>, <code>v3</code>, etc..
</p>
<p>
For compatibility with existing filesystem conventions, implementations MAY use zero-padded version numbers,
with the following restriction: If zero-padded version numbers are used then they MUST start with a zero. For example,
in an implementation that uses five digits the version directory names <code>v00001</code> to <code>v09999</code> are
allowed, <code>v10000</code> is not allowed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? A regex such as v([\d]+) would capture the integer value. Is this for sorting purposes? If so, we should mention that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make follow-suit numbering of an inherited filesystem easier. Looking at the last version tells you what the next version number should be - rather than tracking back to the last-version-that-changed-the-number-of-significant-digits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, we do need to mention follow suit. Version numbers should either be all unpadded or all padded to the same length. Or else we need additional rules so that v1, v001 and v00000000001 don't coexist.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...people will do that. We have shelfmarks where punctuation and spacing are significant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahankinson - I included the v0... requirement for padded following the discussion in #2 (comment)

@neilsjefferies - The following part of the PR does sat the the length must be consistent

All versions MUST use the same naming convention: either a non-padded version number, or a zero-padded version number of consistent length.

</p>
<p>
The first version of an object defines the naming convention for all versions of the object. All versions of an object
MUST use the same naming convention: either a non-padded version number, or a zero-padded version number of consistent
length. Operations that add a new version to an object MUST follow the directory naming convention established by earlier
versions. In all cases, references to files inside version directories from inventory files MUST use the actual version
directory names.
</p>
</section>
</section>

Expand Down