Document how file and revision properties are used.
[cvs2svn.git] / doc / properties.txt
blob9976f4a5df5a6c62b966e44d212b450573e552bc
1 This file documents how file and revision properties are used in
2 cvs2svn.
4 cvs2svn allows arbitrary properties to be associated with CVSFile and
5 CVSRevision instances.  These properties are combined to form the
6 effective properties for each CVSRevision.  Properties set in a
7 CVSRevision take precedence over properties set in the corresponding
8 CVSFile.
10 These properties can be set very flexibly by FilePropertySetter and
11 RevisionPropertySetter objects, which in turn can be implemented
12 arbitrarily and set via the conversion configuration file.  Several
13 types of PropertySetters are already provided, and examples of there
14 use are shown in the example configuration files.  The properties are
15 determined early in the conversion and are retained for the duration
16 of the conversion.
18 CVSFile.properties holds properties that do not change for the life of
19 the file; for example, whether keywords should be expanded in the file
20 contents.
22 CVSRevision.properties holds properties that can vary from one file
23 revision to another.  The only current example of a revision property
24 is the cvs2svn:rev-num property.
26 Properties whose names start with underscore are reserved for the
27 internal use of cvs2svn.
29 The properties can be used by backends for any purpose.  Currently,
30 they are used for two purposes:
32 1. Passing RevisionReaders information about how to check out a file
33    revision's contents:
35        _keyword_handling -- How should RCS keywords be handled?
37            'untouched' -- The keywords should be output exactly as
38                they are found in the RCS file.
40            'collapsed' -- The keywords should be collapsed in the
41                output; e.g., "$Author: jrandom $" -> "$Author$".
43            'expanded' -- The keywords should be expanded in the
44                output; e.g., "$Author$" -> "$Author: jrandom $".
46            'deleted' -- To be implemented
48        _eol_fix -- Should end-of-line sequences be fixed before
49            committing to the target VCS?  If this property is set to a
50            non-empty value, then every end-of-line character sequence
51            ('\n', '\r\n', or '\r') is converted to the specified value
52            (which should obviously be a valid end-of-line character
53            sequence).
55 2. cvs2svn: Specifying Subversion versioned properties.  Any
56    properties that do not start with an underscore are converted into
57    Subversion versioned properties on the associated file.  By this
58    mechanism, arbitrary Subversion properties can be set.  A number of
59    PropertySetters are provided to set common Subversion properties
60    such as svn:mime-type, svn:eol-style, svn:executable, and
61    svn:keywords.  Other properties can be set via the
62    AutoPropsPropertySetter or by implementing custom PropertySetters.