cvs2svn conversion error in pass 4: Bad ed command
Wolfgang Dr Schwarz <[email protected]> Fri, 19 Apr 2013 13:28:33 +0200
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <OF839F19A4.698E7DC7-ONC1257B52.003EABE3-C1257B52.003F0A3A@LocalDomain> |
------=_Part_1377_199222412.1366373129222
Content-Type: multipart/alternative;
boundary="----=_Part_1378_404072811.1366373129222"
------=_Part_1378_404072811.1366373129222
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hello,
I am facing an error in pass 4 which occurs occasionally for some single=20
files, for example:
----- pass 4 (FilterSymbolsPass) -----
Filtering out excluded symbols and summarizing items...
c:\CVS\depot\inventory-admin\DATA\USERS,v
Malformed RCS delta in c:\CVS\depot\inventory-admin\DATA\USERS,v, revision=
=20
1.1417: Bad ed command
Traceback (most recent call last):
File "cvs2svn", line 70, in <module>
svn_main(os.path.basename(sys.argv[0]), sys.argv[1:])
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\main.py", line=20
113, in svn_main
main(progname, run_options, pass_manager)
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\main.py", line=20
96, in main
pass_manager.run(run_options)
File=20
"C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\pass_manager.py", line=
=20
181, in run
the_pass.run(run_options, stats_keeper)
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\passes.py", line=
=20
505, in run
revision_collector.process_file(cvs_file_items)
File=20
"C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\checkout_internal.py",=
=20
line 615, in process_file
_Sink(self, cvs_file_items),
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\rcsparser.py",=20
line 68, in parse
return selected_parser().parse(file, sink)
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_rcsparse\common.py",=
=20
line 477, in parse
self.parse_rcs_deltatext()
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_rcsparse\common.py",=
=20
line 450, in parse_rcs_deltatext
self.sink.set_revision_info(revision, log, text)
File=20
"C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\checkout_internal.py",=
=20
line 527, in set_revision_info
raise RuntimeError()
RuntimeError
It may be related to the fact that this CVS depot resides under UNIX and=20
that the USERS file was sometimes committed from UNIX and sometimes=20
Windows workspaces.
The options file is attached. Maybe there is some easy recommendation=20
about setting in there or a hint how to prepare the USERS,v file.
Thanks in advance
Wolfgang
=20
Diese e-mail wurde geschickt von/this mail has been sent from Adam Opel=20
AG, Bahnhofsplatz, 65423 R=C3=BCsselsheim am Main=20
Registergericht/Court of Registry: Amtsgericht Darmstadt=20
HRB-Nr./Commercial Register No: 89558=20
Sitz der Gesellschaft/Domicile: R=C3=BCsselsheim=20
Vorstand/Management Board: Dr. Karl-Thomas Neumann=20
(Vorsitzender/Chairman), Michael F. Ableson, Holger Kimmes, Michael=20
Lohscheller, Dr. Thomas Sedran, Peter Thom, Susanna Webber, Johan Willems=
=20
Aufsichtsrat/Supervisory Board: Stephen J. Girsky (Vorsitzender/Chairman)=
=20
=20
WICHTIG: Der Inhalt dieser Nachricht und eventueller Anh=C3=A4nge ist=20
vertraulich. Wenn Sie nicht der beabsichtigte Empf=C3=A4nger sind, dann l=
=C3=B6schen=20
Sie diese e-mail bitte sofort mit ihren Anh=C3=A4ngen und informieren den=
=20
Absender. Sie d=C3=BCrfen diese Nachricht oder einen Anhang nicht kopieren =
oder=20
an andere Personen weiterleiten.=20
Confidentiality note: this message is intended only for the person or=20
entity to which it is addressed. It may contain confidential and/or=20
privileged material. Any review, transmission, dissemination or other use,=
=20
or taking of any action in reliance upon this message by persons or=20
entities other than the intended recipient is prohibited and may be=20
unlawful. If you received this message in error, please contact the sender=
=20
and delete it from your computer.
------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=3D1667&dsMessageId=3D=
3053733
To unsubscribe from this discussion, e-mail: [[email protected]=
s.org].
------=_Part_1378_404072811.1366373129222
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
<font size=3D2 face=3D"sans-serif">Hello,</font><br><br><font size=3D2 face=
=3D"sans-serif">I am facing an error in pass 4 which
occurs occasionally for some single files, for example:</font><br><br><font=
size=3D2 face=3D"sans-serif">----- pass 4 (FilterSymbolsPass) -----</font>=
<br><font size=3D2 face=3D"sans-serif">Filtering out excluded symbols and s=
ummarizing
items...</font><br><font size=3D2 face=3D"sans-serif">c:\CVS\depot\inventor=
y-admin\DATA\USERS,v</font><br><font size=3D2 face=3D"sans-serif">Malformed=
RCS delta in c:\CVS\depot\inventory-admin\DATA\USERS,v,
revision 1.1417: Bad ed command</font><br><font size=3D2 face=3D"sans-serif=
">Traceback (most recent call last):</font><br><font size=3D2 face=3D"sans-=
serif"> File "cvs2svn", line
70, in <module></font><br><font size=3D2 face=3D"sans-serif"> &=
nbsp; svn_main(os.path.basename(sys.argv[0]),
sys.argv[1:])</font><br><font size=3D2 face=3D"sans-serif"> File &quo=
t;C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\main.py",
line 113, in svn_main</font><br><font size=3D2 face=3D"sans-serif"> &=
nbsp; main(progname, run_options,
pass_manager)</font><br><font size=3D2 face=3D"sans-serif"> File &quo=
t;C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\main.py",
line 96, in main</font><br><font size=3D2 face=3D"sans-serif"> =
pass_manager.run(run_options)</font><br><font size=3D2 face=3D"sans-serif"=
> File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\pass_m=
anager.py",
line 181, in run</font><br><font size=3D2 face=3D"sans-serif"> =
the_pass.run(run_options,
stats_keeper)</font><br><font size=3D2 face=3D"sans-serif"> File &quo=
t;C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\passes.py",
line 505, in run</font><br><font size=3D2 face=3D"sans-serif"> =
revision_collector.process_file(cvs_file_items)</font><br><font size=3D2 f=
ace=3D"sans-serif"> File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\=
cvs2svn_lib\checkout_internal.py",
line 615, in process_file</font><br><font size=3D2 face=3D"sans-serif">&nbs=
p; _Sink(self, cvs_file_items),</font><br><font size=3D2 face=3D"san=
s-serif"> File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_li=
b\rcsparser.py",
line 68, in parse</font><br><font size=3D2 face=3D"sans-serif">  =
; return selected_parser().parse(file,
sink)</font><br><font size=3D2 face=3D"sans-serif"> File "C:\Dat=
en\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_rcsparse\common.py",
line 477, in parse</font><br><font size=3D2 face=3D"sans-serif"> &nbs=
p; self.parse_rcs_deltatext()</font><br><font size=3D2 face=3D"sans-serif">=
File "C:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_rcsparse\co=
mmon.py",
line 450, in parse_rcs_deltatext</font><br><font size=3D2 face=3D"sans-seri=
f"> self.sink.set_revision_info(revision,
log, text)</font><br><font size=3D2 face=3D"sans-serif"> File "C=
:\Daten\PC_own\CVS2SVN\cvs2svn-2.4.0\cvs2svn_lib\checkout_internal.py"=
,
line 527, in set_revision_info</font><br><font size=3D2 face=3D"sans-serif"=
> raise RuntimeError()</font><br><font size=3D2 face=3D"sans-s=
erif">RuntimeError</font><br><br><font size=3D2 face=3D"sans-serif">It may =
be related to the fact that this
CVS depot resides under UNIX and that the USERS file was sometimes committe=
d
from UNIX and sometimes Windows workspaces.</font><br><font size=3D2 face=
=3D"sans-serif">The options file is attached. Maybe
there is some easy recommendation about setting in there or a hint how
to prepare the USERS,v file.</font><br><br><font size=3D2 face=3D"sans-seri=
f">Thanks in advance</font><br><font size=3D2 face=3D"sans-serif">Wolfgang<=
/font><br><br><font size=3D2 face=3D"sans-serif"> </font><br><font siz=
e=3D2 face=3D"sans-serif"><br><br></font><font size=3D1 face=3D"sans-serif"=
><i>Diese e-mail wurde geschickt von/this
mail has been sent from Adam Opel AG, Bahnhofsplatz, 65423 R=FCsselsheim
am Main <br>Registergericht/Court of Registry: Amtsgericht Darmstadt <br>HR=
B-Nr./Commercial Register No: 89558 <br>Sitz der Gesellschaft/Domicile: R=
=FCsselsheim <br>Vorstand/Management Board: Dr. Karl-Thomas Neumann (Vorsit=
zender/Chairman),
Michael F. Ableson, Holger Kimmes, Michael Lohscheller, Dr. Thomas Sedran,
Peter Thom, Susanna Webber, Johan Willems <br>Aufsichtsrat/Supervisory Boar=
d: Stephen J. Girsky (Vorsitzender/Chairman)
</i></font><font size=3D3> <br></font><font size=3D2 face=3D"sans-ser=
if"><br></font><font size=3D1 face=3D"sans-serif"><i>WICHTIG: Der Inhalt di=
eser Nachricht
und eventueller Anh=E4nge ist vertraulich. Wenn Sie nicht der beabsichtigte
Empf=E4nger sind, dann l=F6schen Sie diese e-mail bitte sofort mit ihren An=
h=E4ngen
und informieren den Absender. Sie d=FCrfen diese Nachricht oder einen Anhan=
g
nicht kopieren oder an andere Personen weiterleiten.</i></font><font size=
=3D1><i></i></font><font size=3D1 face=3D"sans-serif"><i><br>Confidentialit=
y note: this message is intended only for the person
or entity to which it is addressed. It may contain confidential and/or
privileged material. Any review, transmission, dissemination or other use,
or taking of any action in reliance upon this message by persons or entitie=
s
other than the intended recipient is prohibited and may be unlawful. If
you received this message in error, please contact the sender and delete
it from your computer. </i><br></font><br><BR>
------=_Part_1378_404072811.1366373129222--
------=_Part_1377_199222412.1366373129222
Content-Type: text/plain; name=cvs2svn-options.txt
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=cvs2svn-options.txt
# (Be in -*- mode: python; coding: utf-8 -*- mode.)
#
# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
# Copyright (c) 2006-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
# This software consists of voluntary contributions made by many
# individuals. For exact contribution history, see the revision
# history and logs, available at http://cvs2svn.tigris.org/.
# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
# #####################
# ## PLEASE READ ME! ##
# #####################
#
# This is a template for an options file that can be used to configure
# cvs2svn. Many options do not have defaults, so it is easier to copy
# this file and modify what you need rather than creating a new
# options file from scratch.
#
# This file is in Python syntax, but you don't need to know Python to
# modify it. But if you *do* know Python, then you will be happy to
# know that you can use arbitary Python constructs to do fancy
# configuration tricks.
#
# But please be aware of the following:
#
# * In many places, leading whitespace is significant in Python (it is
# used instead of curly braces to group statements together).
# Therefore, if you don't know what you are doing, it is best to
# leave the whitespace as it is.
#
# * In normal strings, Python treats a backslash ("\") as an escape
# character. Therefore, if you want to specify a string that
# contains a backslash, you need either to escape the backslash with
# another backslash ("\\"), or use a "raw string", as in one if the
# following equivalent examples:
#
# cvs_executable =3D 'c:\\windows\\system32\\cvs.exe'
# cvs_executable =3D r'c:\windows\system32\cvs.exe'
#
# See http://docs.python.org/tutorial/introduction.html#strings for
# more information.
#
# Two identifiers will have been defined before this file is executed,
# and can be used freely within this file:
#
# ctx -- a Ctx object (see cvs2svn_lib/context.py), which holds
# many configuration options
#
# run_options -- an instance of the SVNRunOptions class (see
# cvs2svn_lib/svn_run_options.py), which holds some variables
# governing how cvs2svn is run
# Import some modules that are used in setting the options:
from cvs2svn_lib import config
from cvs2svn_lib import changeset_database
from cvs2svn_lib.common import CVSTextDecoder
from cvs2svn_lib.log import logger
from cvs2svn_lib.svn_output_option import DumpfileOutputOption
from cvs2svn_lib.svn_output_option import ExistingRepositoryOutputOption
from cvs2svn_lib.svn_output_option import NewRepositoryOutputOption
from cvs2svn_lib.svn_run_options import SVNEOLFixPropertySetter
from cvs2svn_lib.svn_run_options import SVNKeywordHandlingPropertySetter
from cvs2svn_lib.revision_manager import NullRevisionCollector
from cvs2svn_lib.rcs_revision_manager import RCSRevisionReader
from cvs2svn_lib.cvs_revision_manager import CVSRevisionReader
from cvs2svn_lib.checkout_internal import InternalRevisionCollector
from cvs2svn_lib.checkout_internal import InternalRevisionReader
from cvs2svn_lib.symbol_strategy import AllBranchRule
from cvs2svn_lib.symbol_strategy import AllTagRule
from cvs2svn_lib.symbol_strategy import BranchIfCommitsRule
from cvs2svn_lib.symbol_strategy import ExcludeRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import ForceBranchRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import ForceTagRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import ExcludeTrivialImportBranchRule
from cvs2svn_lib.symbol_strategy import ExcludeVendorBranchRule
from cvs2svn_lib.symbol_strategy import HeuristicStrategyRule
from cvs2svn_lib.symbol_strategy import UnambiguousUsageRule
from cvs2svn_lib.symbol_strategy import HeuristicPreferredParentRule
from cvs2svn_lib.symbol_strategy import SymbolHintsFileRule
from cvs2svn_lib.symbol_transform import ReplaceSubstringsSymbolTransform
from cvs2svn_lib.symbol_transform import RegexpSymbolTransform
from cvs2svn_lib.symbol_transform import IgnoreSymbolTransform
from cvs2svn_lib.symbol_transform import NormalizePathsSymbolTransform
from cvs2svn_lib.property_setters import AutoPropsPropertySetter
from cvs2svn_lib.property_setters import CVSBinaryFileDefaultMimeTypeSetter
from cvs2svn_lib.property_setters import CVSBinaryFileEOLStyleSetter
from cvs2svn_lib.property_setters import CVSRevisionNumberSetter
from cvs2svn_lib.property_setters import DefaultEOLStyleSetter
from cvs2svn_lib.property_setters import EOLStyleFromMimeTypeSetter
from cvs2svn_lib.property_setters import ExecutablePropertySetter
from cvs2svn_lib.property_setters import DescriptionPropertySetter
from cvs2svn_lib.property_setters import KeywordsPropertySetter
from cvs2svn_lib.property_setters import MimeMapper
from cvs2svn_lib.property_setters import SVNBinaryFileKeywordsPropertySette=
r
# To choose the level of logging output, uncomment one of the
# following lines:
#logger.log_level =3D logger.WARN
#logger.log_level =3D logger.QUIET
#logger.log_level =3D logger.NORMAL
logger.log_level =3D logger.VERBOSE
#logger.log_level =3D logger.DEBUG
# The directory to use for temporary files:
ctx.tmpdir =3D r'cvs2svn-tmp'
# author_transforms can be used to map CVS author names (e.g.,
# "jrandom") to whatever names make sense for your SVN configuration
# (e.g., "john.j.random"). All values should be either Unicode
# strings (i.e., with "u" as a prefix) or 8-bit strings in the utf-8
# encoding. To use this feature, please substitute your own project's
# usernames here and uncomment the author_transforms option when
# setting ctx.output_option below
#author_transforms=3D{
# 'jrandom' : u'john.j.random',
# 'brane' : u'Branko.=C4=8Cibej',
# 'ringstrom' : 'ringstr=C3=B6m',
# 'dionisos' : u'e.h=C3=BClsmann',
# }
author_transforms=3D{
'schwarz' : 'wolfgang.schwarz',
}
# There are several possible options for where to put the output of a
# cvs2svn conversion. Please choose one of the following and adjust
# the parameters as necessary:
# Use this output option if you would like cvs2svn to create a new SVN
# repository and store the converted repository there. The first
# argument is the path to which the repository should be written (this
# repository must not already exist). The (optional) fs_type argument
# allows a --fs-type option to be passed to "svnadmin create". The
# (optional) bdb_txn_nosync argument can be specified to set the
# --bdb-txn-nosync option on a bdb repository. The (optional)
# create_options argument can be specified to set a list of verbatim
# options to be passed to "svnadmin create". The (optional)
# author_transforms argument allows CVS author names to be transformed
# arbitrarily into SVN author names (as described above):
#ctx.output_option =3D NewRepositoryOutputOption(
# r'c:\SVN2\refile',
#ctx.output_option =3D NewRepositoryOutputOption(
# r'https://svn.gm.com/svn/VSD_UGDEV_99999/CAD/refile',
# #fs_type=3D'fsfs',
# #bdb_txn_nosync=3DFalse,
# #create_options=3D['--pre-1.5-compatible'],
# #author_transforms=3Dauthor_transforms,
# )
# Use this output option if you would like cvs2svn to store the
# converted CVS repository into an SVN repository that already exists.
# The first argument is the filesystem path of an existing local SVN
# repository (this repository must already exist). The
# author_transforms option is as described above:
ctx.output_option =3D ExistingRepositoryOutputOption(
r'c:\SVN_depot\inventory_users', # Path to repository
#author_transforms=3Dauthor_transforms,
)
# Use this type of output option if you want the output of the
# conversion to be written to a SVN dumpfile instead of committing
# them into an actual repository. The author_transforms option is as
# described above:
#ctx.output_option =3D DumpfileOutputOption(
# dumpfile_path=3Dr'/path/to/cvs2svn-dump', # Name of dumpfile to create
# #author_transforms=3Dauthor_transforms,
# )
# Independent of the ctx.output_option selected, the following option
# can be set to True to suppress cvs2svn output altogether:
ctx.dry_run =3D False
# The following set of options specifies how the revision contents of
# the RCS files should be read.
#
# The default selection is InternalRevisionReader, which uses built-in
# code that reads the RCS deltas while parsing the files in
# CollectRevsPass. This method is very fast but requires lots of
# temporary disk space. The disk space is required for (1) storing
# all of the RCS deltas, and (2) during OutputPass, keeping a copy of
# the full text of every revision that still has a descendant that
# hasn't yet been committed. Since this can includes multiple
# revisions of each file (i.e., on multiple branches), the required
# amount of temporary space can potentially be many times the size of
# a checked out copy of the whole repository. Setting compress=3DTrue
# cuts the disk space requirements by about 50% at the price of
# increased CPU usage. Using compression usually speeds up the
# conversion due to the reduced I/O pressure, unless --tmpdir is on a
# RAM disk. This method does not expand CVS's "Log" keywords.
#
# The second possibility is RCSRevisionReader, which uses RCS's "co"
# program to extract the revision contents of the RCS files during
# OutputPass. This option doesn't require any temporary space, but it
# is relatively slow because (1) "co" has to be executed very many
# times; and (2) "co" itself has to assemble many file deltas to
# compute the contents of a particular revision. The constructor
# argument specifies how to invoke the "co" executable.
#
# The third possibility is CVSRevisionReader, which uses the "cvs"
# program to extract the revision contents out of the RCS files during
# OutputPass. This option doesn't require any temporary space, but it
# is the slowest of all, because "cvs" is considerably slower than
# "co". However, it works in some situations where RCSRevisionReader
# fails; see the HTML documentation of the "--use-cvs" option for
# details. The constructor argument specifies how to invoke the "co"
# executable.
#
# Choose one of the following three groups of lines:
ctx.revision_collector =3D InternalRevisionCollector(compress=3DTrue)
ctx.revision_reader =3D InternalRevisionReader(compress=3DTrue)
#ctx.revision_collector =3D NullRevisionCollector()
#ctx.revision_reader =3D RCSRevisionReader(co_executable=3Dr'co')
# It is also possible to pass a global_options parameter to
# CVSRevisionReader to specify which options should be passed to the
# cvs command. By default the correct options are usually chosen, but
# for CVSNT you might want to add global_options=3D['-q', '-N', '-f'].
#ctx.revision_collector =3D NullRevisionCollector()
#ctx.revision_reader =3D CVSRevisionReader(cvs_executable=3Dr'cvs')
# Set the name (and optionally the path) to the 'svnadmin' command,
# which is needed for NewRepositoryOutputOption or
# ExistingRepositoryOutputOption. The default is the "svnadmin"
# command in the user's PATH:
ctx.svnadmin_executable =3D r'C:\Program Files\CollabNet\Subversion Client\=
svnadmin.exe'
# Change the following line to True if the conversion should only
# include the trunk of the repository (i.e., all branches and tags
# should be ignored):
ctx.trunk_only =3D False
# Normally, cvs2svn ignores directories within the CVS repository if
# they do not contain valid RCS files. This produces a Subversion
# repository whose behavior imitates that of CVS if CVS is typically
# used with the "-P" option. However, sometimes these empty
# directories are needed by a project (e.g., by the build procedure).
# If so, the following option can be sent to True to cause empty
# directories to be created in the SVN repository when their parent
# directory is created and removed when their parent directory is
# removed. (This is more likely to be useful than the behavior of CVS
# when its "-P" option is not used.)
ctx.include_empty_directories =3D False
# Normally, cvs2svn deletes a directory once the last file has been
# deleted from it (a la "cvs -P"). Change the following line to False
# if you would like such directories to be retained in the Subversion
# repository through the rest of history:
ctx.prune =3D True
# How to convert author names, log messages, and filenames to Unicode.
# The first argument to CVSTextDecoder is a list of encoders that are
# tried in order in 'strict' mode until one of them succeeds. If none
# of those succeeds, then fallback_encoder is used in lossy 'replace'
# mode (if it is specified). Setting a fallback encoder ensures that
# the encoder always succeeds, but it can cause information loss.
ctx.cvs_author_decoder =3D CVSTextDecoder(
[
#'utf8',
#'latin1',
'ascii',
],
fallback_encoding=3D'ascii'
)
ctx.cvs_log_decoder =3D CVSTextDecoder(
[
#'utf8',
#'latin1',
'ascii',
],
fallback_encoding=3D'ascii',
eol_fix=3D'\n',
)
# You might want to be especially strict when converting filenames to
# Unicode (e.g., maybe not specify a fallback_encoding).
ctx.cvs_filename_decoder =3D CVSTextDecoder(
[
#'utf8',
#'latin1',
'ascii',
],
fallback_encoding=3D'ascii'
)
# Template for the commit message to be used for initial project
# commits.
ctx.initial_project_commit_message =3D (
'Standard project directories initialized by cvs2svn.'
)
# Template for the commit message to be used for post commits, in
# which modifications to a vendor branch are copied back to trunk.
# This message can use '%(revnum)d' to include the revision number of
# the revision that included the change to the vendor branch.
ctx.post_commit_message =3D (
'This commit was generated by cvs2svn to compensate for '
'changes in r%(revnum)d, which included commits to RCS files '
'with non-trunk default branches.'
)
# Template for the commit message to be used for commits in which
# symbols are created. This message can use '%(symbol_type)s' to
# include the type of the symbol ('branch' or 'tag') or
# '%(symbol_name)s' to include the name of the symbol.
ctx.symbol_commit_message =3D (
"This commit was manufactured by cvs2svn to create %(symbol_type)s "
"'%(symbol_name)s'."
)
# Some CVS clients for MacOS store resource fork data into CVS along
# with the file contents itself by wrapping it all up in a container
# format called "AppleSingle". Subversion currently does not support
# MacOS resource forks. Nevertheless, sometimes the resource fork
# information is not necessary and can be discarded. Set the
# following option to True if you would like cvs2svn to identify files
# whose contents are encoded in AppleSingle format, and discard all
# but the data fork for such files before committing them to
# Subversion. (Please note that AppleSingle contents are identified
# by the AppleSingle magic number as the first four bytes of the file.
# This check is not failproof, so only set this option if you think
# you need it.)
ctx.decode_apple_single =3D False
# This option can be set to the name of a filename to which are stored
# statistics and conversion decisions about the CVS symbols.
ctx.symbol_info_filename =3D None
#ctx.symbol_info_filename =3D 'symbol-info.txt'
# cvs2svn uses "symbol strategy rules" to help decide how to handle
# CVS symbols. The rules in a project's symbol_strategy_rules are
# applied in order, and each rule is allowed to modify the symbol.
# The result (after each of the rules has been applied) is used for
# the conversion.
#
# 1. A CVS symbol might be used as a tag in one file and as a branch
# in another file. cvs2svn has to decide whether to convert such a
# symbol as a tag or as a branch. cvs2svn uses a series of
# heuristic rules to decide how to convert a symbol. The user can
# override the default rules for specific symbols or symbols
# matching regular expressions.
#
# 2. cvs2svn is also capable of excluding symbols from the conversion
# (provided no other symbols depend on them.
#
# 3. CVS does not record unambiguously the line of development from
# which a symbol sprouted. cvs2svn uses a heuristic to choose a
# symbol's "preferred parents".
#
# The standard branch/tag/exclude StrategyRules do not change a symbol
# that has already been processed by an earlier rule, so in effect the
# first matching rule is the one that is used.
global_symbol_strategy_rules =3D [
# It is possible to specify manually exactly how symbols should be
# converted and what line of development should be used as the
# preferred parent. To do so, create a file containing the symbol
# hints and enable the following option.
#
# The format of the hints file is described in the documentation
# for the SymbolHintsFileRule class in
# cvs2svn_lib/symbol_strategy.py. The file output by the
# --write-symbol-info (i.e., ctx.symbol_info_filename) option is
# in the same format. The simplest way to use this option is to
# run the conversion through CollateSymbolsPass with
# --write-symbol-info option, copy the symbol info and edit it to
# create a hints file, then re-start the conversion at
# CollateSymbolsPass with this option enabled.
#SymbolHintsFileRule('symbol-hints.txt'),
# To force all symbols matching a regular expression to be
# converted as branches, add rules like the following:
#ForceBranchRegexpStrategyRule(r'branch.*'),
# To force all symbols matching a regular expression to be
# converted as tags, add rules like the following:
#ForceTagRegexpStrategyRule(r'tag.*'),
# To force all symbols matching a regular expression to be
# excluded from the conversion, add rules like the following:
#ExcludeRegexpStrategyRule(r'unknown-.*'),
# Sometimes people use "cvs import" to get their own source code
# into CVS. This practice creates a vendor branch 1.1.1 and
# imports the code onto the vendor branch as 1.1.1.1, then copies
# the same content to the trunk as version 1.1. Normally, such
# vendor branches are useless and they complicate the SVN history
# unnecessarily. The following rule excludes any branches that
# only existed as a vendor branch with a single import (leaving
# only the 1.1 revision). If you want to retain such branches,
# comment out the following line. (Please note that this rule
# does not exclude vendor *tags*, as they are not so easy to
# identify.)
ExcludeTrivialImportBranchRule(),
# To exclude all vendor branches (branches that had "cvs import"s
# on them but no other kinds of commits), uncomment the following
# line:
#ExcludeVendorBranchRule(),
# Usually you want this rule, to convert unambiguous symbols
# (symbols that were only ever used as tags or only ever used as
# branches in CVS) the same way they were used in CVS:
UnambiguousUsageRule(),
# If there was ever a commit on a symbol, then it cannot be
# converted as a tag. This rule causes all such symbols to be
# converted as branches. If you would like to resolve such
# ambiguities manually, comment out the following line:
BranchIfCommitsRule(),
# Last in the list can be a catch-all rule that is used for
# symbols that were not matched by any of the more specific rules
# above. (Assuming that BranchIfCommitsRule() was included above,
# then the symbols that are still indeterminate at this point can
# sensibly be converted as branches or tags.) Include at most one
# of these lines. If none of these catch-all rules are included,
# then the presence of any ambiguous symbols (that haven't been
# disambiguated above) is an error:
# Convert ambiguous symbols based on whether they were used more
# often as branches or as tags:
HeuristicStrategyRule(),
# Convert all ambiguous symbols as branches:
#AllBranchRule(),
# Convert all ambiguous symbols as tags:
#AllTagRule(),
# The last rule is here to choose the preferred parent of branches
# and tags, that is, the line of development from which the symbol
# sprouts.
HeuristicPreferredParentRule(),
]
# Specify a username to be used for commits generated by cvs2svn. If
# this option is set to None then no username will be used for such
# commits:
ctx.username =3D None
#ctx.username =3D 'cvs2svn'
# ctx.file_property_setters and ctx.revision_property_setters contain
# rules used to set the svn properties on files in the converted
# archive. For each file, the rules are tried one by one. Any rule
# can add or suppress one or more svn properties. Typically the rules
# will not overwrite properties set by a previous rule (though they
# are free to do so). ctx.file_property_setters should be used for
# properties that remain the same for the life of the file; these
# should implement FilePropertySetter. ctx.revision_property_setters
# should be used for properties that are allowed to vary from revision
# to revision; these should implement RevisionPropertySetter.
ctx.file_property_setters.extend([
# To read auto-props rules from a file, uncomment the following line
# and specify a filename. The boolean argument specifies whether
# case should be ignored when matching filenames to the filename
# patterns found in the auto-props file:
#AutoPropsPropertySetter(
# r'/home/username/.subversion/config',
# ignore_case=3DTrue,
# ),
# To read mime types from a file and use them to set svn:mime-type
# based on the filename extensions, uncomment the following line
# and specify a filename (see
# http://en.wikipedia.org/wiki/Mime.types for information about
# mime.types files):
#MimeMapper(r'/etc/mime.types', ignore_case=3DFalse),
# Omit the svn:eol-style property from any files that are listed
# as binary (i.e., mode '-kb') in CVS:
CVSBinaryFileEOLStyleSetter(),
# If the file is binary and its svn:mime-type property is not yet
# set, set svn:mime-type to 'application/octet-stream'.
CVSBinaryFileDefaultMimeTypeSetter(),
# To try to determine the eol-style from the mime type, uncomment
# the following line:
#EOLStyleFromMimeTypeSetter(),
# Choose one of the following lines to set the default
# svn:eol-style if none of the above rules applied. The argument
# is the svn:eol-style that should be applied, or None if no
# svn:eol-style should be set (i.e., the file should be treated as
# binary).
#
# The default is to treat all files as binary unless one of the
# previous rules has determined otherwise, because this is the
# safest approach. However, if you have been diligent about
# marking binary files with -kb in CVS and/or you have used the
# above rules to definitely mark binary files as binary, then you
# might prefer to use 'native' as the default, as it is usually
# the most convenient setting for text files. Other possible
# options: 'CRLF', 'CR', 'LF'.
DefaultEOLStyleSetter(None),
#DefaultEOLStyleSetter('native'),
# Prevent svn:keywords from being set on files that have
# svn:eol-style unset.
SVNBinaryFileKeywordsPropertySetter(),
# If svn:keywords has not been set yet, set it based on the file's
# CVS mode:
KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE),
# Set the svn:executable flag on any files that are marked in CVS as
# being executable:
ExecutablePropertySetter(),
# Set the cvs:description property to the CVS description of any
# file that has one:
DescriptionPropertySetter(propname=3D'cvs:description'),
# The following is for internal use. It determines how to handle
# keywords in the text being committed:
SVNKeywordHandlingPropertySetter(),
# The following is for internal use. It determines how to munge
# EOL sequences based on how the svn:eol-style property is set.
SVNEOLFixPropertySetter(),
])
ctx.revision_property_setters.extend([
# Uncomment the following line to include the original CVS revision
# numbers as file properties in the SVN archive:
#CVSRevisionNumberSetter(propname=3D'cvs2svn:cvs-rev'),
])
# To skip the cleanup of temporary files, uncomment the following
# option:
#ctx.skip_cleanup =3D True
# In CVS, it is perfectly possible to make a single commit that
# affects more than one project or more than one branch of a single
# project. Subversion also allows such commits. Therefore, by
# default, when cvs2svn sees what looks like a cross-project or
# cross-branch CVS commit, it converts it into a
# cross-project/cross-branch Subversion commit.
#
# However, other tools and SCMs have trouble representing
# cross-project or cross-branch commits. (For example, Trac's Revtree
# plugin, http://www.trac-hacks.org/wiki/RevtreePlugin is confused by
# such commits.) Therefore, we provide the following two options to
# allow cross-project/cross-branch commits to be suppressed.
# To prevent CVS commits from different projects from being merged
# into single SVN commits, change this option to False:
ctx.cross_project_commits =3D True
# To prevent CVS commits on different branches from being merged into
# single SVN commits, change this option to False:
ctx.cross_branch_commits =3D True
# By default, .cvsignore files are rendered in the output by setting
# corresponding svn:ignore properties on the parent directory, but the
# .cvsignore files themselves are not included in the conversion
# output. If you would like to include the .cvsignore files in the
# output, change this option to True:
ctx.keep_cvsignore =3D False
# By default, it is a fatal error for a CVS ",v" file to appear both
# inside and outside of an "Attic" subdirectory (this should never
# happen, but frequently occurs due to botched repository
# administration). If you would like to retain both versions of such
# files, change the following option to True, and the attic version of
# the file will be left in an SVN subdirectory called "Attic":
ctx.retain_conflicting_attic_files =3D False
# Now use stanzas like the following to define CVS projects that
# should be converted. The arguments are:
#
# - The filesystem path of the project within the CVS repository.
#
# - The path that should be used for the "trunk" directory of this
# project within the SVN repository. This is an SVN path, so it
# should always use forward slashes ("/").
#
# - The path that should be used for the "branches" directory of this
# project within the SVN repository. This is an SVN path, so it
# should always use forward slashes ("/").
#
# - The path that should be used for the "tags" directory of this
# project within the SVN repository. This is an SVN path, so it
# should always use forward slashes ("/").
#
# - A list of symbol transformations that can be used to rename
# symbols in this project. Each entry is a tuple (pattern,
# replacement), where pattern is a Python regular expression pattern
# and replacement is the text that should replace the pattern. Each
# pattern is matched against each symbol name. If the pattern
# matches, then it is replaced with the corresponding replacement
# text. The replacement can include substitution patterns (e.g.,
# r'\1' or r'\g<name>'). Typically you will want to use raw strings
# (strings with a preceding 'r', like shown in the examples) for the
# regexp and its replacement to avoid backslash substitution within
# those strings.
# Create the default project (using ctx.trunk, ctx.branches, and ctx.tags):
# r'c:\CVS\depot_from_svn\CVS\depot\inventory-admin', 2013-04-19
run_options.add_project(
r'c:\CVS\depot\inventory-admin',
trunk_path=3D'trunk',
branches_path=3D'branches',
tags_path=3D'tags',
initial_directories=3D[
# The project's trunk_path, branches_path, and tags_path
# directories are added to the SVN repository in the project's
# first commit. If you would like additional SVN directories
# to be created in the project's first commit, list them here:
#'releases',
],
symbol_transforms=3D[
# Use IgnoreSymbolTransforms like the following to completely
# ignore symbols matching a regular expression when parsing
# the CVS repository, for example to avoid warnings about
# branches with two names and to choose the preferred name.
# It is *not* recommended to use this instead of
# ExcludeRegexpStrategyRule; though more efficient,
# IgnoreSymbolTransforms are less flexible and don't exclude
# branches correctly. The argument is a Python-style regular
# expression that has to match the *whole* CVS symbol name:
#IgnoreSymbolTransform(r'nightly-build-tag-.*')
# RegexpSymbolTransforms transform symbols textually using a
# regular expression. The first argument is a Python regular
# expression pattern and the second is a replacement pattern.
# The pattern is matched against each symbol name. If it
# matches the whole symbol name, then the symbol name is
# replaced with the corresponding replacement text. The
# replacement can include substitution patterns (e.g., r'\1'
# or r'\g<name>'). Typically you will want to use raw strings
# (strings with a preceding 'r', like shown in the examples)
# for the regexp and its replacement to avoid backslash
# substitution within those strings.
#RegexpSymbolTransform(r'release-(\d+)_(\d+)',
# r'release-\1.\2'),
#RegexpSymbolTransform(r'release-(\d+)_(\d+)_(\d+)',
# r'release-\1.\2.\3'),
# Simple 1:1 character replacements can also be done. The
# following transform, which converts backslashes into forward
# slashes, should usually be included:
ReplaceSubstringsSymbolTransform('\\','/'),
# Eliminate leading, trailing, and repeated slashes. This
# transform should always be included:
NormalizePathsSymbolTransform(),
],
symbol_strategy_rules=3D[
# Additional, project-specific symbol strategy rules can
# be added here.
] + global_symbol_strategy_rules,
# Exclude paths from the conversion. Should be relative to
# repository path and use forward slashes:
#exclude_paths=3D['file-to-exclude.txt,v', 'dir/to/exclude'],
)
# Add a second project, to be stored to projA/trunk, projA/branches,
# and projA/tags:
#run_options.add_project(
# r'my/cvsrepo/projA',
# trunk_path=3D'projA/trunk',
# branches_path=3D'projA/branches',
# tags_path=3D'projA/tags',
# initial_directories=3D[
# ],
# symbol_transforms=3D[
# #RegexpSymbolTransform(r'release-(\d+)_(\d+)',
# # r'release-\1.\2'),
# #RegexpSymbolTransform(r'release-(\d+)_(\d+)_(\d+)',
# # r'release-\1.\2.\3'),
# ReplaceSubstringsSymbolTransform('\\','/'),
# NormalizePathsSymbolTransform(),
# ],
# symbol_strategy_rules=3D[
# # Additional, project-specific symbol strategy rules can
# # be added here.
# ] + global_symbol_strategy_rules,
# )
# Change this option to True to turn on profiling of cvs2svn (for
# debugging purposes):
run_options.profiling =3D False
# Should CVSItem -> Changeset database files be memory mapped? In
# some tests, using memory mapping speeded up the overall conversion
# by about 5%. But this option can cause the conversion to fail with
# an out of memory error if the conversion computer runs out of
# virtual address space (e.g., when running a very large conversion on
# a 32-bit operating system). Therefore it is disabled by default.
# Uncomment the following line to allow these database files to be
# memory mapped.
#changeset_database.use_mmap_for_cvs_item_to_changeset_table =3D True
------=_Part_1377_199222412.1366373129222--