You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Eric S. Raymond" <es...@thyrsus.com> on 2013/02/03 05:32:59 UTC
Documentation patch, comment and additions requested
I can't seem to commit currently, gnome-keyring gets in my face when I
try. So here's a documentation patch. It notes three unresolved
questions about the dumpfile format and adds a key detail about how
symlinks are represented.
It would be a Good Thing if someone were to apply this and then
fold in answers to some or all of these questions.
Index: dump-load-format.txt
===================================================================
--- dump-load-format.txt (revision 1441850)
+++ dump-load-format.txt (working copy)
@@ -1,6 +1,6 @@
= How to interpret Subversion dumpfiles =
-Version 1.0, 2012-01-18
+Version 1.1, 2013-02-02
== Introduction ==
@@ -13,14 +13,20 @@
system. It derives from and incorporates some incomplete notes from
before r39883.
+=== Unresolved questions
+
1. In interpreting a Node record which has both a copyfrom source and
a property section, it is possible that the copy source node itself
has a property section. How are they to be combined?
-Also note that the section on the semantics of kinds of operations
-documents a minor bug at r39883 in the behavior of "add", which
-should be fixed.
+2. The section on the semantics of kinds of operations documents a
+minor bug at r39883 in the behavior of "add". Has this been fixed?
+3. Are there other prefixes besides "link " used in the blob content
+of special files? If so, what are they and what are their semantics?
+
+Portions of text relevant to these questions are tagged with FIXME.
+
== Syntax ==
=== Encoding and delimiters ===
@@ -131,7 +137,9 @@
[Node-copyfrom-rev: <rev>]
[Node-copyfrom-path: <path> ]
[Text-copy-source-md5: <blob>]
+[Text-copy-source-sha1: <blob>]
[Text-content-md5: <blob>]
+[Text-content-sha1: <blob>]
[Text-content-length: <T>]
[Prop-content-length: <P>]
[Content-length: Y]
@@ -161,10 +169,11 @@
the node. Copy-source semantics will be described in detail later in
this document.
-The Text-content-md5 and Text-copy-source-md5 lines are hash integrity
-checks and will be present only if Text-content-length and the copfyrom
-pair (respectively) are also present. A decoder may use them to verify
-that the source content they refer to has not been corrupted.
+The Text-content-{md5,sha1} and Text-copy-source-{md5,sha1} lines are
+hash integrity checks and will be present only if Text-content-length
+and the copfyrom pair (respectively) are also present. A decoder may
+use them to verify that the source content they refer to has not been
+corrupted.
Text-content-length will be present only when there is a text section.
Zero is a legal value for this length, indicating an empty file.
@@ -236,7 +245,7 @@
|Fails on non-existent path | no | yes | yes | yes |
|======================================================================
-* As of December 2011 there is a minor bug: Adding a file with history
+FIXME: As of December 2011 there is a minor bug: Adding a file with history
twice _in two different revisions_ succeeds silently.
.Directory operations
@@ -352,6 +361,16 @@
is different from an *absent* properties section, which will change
no properties and will be associated with a change to content!
+=== Representation of symbolic links ===
+
+When the Subversion dumper creates a content blob representing a
+symbolic link (that is, with the svn:special property) the contents of
+the blob is not just the link's target path. It will have the prefix
+"link ". The loader removes this prefix.
+
+FIXME: Why is this? Was it part of a plan to tag other special
+file types with different prefixes?
+
=== Implementation pragmatics ===
Because directory operations with copyfroms don't specify all the file
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
In every country and in every age, the priest has been hostile to
liberty. He is always in alliance with the despot, abetting his abuses
in return for protection to his own. -- Thomas Jefferson, 1814
Re: Documentation patch, comment and additions requested
Posted by Branko Čibej <br...@wandisco.com>.
On 03.02.2013 05:32, Eric S. Raymond wrote:
> +FIXME: Why is this? Was it part of a plan to tag other special
> +file types with different prefixes?
Yes. And it still is. Only a special file with a "link" keyword is
converted to a symbolic link on systems that support that (well ... not
on Windows, even though recent versions of NTFS know about symbolic links).
A different keyword will mean something else. For example, there's an
idea floating around to describe views (view specifications, in
ClearCase terminology) as special files whose contents are a series of
commands for creating a working copy.
Users are not allowed to define their own keywords.
-- Brane
--
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Re: Documentation patch, comment and additions requested
Posted by Ben Reser <be...@reser.org>.
I'm in the middle of something else atm so I'm not going to commit
these changes... But I do have some comments from glancing over it.
On Sat, Feb 2, 2013 at 8:32 PM, Eric S. Raymond <es...@thyrsus.com> wrote:
> +3. Are there other prefixes besides "link " used in the blob content
> +of special files? If so, what are they and what are their semantics?
None at this time.
> +=== Representation of symbolic links ===
> +
> +When the Subversion dumper creates a content blob representing a
> +symbolic link (that is, with the svn:special property) the contents of
> +the blob is not just the link's target path. It will have the prefix
> +"link ". The loader removes this prefix.
> +
> +FIXME: Why is this? Was it part of a plan to tag other special
> +file types with different prefixes?
It's not accurate to say that the loader removes the prefix. Symbolic
links are only handled client side. The repository just sees a link
as a normal file. The client looks for svn:special property and then
uses the contents of the file to construct the link. For instance
Windows has no support for symlinks (it has things like it but us
supporting that is complicated due to details of Windows that aren't
important here) so checking out something with a symlink in it just
results in the file existing in the wc. You can see an artifact of
this by doing `svn cat link` where link is the name of some file
that's a link. You'll get back the "link target" output just like you
see in the dump.
We've got some ideas on how to use it for implementing something along
the lines of views. But we haven't spent much time on fully
implementing it yet.