Update copyright dates through whole project based on date of last commit.
[cvs2svn.git] / cvs2svn_lib / config.py
blobb313b2c4b7ef4245b8ea474dab2eb8909bc74c3b
1 # (Be in -*- python -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2000-2008 CollabNet. All rights reserved.
6 # This software is licensed as described in the file COPYING, which
7 # you should have received as part of this distribution. The terms
8 # are also available at http://subversion.tigris.org/license-1.html.
9 # If newer versions of this license are posted there, you may use a
10 # newer version instead, at your option.
12 # This software consists of voluntary contributions made by many
13 # individuals. For exact contribution history, see the revision
14 # history and logs, available at http://cvs2svn.tigris.org/.
15 # ====================================================================
17 """This module contains various configuration constants used by cvs2svn."""
20 SVN_KEYWORDS_VALUE = 'Author Date Id Revision'
22 # The default names for the trunk/branches/tags directory for each
23 # project:
24 DEFAULT_TRUNK_BASE = 'trunk'
25 DEFAULT_BRANCHES_BASE = 'branches'
26 DEFAULT_TAGS_BASE = 'tags'
28 SVNADMIN_EXECUTABLE = 'svnadmin'
29 CO_EXECUTABLE = 'co'
30 CVS_EXECUTABLE = 'cvs'
31 SORT_EXECUTABLE = 'sort'
33 # A pickled list of the projects defined for this conversion.
34 PROJECTS = 'projects.pck'
36 # A file holding the Serializer to be used for
37 # CVS_REVS_SUMMARY_*_DATAFILE and CVS_SYMBOLS_SYMMARY_*_DATAFILE:
38 SUMMARY_SERIALIZER = 'summary-serializer.pck'
40 # The first file contains enough information about each CVSRevision to
41 # deduce preliminary Changesets. The second file is a sorted version
42 # of the first.
43 CVS_REVS_SUMMARY_DATAFILE = 'revs-summary.txt'
44 CVS_REVS_SUMMARY_SORTED_DATAFILE = 'revs-summary-s.txt'
46 # The first file contains enough information about each CVSSymbol to
47 # deduce preliminary Changesets. The second file is a sorted version
48 # of the first.
49 CVS_SYMBOLS_SUMMARY_DATAFILE = 'symbols-summary.txt'
50 CVS_SYMBOLS_SUMMARY_SORTED_DATAFILE = 'symbols-summary-s.txt'
52 # A mapping from CVSItem id to Changeset id.
53 CVS_ITEM_TO_CHANGESET = 'cvs-item-to-changeset.dat'
55 # A mapping from CVSItem id to Changeset id, after the
56 # RevisionChangeset loops have been broken.
57 CVS_ITEM_TO_CHANGESET_REVBROKEN = 'cvs-item-to-changeset-revbroken.dat'
59 # A mapping from CVSItem id to Changeset id, after the SymbolChangeset
60 # loops have been broken.
61 CVS_ITEM_TO_CHANGESET_SYMBROKEN = 'cvs-item-to-changeset-symbroken.dat'
63 # A mapping from CVSItem id to Changeset id, after all Changeset
64 # loops have been broken.
65 CVS_ITEM_TO_CHANGESET_ALLBROKEN = 'cvs-item-to-changeset-allbroken.dat'
67 # A mapping from id to Changeset.
68 CHANGESETS_INDEX = 'changesets-index.dat'
69 CHANGESETS_STORE = 'changesets.pck'
71 # A mapping from id to Changeset, after the RevisionChangeset loops
72 # have been broken.
73 CHANGESETS_REVBROKEN_INDEX = 'changesets-revbroken-index.dat'
74 CHANGESETS_REVBROKEN_STORE = 'changesets-revbroken.pck'
76 # A mapping from id to Changeset, after the RevisionChangesets have
77 # been sorted and converted into OrderedChangesets.
78 CHANGESETS_REVSORTED_INDEX = 'changesets-revsorted-index.dat'
79 CHANGESETS_REVSORTED_STORE = 'changesets-revsorted.pck'
81 # A mapping from id to Changeset, after the SymbolChangeset loops have
82 # been broken.
83 CHANGESETS_SYMBROKEN_INDEX = 'changesets-symbroken-index.dat'
84 CHANGESETS_SYMBROKEN_STORE = 'changesets-symbroken.pck'
86 # A mapping from id to Changeset, after all Changeset loops have been
87 # broken.
88 CHANGESETS_ALLBROKEN_INDEX = 'changesets-allbroken-index.dat'
89 CHANGESETS_ALLBROKEN_STORE = 'changesets-allbroken.pck'
91 # The RevisionChangesets in commit order. Each line contains the
92 # changeset id and timestamp of one changeset, in hexadecimal, in the
93 # order that the changesets should be committed to svn.
94 CHANGESETS_SORTED_DATAFILE = 'changesets-s.txt'
96 # A file containing a marshalled copy of all the statistics that have
97 # been gathered so far is written at the end of each pass as a
98 # marshalled dictionary. This is the pattern used to generate the
99 # filenames.
100 STATISTICS_FILE = 'statistics-%02d.pck'
102 # This text file contains records (1 per line) that describe openings
103 # and closings for copies to tags and branches. The format is as
104 # follows:
106 # SYMBOL_ID SVN_REVNUM TYPE CVS_SYMBOL_ID
108 # where type is either OPENING or CLOSING. CVS_SYMBOL_ID is the id of
109 # the CVSSymbol whose opening or closing is being described (in hex).
110 SYMBOL_OPENINGS_CLOSINGS = 'symbolic-names.txt'
111 # A sorted version of the above file. SYMBOL_ID and SVN_REVNUM are
112 # the primary and secondary sorting criteria. It is important that
113 # SYMBOL_IDs be located together to make it quick to read them at
114 # once. The order of SVN_REVNUM is only important because it is
115 # assumed by some internal consistency checks.
116 SYMBOL_OPENINGS_CLOSINGS_SORTED = 'symbolic-names-s.txt'
118 # Skeleton version of the repository filesystem. See class
119 # RepositoryMirror for how these work.
120 MIRROR_NODES_INDEX_TABLE = 'mirror-nodes-index.dat'
121 MIRROR_NODES_STORE = 'mirror-nodes.pck'
123 # Offsets pointing to the beginning of each symbol's records in
124 # SYMBOL_OPENINGS_CLOSINGS_SORTED. This file contains a pickled map
125 # from symbol_id to file offset.
126 SYMBOL_OFFSETS_DB = 'symbol-offsets.pck'
128 # Pickled map of CVSFile.id to instance.
129 CVS_FILES_DB = 'cvs-files.pck'
131 # A series of records. The first is a pickled serializer. Each
132 # subsequent record is a serialized list of all CVSItems applying to a
133 # CVSFile.
134 CVS_ITEMS_STORE = 'cvs-items.pck'
136 # The same as above, but with the CVSItems ordered in groups based on
137 # their initial changesets. CVSItems will usually be accessed one
138 # changeset at a time, so this ordering helps disk locality (even
139 # though some of the changesets will later be broken up).
140 CVS_ITEMS_SORTED_INDEX_TABLE = 'cvs-items-sorted-index.dat'
141 CVS_ITEMS_SORTED_STORE = 'cvs-items-sorted.pck'
143 # A record of all symbolic names that will be processed in the
144 # conversion. This file contains a pickled list of TypedSymbol
145 # objects.
146 SYMBOL_DB = 'symbols.pck'
148 # A pickled list of the statistics for all symbols. Each entry in the
149 # list is an instance of cvs2svn_lib.symbol_statistics._Stats.
150 SYMBOL_STATISTICS = 'symbol-statistics.pck'
152 # These two databases provide a bidirectional mapping between
153 # CVSRevision.ids (in hex) and Subversion revision numbers.
155 # The first maps CVSRevision.id to the SVN revision number of which it
156 # is a part (more than one CVSRevision can map to the same SVN
157 # revision number).
159 # The second maps Subversion revision numbers (as hex strings) to
160 # pickled SVNCommit instances.
161 CVS_REVS_TO_SVN_REVNUMS = 'cvs-revs-to-svn-revnums.dat'
163 # This database maps Subversion revision numbers to pickled SVNCommit
164 # instances.
165 SVN_COMMITS_INDEX_TABLE = 'svn-commits-index.dat'
166 SVN_COMMITS_STORE = 'svn-commits.pck'
168 # How many bytes to read at a time from a pipe. 128 kiB should be
169 # large enough to be efficient without wasting too much memory.
170 PIPE_READ_SIZE = 128 * 1024
172 # Records the author and log message for each changeset. The database
173 # contains a map metadata_id -> (author, logmessage). Each
174 # CVSRevision that is eligible to be combined into the same SVN commit
175 # is assigned the same id. Note that the (author, logmessage) pairs
176 # are not necessarily all distinct; other data are taken into account
177 # when constructing ids.
178 METADATA_INDEX_TABLE = 'metadata-index.dat'
179 METADATA_STORE = 'metadata.pck'
181 # The same, after it has been cleaned up for the chosen output option:
182 METADATA_CLEAN_INDEX_TABLE = 'metadata-clean-index.dat'
183 METADATA_CLEAN_STORE = 'metadata-clean.pck'
185 # The following four databases are used in conjunction with --use-internal-co.
187 # Records the RCS deltas for all CVS revisions. The deltas are to be
188 # applied forward, i.e. those from trunk are reversed wrt RCS.
189 RCS_DELTAS_INDEX_TABLE = 'rcs-deltas-index.dat'
190 RCS_DELTAS_STORE = 'rcs-deltas.pck'
192 # Records the revision tree of each RCS file. The format is a list of
193 # list of integers. The outer list holds lines of development, the inner list
194 # revisions within the LODs, revisions are CVSItem ids. Branches "closer
195 # to the trunk" appear later. Revisions are sorted by reverse chronological
196 # order. The last revision of each branch is the revision it sprouts from.
197 # Revisions that represent deletions at the end of a branch are omitted.
198 RCS_TREES_INDEX_TABLE = 'rcs-trees-index.dat'
199 RCS_TREES_STORE = 'rcs-trees.pck'
201 # Records the revision tree of each RCS file after removing revisions
202 # belonging to excluded branches. Note that the branch ordering is arbitrary
203 # in this file.
204 RCS_TREES_FILTERED_INDEX_TABLE = 'rcs-trees-filtered-index.dat'
205 RCS_TREES_FILTERED_STORE = 'rcs-trees-filtered.pck'
207 # At any given time during OutputPass, holds the full text of each CVS
208 # revision that was checked out already and still has descendants that will
209 # be checked out.
210 CVS_CHECKOUT_DB = 'cvs-checkout.db'
212 # End of DBs related to --use-internal-co.
214 # If this run will output directly to a Subversion repository, then
215 # this is the name of the file that each revision will temporarily be
216 # written to prior to writing it into the repository.
217 DUMPFILE = 'svn.dump'
219 # flush a commit if a 5 minute gap occurs.
220 COMMIT_THRESHOLD = 5 * 60