1 This file documents how file and revision properties are used in
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
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
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
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 a file revision's
33 contents should be transformed before being written to the new VCS.
34 Please note that this does not necessarily correspond to how the
35 revision contents will look after being checked out of the new VCS;
36 for example, Subversion requires keywords to be *unexpanded* in the
37 dumpfile stream if Subversion is going to expand them. These
40 _keyword_handling -- How should RCS keywords be handled?
42 'untouched' -- The keywords should be output literally as
43 they are recorded in the RCS file. Please note that
44 this results in the keywords' being expanded the way
45 they were when the revision was checked *in* to CVS,
46 which typically reflects how CVS expanded them when the
47 *previous* revision was checked *out* of CVS. This
48 mode is appropriate for binary files.
50 'collapsed' -- The keywords should be collapsed in the
51 output; e.g., "$Author: jrandom $" -> "$Author$". This
52 mode is appropriate for output of non-binary files to
53 Subversion (because Subversion re-expands the keywords
54 itself) and might be useful for text files for other
55 VCSs if you would like this history to be "clean" of
58 'expanded' -- The keywords should be expanded in the output
59 the same way as CVS would expand keywords when checking
60 out the revision; e.g., "$Author$" -> "$Author: jrandom
61 $". If this value is used, keywords are expanded
62 regardless of whether CVS considers the file to be a
63 text file. This mode might be useful for outputting
64 text files to other VCSs if you would like the content
65 of historical revisions to be as similar as possible to
66 the content as it would be checked out of CVS.
68 'deleted' -- The keywords and their values (and some
69 surrounding whitespace?) should be deleted entirely.
72 'replaced' -- The keywords should be deleted entirely and
73 replaced by their values; e.g., "$Author$" ->
74 "jrandom", like CVS's "-kv" option. This is not a very
75 useful feature, but is listed for completeness. NOT
78 _eol_fix -- Should end-of-line sequences be made uniform before
79 committing to the target VCS? If this property is set to a
80 non-empty value, then every end-of-line character sequence
81 ('\n', '\r\n', or '\r') is converted to the specified value
82 (which should obviously be a valid end-of-line character
83 sequence). If this property is not set, then the
84 end-of-line character sequences are output literally as
85 they are recorded in the RCS file.
87 2. cvs2svn: Specifying Subversion versioned properties. Any
88 properties that do not start with an underscore are converted into
89 Subversion versioned properties on the associated file. By this
90 mechanism, arbitrary Subversion properties can be set. A number of
91 PropertySetters are provided to set common Subversion properties
92 such as svn:mime-type, svn:eol-style, svn:executable, and
93 svn:keywords. Other properties can be set via the
94 AutoPropsPropertySetter or by implementing custom PropertySetters.