1 # (Be in -*- mode: python; coding: utf-8 -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2006-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 # #####################
18 # ## PLEASE READ ME! ##
19 # #####################
21 # This is a template for an options file that can be used to configure
22 # cvs2svn. Many options do not have defaults, so it is easier to copy
23 # this file and modify what you need rather than creating a new
24 # options file from scratch.
26 # This file is in Python syntax, but you don't need to know Python to
27 # modify it. But if you *do* know Python, then you will be happy to
28 # know that you can use arbitary Python constructs to do fancy
29 # configuration tricks.
31 # But please be aware of the following:
33 # * In many places, leading whitespace is significant in Python (it is
34 # used instead of curly braces to group statements together).
35 # Therefore, if you don't know what you are doing, it is best to
36 # leave the whitespace as it is.
38 # * In normal strings, Python treats a backslash ("\") as an escape
39 # character. Therefore, if you want to specify a string that
40 # contains a backslash, you need either to escape the backslash with
41 # another backslash ("\\"), or use a "raw string", as in one if the
42 # following equivalent examples:
44 # ctx.sort_executable = 'c:\\windows\\system32\\sort.exe'
45 # ctx.sort_executable = r'c:\windows\system32\sort.exe'
47 # See http://docs.python.org/tutorial/introduction.html#strings for
50 # Two identifiers will have been defined before this file is executed,
51 # and can be used freely within this file:
53 # ctx -- a Ctx object (see cvs2svn_lib/context.py), which holds
54 # many configuration options
56 # run_options -- an instance of the SVNRunOptions class (see
57 # cvs2svn_lib/svn_run_options.py), which holds some variables
58 # governing how cvs2svn is run
61 # Import some modules that are used in setting the options:
64 from cvs2svn_lib import config
65 from cvs2svn_lib import changeset_database
66 from cvs2svn_lib.common import CVSTextDecoder
67 from cvs2svn_lib.log import Log
68 from cvs2svn_lib.project import Project
69 from cvs2svn_lib.svn_output_option import DumpfileOutputOption
70 from cvs2svn_lib.svn_output_option import ExistingRepositoryOutputOption
71 from cvs2svn_lib.svn_output_option import NewRepositoryOutputOption
72 from cvs2svn_lib.revision_manager import NullRevisionRecorder
73 from cvs2svn_lib.revision_manager import NullRevisionExcluder
74 from cvs2svn_lib.rcs_revision_manager import RCSRevisionReader
75 from cvs2svn_lib.cvs_revision_manager import CVSRevisionReader
76 from cvs2svn_lib.checkout_internal import InternalRevisionRecorder
77 from cvs2svn_lib.checkout_internal import InternalRevisionExcluder
78 from cvs2svn_lib.checkout_internal import InternalRevisionReader
79 from cvs2svn_lib.symbol_strategy import AllBranchRule
80 from cvs2svn_lib.symbol_strategy import AllTagRule
81 from cvs2svn_lib.symbol_strategy import BranchIfCommitsRule
82 from cvs2svn_lib.symbol_strategy import ExcludeRegexpStrategyRule
83 from cvs2svn_lib.symbol_strategy import ForceBranchRegexpStrategyRule
84 from cvs2svn_lib.symbol_strategy import ForceTagRegexpStrategyRule
85 from cvs2svn_lib.symbol_strategy import ExcludeTrivialImportBranchRule
86 from cvs2svn_lib.symbol_strategy import ExcludeVendorBranchRule
87 from cvs2svn_lib.symbol_strategy import HeuristicStrategyRule
88 from cvs2svn_lib.symbol_strategy import UnambiguousUsageRule
89 from cvs2svn_lib.symbol_strategy import HeuristicPreferredParentRule
90 from cvs2svn_lib.symbol_strategy import SymbolHintsFileRule
91 from cvs2svn_lib.symbol_transform import ReplaceSubstringsSymbolTransform
92 from cvs2svn_lib.symbol_transform import RegexpSymbolTransform
93 from cvs2svn_lib.symbol_transform import IgnoreSymbolTransform
94 from cvs2svn_lib.symbol_transform import NormalizePathsSymbolTransform
95 from cvs2svn_lib.property_setters import AutoPropsPropertySetter
96 from cvs2svn_lib.property_setters import CVSBinaryFileDefaultMimeTypeSetter
97 from cvs2svn_lib.property_setters import CVSBinaryFileEOLStyleSetter
98 from cvs2svn_lib.property_setters import CVSRevisionNumberSetter
99 from cvs2svn_lib.property_setters import DefaultEOLStyleSetter
100 from cvs2svn_lib.property_setters import EOLStyleFromMimeTypeSetter
101 from cvs2svn_lib.property_setters import ExecutablePropertySetter
102 from cvs2svn_lib.property_setters import KeywordsPropertySetter
103 from cvs2svn_lib.property_setters import MimeMapper
104 from cvs2svn_lib.property_setters import SVNBinaryFileKeywordsPropertySetter
106 # To choose the level of logging output, uncomment one of the
108 #Log().log_level = Log.WARN
109 #Log().log_level = Log.QUIET
110 Log().log_level = Log.NORMAL
111 #Log().log_level = Log.VERBOSE
112 #Log().log_level = Log.DEBUG
115 # author_transforms can be used to map CVS author names (e.g.,
116 # "jrandom") to whatever names make sense for your SVN configuration
117 # (e.g., "john.j.random"). All values should be either 16-bit strings
118 # (i.e., with "u" as a prefix) or 8-bit strings in the utf-8 encoding.
119 # To use this feature, please substitute your own project's usernames
120 # here and uncomment the author_transforms option when setting
121 # ctx.output_option below
123 'jrandom' : u'john.j.random',
124 'brane' : u'Branko.Čibej',
125 'ringstrom' : 'ringström',
126 'dionisos' : u'e.hülsmann',
129 # There are several possible options for where to put the output of a
130 # cvs2svn conversion. Please choose one of the following and adjust
131 # the parameters as necessary:
133 # Use this output option if you would like cvs2svn to create a new SVN
134 # repository and store the converted repository there. The first
135 # argument is the path to which the repository should be written (this
136 # repository must not already exist). The (optional) fs_type argument
137 # allows a --fs-type option to be passed to "svnadmin create". The
138 # (optional) bdb_txn_nosync argument can be specified to set the
139 # --bdb-txn-nosync option on a bdb repository. The (optional)
140 # create_options argument can be specified to set a list of verbatim
141 # options to be passed to "svnadmin create". The (optional)
142 # author_transforms argument allows CVS author names to be transformed
143 # arbitrarily into SVN author names (as described above):
144 ctx.output_option = NewRepositoryOutputOption(
147 #bdb_txn_nosync=False,
148 #create_options=['--pre-1.5-compatible'],
149 #author_transforms=author_transforms,
152 # Use this output option if you would like cvs2svn to store the
153 # converted CVS repository into an SVN repository that already exists.
154 # The first argument is the filesystem path of an existing local SVN
155 # repository (this repository must already exist). The
156 # author_transforms option is as described above:
157 #ctx.output_option = ExistingRepositoryOutputOption(
158 # r'/path/to/svnrepo', # Path to repository
159 # #author_transforms=author_transforms,
162 # Use this type of output option if you want the output of the
163 # conversion to be written to a SVN dumpfile instead of committing
164 # them into an actual repository. The author_transforms option is as
166 #ctx.output_option = DumpfileOutputOption(
167 # dumpfile_path=r'/path/to/cvs2svn-dump', # Name of dumpfile to create
168 # #author_transforms=author_transforms,
172 # Independent of the ctx.output_option selected, the following option
173 # can be set to True to suppress cvs2svn output altogether:
176 # The following set of options specifies how the revision contents of
177 # the RCS files should be read.
179 # The default selection is InternalRevisionReader, which uses built-in
180 # code that reads the RCS deltas while parsing the files in
181 # CollectRevsPass. This method is very fast but requires lots of
182 # temporary disk space. The disk space is required for (1) storing
183 # all of the RCS deltas, and (2) during OutputPass, keeping a copy of
184 # the full text of every revision that still has a descendant that
185 # hasn't yet been committed. Since this can includes multiple
186 # revisions of each file (i.e., on multiple branches), the required
187 # amount of temporary space can potentially be many times the size of
188 # a checked out copy of the whole repository. Setting compress=True
189 # cuts the disk space requirements by about 50% at the price of
190 # increased CPU usage. Using compression usually speeds up the
191 # conversion due to the reduced I/O pressure, unless --tmpdir is on a
192 # RAM disk. This method does not expand CVS's "Log" keywords.
194 # The second possibility is RCSRevisionReader, which uses RCS's "co"
195 # program to extract the revision contents of the RCS files during
196 # OutputPass. This option doesn't require any temporary space, but it
197 # is relatively slow because (1) "co" has to be executed very many
198 # times; and (2) "co" itself has to assemble many file deltas to
199 # compute the contents of a particular revision. The constructor
200 # argument specifies how to invoke the "co" executable.
202 # The third possibility is CVSRevisionReader, which uses the "cvs"
203 # program to extract the revision contents out of the RCS files during
204 # OutputPass. This option doesn't require any temporary space, but it
205 # is the slowest of all, because "cvs" is considerably slower than
206 # "co". However, it works in some situations where RCSRevisionReader
207 # fails; see the HTML documentation of the "--use-cvs" option for
208 # details. The constructor argument specifies how to invoke the "co"
211 # Choose one of the following three groups of lines:
212 ctx.revision_recorder = InternalRevisionRecorder(compress=True)
213 ctx.revision_excluder = InternalRevisionExcluder()
214 ctx.revision_reader = InternalRevisionReader(compress=True)
216 #ctx.revision_recorder = NullRevisionRecorder()
217 #ctx.revision_excluder = NullRevisionExcluder()
218 #ctx.revision_reader = RCSRevisionReader(co_executable=r'co')
220 #ctx.revision_recorder = NullRevisionRecorder()
221 #ctx.revision_excluder = NullRevisionExcluder()
222 #ctx.revision_reader = CVSRevisionReader(cvs_executable=r'cvs')
224 # Set the name (and optionally the path) of some other executables
225 # required by cvs2svn:
226 ctx.svnadmin_executable = r'svnadmin'
227 ctx.sort_executable = r'sort'
229 # Change the following line to True if the conversion should only
230 # include the trunk of the repository (i.e., all branches and tags
231 # should be ignored):
232 ctx.trunk_only = False
234 # Change the following line to True if cvs2svn should delete a
235 # directory once the last file has been deleted from it:
238 # How to convert author names, log messages, and filenames to unicode.
239 # The first argument to CVSTextDecoder is a list of encoders that are
240 # tried in order in 'strict' mode until one of them succeeds. If none
241 # of those succeeds, then fallback_encoder is used in lossy 'replace'
242 # mode (if it is specified). Setting a fallback encoder ensures that
243 # the encoder always succeeds, but it can cause information loss.
244 ctx.cvs_author_decoder = CVSTextDecoder(
250 #fallback_encoding='ascii'
252 ctx.cvs_log_decoder = CVSTextDecoder(
258 #fallback_encoding='ascii'
260 # You might want to be especially strict when converting filenames to
261 # unicode (e.g., maybe not specify a fallback_encoding).
262 ctx.cvs_filename_decoder = CVSTextDecoder(
268 #fallback_encoding='ascii'
271 # Template for the commit message to be used for initial project
273 ctx.initial_project_commit_message = (
274 'Standard project directories initialized by cvs2svn.'
277 # Template for the commit message to be used for post commits, in
278 # which modifications to a vendor branch are copied back to trunk.
279 # This message can use '%(revnum)d' to include the revision number of
280 # the revision that included the change to the vendor branch.
281 ctx.post_commit_message = (
282 'This commit was generated by cvs2svn to compensate for '
283 'changes in r%(revnum)d, which included commits to RCS files '
284 'with non-trunk default branches.'
287 # Template for the commit message to be used for commits in which
288 # symbols are created. This message can use '%(symbol_type)d' to
289 # include the type of the symbol ('branch' or 'tag') or
290 # '%(symbol_name)' to include the name of the symbol.
291 ctx.symbol_commit_message = (
292 "This commit was manufactured by cvs2svn to create %(symbol_type)s "
296 # Some CVS clients for MacOS store resource fork data into CVS along
297 # with the file contents itself by wrapping it all up in a container
298 # format called "AppleSingle". Subversion currently does not support
299 # MacOS resource forks. Nevertheless, sometimes the resource fork
300 # information is not necessary and can be discarded. Set the
301 # following option to True if you would like cvs2svn to identify files
302 # whose contents are encoded in AppleSingle format, and discard all
303 # but the data fork for such files before committing them to
304 # Subversion. (Please note that AppleSingle contents are identified
305 # by the AppleSingle magic number as the first four bytes of the file.
306 # This check is not failproof, so only set this option if you think
308 ctx.decode_apple_single = False
310 # This option can be set to the name of a filename to which are stored
311 # statistics and conversion decisions about the CVS symbols.
312 ctx.symbol_info_filename = None
313 #ctx.symbol_info_filename = 'symbol-info.txt'
315 # cvs2svn uses "symbol strategy rules" to help decide how to handle
316 # CVS symbols. The rules in a project's symbol_strategy_rules are
317 # applied in order, and each rule is allowed to modify the symbol.
318 # The result (after each of the rules has been applied) is used for
321 # 1. A CVS symbol might be used as a tag in one file and as a branch
322 # in another file. cvs2svn has to decide whether to convert such a
323 # symbol as a tag or as a branch. cvs2svn uses a series of
324 # heuristic rules to decide how to convert a symbol. The user can
325 # override the default rules for specific symbols or symbols
326 # matching regular expressions.
328 # 2. cvs2svn is also capable of excluding symbols from the conversion
329 # (provided no other symbols depend on them.
331 # 3. CVS does not record unambiguously the line of development from
332 # which a symbol sprouted. cvs2svn uses a heuristic to choose a
333 # symbol's "preferred parents".
335 # The standard branch/tag/exclude StrategyRules do not change a symbol
336 # that has already been processed by an earlier rule, so in effect the
337 # first matching rule is the one that is used.
339 global_symbol_strategy_rules = [
340 # It is possible to specify manually exactly how symbols should be
341 # converted and what line of development should be used as the
342 # preferred parent. To do so, create a file containing the symbol
343 # hints and enable the following option.
345 # The format of the hints file is described in the documentation
346 # for the SymbolHintsFileRule class in
347 # cvs2svn_lib/symbol_strategy.py. The file output by the
348 # --write-symbol-info (i.e., ctx.symbol_info_filename) option is
349 # in the same format. The simplest way to use this option is to
350 # run the conversion through CollateSymbolsPass with
351 # --write-symbol-info option, copy the symbol info and edit it to
352 # create a hints file, then re-start the conversion at
353 # CollateSymbolsPass with this option enabled.
354 #SymbolHintsFileRule('symbol-hints.txt'),
356 # To force all symbols matching a regular expression to be
357 # converted as branches, add rules like the following:
358 #ForceBranchRegexpStrategyRule(r'branch.*'),
360 # To force all symbols matching a regular expression to be
361 # converted as tags, add rules like the following:
362 #ForceTagRegexpStrategyRule(r'tag.*'),
364 # To force all symbols matching a regular expression to be
365 # excluded from the conversion, add rules like the following:
366 #ExcludeRegexpStrategyRule(r'unknown-.*'),
368 # Sometimes people use "cvs import" to get their own source code
369 # into CVS. This practice creates a vendor branch 1.1.1 and
370 # imports the code onto the vendor branch as 1.1.1.1, then copies
371 # the same content to the trunk as version 1.1. Normally, such
372 # vendor branches are useless and they complicate the SVN history
373 # unnecessarily. The following rule excludes any branches that
374 # only existed as a vendor branch with a single import (leaving
375 # only the 1.1 revision). If you want to retain such branches,
376 # comment out the following line. (Please note that this rule
377 # does not exclude vendor *tags*, as they are not so easy to
379 ExcludeTrivialImportBranchRule(),
381 # To exclude all vendor branches (branches that had "cvs import"s
382 # on them bug no other kinds of commits), uncomment the following
384 #ExcludeVendorBranchRule(),
386 # Usually you want this rule, to convert unambiguous symbols
387 # (symbols that were only ever used as tags or only ever used as
388 # branches in CVS) the same way they were used in CVS:
389 UnambiguousUsageRule(),
391 # If there was ever a commit on a symbol, then it cannot be
392 # converted as a tag. This rule causes all such symbols to be
393 # converted as branches. If you would like to resolve such
394 # ambiguities manually, comment out the following line:
395 BranchIfCommitsRule(),
397 # Last in the list can be a catch-all rule that is used for
398 # symbols that were not matched by any of the more specific rules
399 # above. (Assuming that BranchIfCommitsRule() was included above,
400 # then the symbols that are still indeterminate at this point can
401 # sensibly be converted as branches or tags.) Include at most one
402 # of these lines. If none of these catch-all rules are included,
403 # then the presence of any ambiguous symbols (that haven't been
404 # disambiguated above) is an error:
406 # Convert ambiguous symbols based on whether they were used more
407 # often as branches or as tags:
408 HeuristicStrategyRule(),
409 # Convert all ambiguous symbols as branches:
411 # Convert all ambiguous symbols as tags:
414 # The last rule is here to choose the preferred parent of branches
415 # and tags, that is, the line of development from which the symbol
417 HeuristicPreferredParentRule(),
420 # Specify a username to be used for commits generated by cvs2svn. If
421 # this option is set to None then no username will be used for such
424 #ctx.username = 'cvs2svn'
426 # ctx.svn_property_setters contains a list of rules used to set the
427 # svn properties on files in the converted archive. For each file,
428 # the rules are tried one by one. Any rule can add or suppress one or
429 # more svn properties. Typically the rules will not overwrite
430 # properties set by a previous rule (though they are free to do so).
431 ctx.svn_property_setters.extend([
432 # To read auto-props rules from a file, uncomment the following line
433 # and specify a filename. The boolean argument specifies whether
434 # case should be ignored when matching filenames to the filename
435 # patterns found in the auto-props file:
436 #AutoPropsPropertySetter(
437 # r'/home/username/.subversion/config',
441 # To read mime types from a file, uncomment the following line and
442 # specify a filename:
443 #MimeMapper(r'/etc/mime.types'),
445 # Omit the svn:eol-style property from any files that are listed
446 # as binary (i.e., mode '-kb') in CVS:
447 CVSBinaryFileEOLStyleSetter(),
449 # If the file is binary and its svn:mime-type property is not yet
450 # set, set svn:mime-type to 'application/octet-stream'.
451 CVSBinaryFileDefaultMimeTypeSetter(),
453 # To try to determine the eol-style from the mime type, uncomment
454 # the following line:
455 #EOLStyleFromMimeTypeSetter(),
457 # Choose one of the following lines to set the default
458 # svn:eol-style if none of the above rules applied. The argument
459 # is the svn:eol-style that should be applied, or None if no
460 # svn:eol-style should be set (i.e., the file should be treated as
463 # The default is to treat all files as binary unless one of the
464 # previous rules has determined otherwise, because this is the
465 # safest approach. However, if you have been diligent about
466 # marking binary files with -kb in CVS and/or you have used the
467 # above rules to definitely mark binary files as binary, then you
468 # might prefer to use 'native' as the default, as it is usually
469 # the most convenient setting for text files. Other possible
470 # options: 'CRLF', 'CR', 'LF'.
471 DefaultEOLStyleSetter(None),
472 #DefaultEOLStyleSetter('native'),
474 # Prevent svn:keywords from being set on files that have
475 # svn:eol-style unset.
476 SVNBinaryFileKeywordsPropertySetter(),
478 # If svn:keywords has not been set yet, set it based on the file's
480 KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE),
482 # Set the svn:executable flag on any files that are marked in CVS as
484 ExecutablePropertySetter(),
486 # Uncomment the following line to include the original CVS revision
487 # numbers as file properties in the SVN archive:
488 #CVSRevisionNumberSetter(),
492 # The directory to use for temporary files:
493 ctx.tmpdir = r'cvs2svn-tmp'
495 # To skip the cleanup of temporary files, uncomment the following
497 #ctx.skip_cleanup = True
500 # In CVS, it is perfectly possible to make a single commit that
501 # affects more than one project or more than one branch of a single
502 # project. Subversion also allows such commits. Therefore, by
503 # default, when cvs2svn sees what looks like a cross-project or
504 # cross-branch CVS commit, it converts it into a
505 # cross-project/cross-branch Subversion commit.
507 # However, other tools and SCMs have trouble representing
508 # cross-project or cross-branch commits. (For example, Trac's Revtree
509 # plugin, http://www.trac-hacks.org/wiki/RevtreePlugin is confused by
510 # such commits.) Therefore, we provide the following two options to
511 # allow cross-project/cross-branch commits to be suppressed.
513 # To prevent CVS commits from different projects from being merged
514 # into single SVN commits, change this option to False:
515 ctx.cross_project_commits = True
517 # To prevent CVS commits on different branches from being merged into
518 # single SVN commits, change this option to False:
519 ctx.cross_branch_commits = True
521 # By default, .cvsignore files are rendered in the output by setting
522 # corresponding svn:ignore properties on the parent directory, but the
523 # .cvsignore files themselves are not included in the conversion
524 # output. If you would like to include the .cvsignore files in the
525 # output, change this option to True:
526 ctx.keep_cvsignore = False
528 # By default, it is a fatal error for a CVS ",v" file to appear both
529 # inside and outside of an "Attic" subdirectory (this should never
530 # happen, but frequently occurs due to botched repository
531 # administration). If you would like to retain both versions of such
532 # files, change the following option to True, and the attic version of
533 # the file will be left in an SVN subdirectory called "Attic":
534 ctx.retain_conflicting_attic_files = False
536 # Now use stanzas like the following to define CVS projects that
537 # should be converted. The arguments are:
539 # - The filesystem path of the project within the CVS repository.
541 # - The path that should be used for the "trunk" directory of this
542 # project within the SVN repository. This is an SVN path, so it
543 # should always use forward slashes ("/").
545 # - The path that should be used for the "branches" directory of this
546 # project within the SVN repository. This is an SVN path, so it
547 # should always use forward slashes ("/").
549 # - The path that should be used for the "tags" directory of this
550 # project within the SVN repository. This is an SVN path, so it
551 # should always use forward slashes ("/").
553 # - A list of symbol transformations that can be used to rename
554 # symbols in this project. Each entry is a tuple (pattern,
555 # replacement), where pattern is a Python regular expression pattern
556 # and replacement is the text that should replace the pattern. Each
557 # pattern is matched against each symbol name. If the pattern
558 # matches, then it is replaced with the corresponding replacement
559 # text. The replacement can include substitution patterns (e.g.,
560 # r'\1' or r'\g<name>'). Typically you will want to use raw strings
561 # (strings with a preceding 'r', like shown in the examples) for the
562 # regexp and its replacement to avoid backslash substitution within
566 # Create the default project (using ctx.trunk, ctx.branches, and ctx.tags):
567 run_options.add_project(
568 r'test-data/main-cvsrepos',
570 branches_path='branches',
572 initial_directories=[
573 # The project's trunk_path, branches_path, and tags_path
574 # directories are added to the SVN repository in the project's
575 # first commit. If you would like additional SVN directories
576 # to be created in the project's first commit, list them here:
580 # Use IgnoreSymbolTransforms like the following to completely
581 # ignore symbols matching a regular expression when parsing
582 # the CVS repository, for example to avoid warnings about
583 # branches with two names and to choose the preferred name.
584 # It is *not* recommended to use this instead of
585 # ExcludeRegexpStrategyRule; though more efficient,
586 # IgnoreSymbolTransforms are less flexible and don't exclude
587 # branches correctly. The argument is a Python-style regular
588 # expression that has to match the *whole* CVS symbol name:
589 #IgnoreSymbolTransform(r'nightly-build-tag-.*')
591 # RegexpSymbolTransforms transform symbols textually using a
592 # regular expression. The first argument is a Python regular
593 # expression pattern and the second is a replacement pattern.
594 # The pattern is matched against each symbol name. If it
595 # matches the whole symbol name, then the symbol name is
596 # replaced with the corresponding replacement text. The
597 # replacement can include substitution patterns (e.g., r'\1'
598 # or r'\g<name>'). Typically you will want to use raw strings
599 # (strings with a preceding 'r', like shown in the examples)
600 # for the regexp and its replacement to avoid backslash
601 # substitution within those strings.
602 #RegexpSymbolTransform(r'release-(\d+)_(\d+)',
604 #RegexpSymbolTransform(r'release-(\d+)_(\d+)_(\d+)',
605 # r'release-\1.\2.\3'),
607 # Simple 1:1 character replacements can also be done. The
608 # following transform, which converts backslashes into forward
609 # slashes, should usually be included:
610 ReplaceSubstringsSymbolTransform('\\','/'),
612 # Eliminate leading, trailing, and repeated slashes. This
613 # transform should always be included:
614 NormalizePathsSymbolTransform(),
616 symbol_strategy_rules=[
617 # Additional, project-specific symbol strategy rules can
619 ] + global_symbol_strategy_rules,
622 # Add a second project, to be stored to projA/trunk, projA/branches,
624 #run_options.add_project(
625 # r'my/cvsrepo/projA',
626 # trunk_path='projA/trunk',
627 # branches_path='projA/branches',
628 # tags_path='projA/tags',
629 # initial_directories=[
631 # symbol_transforms=[
632 # #RegexpSymbolTransform(r'release-(\d+)_(\d+)',
633 # # r'release-\1.\2'),
634 # #RegexpSymbolTransform(r'release-(\d+)_(\d+)_(\d+)',
635 # # r'release-\1.\2.\3'),
636 # ReplaceSubstringsSymbolTransform('\\','/'),
637 # NormalizePathsSymbolTransform(),
639 # symbol_strategy_rules=[
640 # # Additional, project-specific symbol strategy rules can
642 # ] + global_symbol_strategy_rules,
645 # Change this option to True to turn on profiling of cvs2svn (for
646 # debugging purposes):
647 run_options.profiling = False
650 # Should CVSItem -> Changeset database files be memory mapped? In
651 # some tests, using memory mapping speeded up the overall conversion
652 # by about 5%. But this option can cause the conversion to fail with
653 # an out of memory error if the conversion computer runs out of
654 # virtual address space (e.g., when running a very large conversion on
655 # a 32-bit operating system). Therefore it is disabled by default.
656 # Uncomment the following line to allow these database files to be
658 #changeset_database.use_mmap_for_cvs_item_to_changeset_table = True