CVS2GIT-migration completed at 02-Jun-2013: =========================================== Topics: - 1. Converted CVS-repository from SourceForge.net to Git-repository - 2. Set/Revoke read-only mode of CVS-repository - File 'dgs2git.opts' - File 'symbol-hints.txt' - File 'LOG-2013-05-26' Some rules and conventions defined for working with Git you can find in the DGS-rootdir 'README'-file and 'scripts/README.developers'. ################################################################################# # 1. Converted CVS-repository from SourceForge.net to Git-repository ################################################################################# Commands used to migrate CVS-repository from SourceForge.net to Git-repository on SourceForge with full history and all branches: # backup of full CVS-repository to local disc rsync -av dragongoserver.cvs.sourceforge.net::cvsroot/dragongoserver/* . # install cvs2git which is included in 'cvs2svn'-package apt-get install cvs2svn # prepare cvs2git-options-file and created some temp-folders: # (copied 'cvs2git-example.options' and modified for DGS-CVS into 'dgs2git.opts', see below) # convert CVS-repo into raw-data for Git-repo rm -i symbol-hints.txt symbol-info.txt conv-temp/*.* touch symbol-hints.txt cvs2git --options=dgs2git.opts -p 1:3 cp symbol-info.txt symbol-hints.txt # edit symbol-hints.txt (if needed to exclude certain branches/tags), see file below vi symbol-hints.txt # 2nd-pass of conversion cvs2git --options=dgs2git.opts -p 4:16 # create local "bare" Git-repository mkdir dgs-main cd dgs-main git init --bare # import converted raw-data into local Git-repo cat ../conv-temp/git-blob.dat ../cvs2git-tmp/git-dump.dat | git fast-import # view results gitk --all # [optional] get rid of unnecessary tag fixup branches ##contrib/git-move-refs.py # [optional] Re-compact the repository and discard any garbage ##git gc --prune=now # For this specific cvs2git-migration of dragongoserver, the following branches # and tags have been removed from the Git-repository by local modifications # of the bare Git-repository before uploading: # # branch 'Tournaments' (very old branch by ragnar) # branch 'rodival' (old branch from 2006 by rodival) # tag 'start' (old tag, unreferenced, unused) # push to server (repository need to be created first on remote server, # on SourceForge this is done by a project-admin) git remote add origin ssh://juga@git.code.sf.net/p/dragongoserver/dgs-main git push --mirror -v Log output concattenated from different tools can be found below, see 'LOG-2013-05-26'. ################################################################################# # 2. Set/Revoke read-only mode of CVS-repository ################################################################################# How-to set CVS-repository as read-only: # checkout CVSROOT of dragongoserver-project cvs -d juga@dragongoserver.cvs.sourceforge.net:/cvsroot/dragongoserver co CVSROOT cd CVSROOT # edit 'checkoutlist' adding four files (important to add LF on each line) # 'commit_prep' & 'cvs_acls' was copied from the CVS-distribution on /usr/share/cvs/contrib # and modified, because there were bugs with perl's taint-check, which I fixed # with the local checked in scripts (adding taint-checks). # see also SF-ticket: http://sourceforge.net/p/forge/site-support/4241/ commit_prep cvs_acls cvsacl restrict_msg # edit 'commitinfo' adding hookup-scripts for ACL-checking allowing to specify # read/write on each repository, which is more flexible than using a 'writers'-file. ALL $CVSROOT/CVSROOT/commit_prep ALL $CVSROOT/CVSROOT/cvs_acls -u $USER # added new file 'restrict_msg' with message to show on commits # added new file 'cvsacls' with ACL rules for 'cvs_acls'-script # (the 'allow'-rule allows to commit the changed files in CVSROOT to be able to revoke # the read-only mode) #--------- file 'cvsacls' --------------- # deny all commits # NOTE: denial message can be found in 'restrict_msg' which is read by the cvs_acls script in 'commitinfo' deny # allow commits to revoke ACL or change deny-message in CVSROOT by project-admins allow|juga, ejlo|CVSROOT/commitinfo CVSROOT/cvsacl CVSROOT/checkoutlist CVSROOT/commit_prep CVSROOT/cvs_acls CVSROOT/restrict_msg #--------- end of file 'cvsacls' -------- # add new files to CVS and commit changes with appropriate comment cvs add commit_prep cvs_acls cvsacl restrict_msg cvs commit . How-to set CVS-repository as read-write again: # checkout CVSROOT of dragongoserver-project cvs -d juga@dragongoserver.cvs.sourceforge.net:/cvsroot/dragongoserver co CVSROOT cd CVSROOT # edit 'commitinfo' commenting out the two hook-scripts, then commit the change # (this is only allowed for users 'ejlo' and 'juga' as configured in 'cvsacls'-file) ################################################################################# ##### File 'dgs2git.opts' ###### ################################################################################# # (Be in -*- mode: python; coding: utf-8 -*- mode.) # # ==================================================================== # 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/. # ==================================================================== # ##################### # ## PLEASE READ ME! ## # ##################### # # This is a template for an options file that can be used to configure # cvs2svn to convert to git rather than to Subversion. See # www/cvs2git.html and www/cvs2svn.html for general information, and # see the comments in this file for information about what options are # available and how they can be set. # # The program that is run to convert from CVS to git is called # cvs2git. Run it with the --options option, passing it this file # like this: # # cvs2git --options=cvs2git-example.options # # The output of cvs2git is a blob file and a dump file that can be # loaded into git using the "git fast-import" command. Please read # www/cvs2git.html for more information. # # 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: # # ctx.sort_executable = 'c:\\windows\\system32\\sort.exe' # ctx.sort_executable = r'c:\windows\system32\sort.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 GitRunOptions class (see # cvs2svn_lib/git_run_options.py), which holds some variables # governing how cvs2git is run # Import some modules that are used in setting the options: import re from cvs2svn_lib import config from cvs2svn_lib import changeset_database from cvs2svn_lib.common import CVSTextDecoder from cvs2svn_lib.log import Log from cvs2svn_lib.project import Project from cvs2svn_lib.git_revision_recorder import GitRevisionRecorder from cvs2svn_lib.git_output_option import GitRevisionMarkWriter from cvs2svn_lib.git_output_option import GitOutputOption from cvs2svn_lib.revision_manager import NullRevisionRecorder from cvs2svn_lib.revision_manager import NullRevisionExcluder from cvs2svn_lib.fulltext_revision_recorder \ import SimpleFulltextRevisionRecorderAdapter from cvs2svn_lib.rcs_revision_manager import RCSRevisionReader from cvs2svn_lib.cvs_revision_manager import CVSRevisionReader from cvs2svn_lib.checkout_internal import InternalRevisionRecorder from cvs2svn_lib.checkout_internal import InternalRevisionExcluder 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 KeywordsPropertySetter from cvs2svn_lib.property_setters import MimeMapper from cvs2svn_lib.property_setters import SVNBinaryFileKeywordsPropertySetter # To choose the level of logging output, uncomment one of the # following lines: #Log().log_level = Log.WARN #Log().log_level = Log.QUIET Log().log_level = Log.NORMAL #Log().log_level = Log.VERBOSE #Log().log_level = Log.DEBUG # During CollectRevsPass, cvs2git records the contents of file # revisions into a "blob" file in git-fast-import format. This option # configures that process: ctx.revision_recorder = SimpleFulltextRevisionRecorderAdapter( # The following option specifies how the revision contents of the RCS # files should be read. # # RCSRevisionReader uses RCS's "co" program to extract the revision # contents of the RCS files during CollectRevsPass. The constructor # argument specifies how to invoke the "co" executable. # # CVSRevisionReader uses the "cvs" program to extract the revision # contents out of the RCS files during OutputPass. This option is # considerably slower than RCSRevisionReader 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. # # Uncomment one of the two following lines: #RCSRevisionReader(co_executable=r'co'), CVSRevisionReader(cvs_executable=r'cvs'), # The file in which to write the git-fast-import stream that # contains the file revision contents: GitRevisionRecorder('conv-temp/git-blob.dat'), ) # cvs2git does not need to keep track of what revisions will be # excluded, so leave this option unchanged: ctx.revision_excluder = NullRevisionExcluder() # cvs2git doesn't need a revision reader because OutputPass only # refers to blobs that were output during CollectRevsPass, so leave # this option set to None. ctx.revision_reader = None # Set the name (and optionally the path) of some other executables # required by cvs2svn: ctx.sort_executable = r'sort' # 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 omitted from the conversion): ctx.trunk_only = False # How to convert CVS 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 (if it is # specified) is used in lossy 'replace' mode. Setting a fallback # encoder ensures that the encoder always succeeds, but it can cause # information loss. ctx.cvs_author_decoder = CVSTextDecoder( [ 'latin1', #'utf8', 'ascii', ], #fallback_encoding='ascii' ) ctx.cvs_log_decoder = CVSTextDecoder( [ 'latin1', #'utf8', 'ascii', ], #fallback_encoding='ascii' ) # You might want to be especially strict when converting filenames to # Unicode (e.g., maybe not specify a fallback_encoding). ctx.cvs_filename_decoder = CVSTextDecoder( [ #'latin1', #'utf8', 'ascii', ], #fallback_encoding='ascii' ) # Template for the commit message to be used for initial project # commits. ctx.initial_project_commit_message = ( 'Standard project directories initialized by cvs2git.' ) # 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 SVN revision number # of the revision that included the change to the vendor branch # (admittedly rather pointless in a cvs2git conversion). ctx.post_commit_message = ( 'This commit was generated by cvs2git to track changes on a CVS ' 'vendor branch.' ) # Template for the commit message to be used for commits in which # symbols are created. This message can use '%(symbol_type)d' to # include the type of the symbol ('branch' or 'tag') or # '%(symbol_name)' to include the name of the symbol. ctx.symbol_commit_message = ( "This commit was manufactured by cvs2git 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 = 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 = None ctx.symbol_info_filename = '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 = [ # 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 --symbol-hints command-line option. 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 bug 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: #### JUG !? 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 for which CVS doesn't # record the original author (for example, the creation of a branch). # This should be a simple (unix-style) username, but it can be # translated into a git-style name by the author_transforms map. ctx.username = 'juga' # ctx.svn_property_setters contains a list of 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). # # Obviously, SVN properties per se are not interesting for a cvs2git # conversion, but some of these properties have side-effects that do # affect the git output. FIXME: Document this in more detail. ctx.svn_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=True, # ), # To read mime types from a file, uncomment the following line and # specify a filename: #MimeMapper(r'/etc/mime.types'), # 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(), ]) # The directory to use for temporary files: ctx.tmpdir = r'cvs2git-tmp' # To skip the cleanup of temporary files, uncomment the following # option: #ctx.skip_cleanup = 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. # cvs2git only supports single-project conversions (multiple-project # conversions wouldn't really make sense for git anyway). So this # option must be set to False: ctx.cross_project_commits = False # git itself doesn't allow commits that affect more than one branch, # so this option must be set to False: ctx.cross_branch_commits = False # cvs2git does not yet handle translating .cvsignore files into # .gitignore files, so by default, the .cvsignore files are included # in the conversion output. If you would like to omit the .cvsignore # files from the output, set this option to False: ctx.keep_cvsignore = True # 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 written to a subdirectory called "Attic" in the # output repository: ctx.retain_conflicting_attic_files = False # CVS uses unix login names as author names whereas git requires # author names to be of the form "foo ". The default is to set # the git author to "cvsauthor ". author_transforms can be # used to map cvsauthor names (e.g., "jrandom") to a true name and # email address (e.g., "J. Random " for the # example shown). All values should be either Unicode strings (i.e., # with "u" as a prefix) or 8-bit strings in the utf-8 encoding. # Please substitute your own project's usernames here to use with the # author_transforms option of GitOutputOption below. author_transforms={ ####'jrandom' : ('J. Random', 'jrandom@example.com'), ####'mhagger' : ('Michael Haggerty', 'mhagger@alum.mit.edu'), ####'brane' : (u'Branko Čibej', 'brane@xbc.nu'), ####'ringstrom' : ('Tobias Ringström', 'tobias@ringstrom.mine.nu'), ####'dionisos' : (u'Erik Hülsmann', 'e.huelsmann@gmx.net'), 'ejlo' : ('Erik Ouchterlony', 'ejlo@users.sf.net'), 'juga' : ('Jens-Uwe Gaspar', 'juga@users.sf.net'), 'ragnar' : ('Ragnar Ouchterlony', 'ragnar@users.sf.net'), 'rodival' : ('Rod Ival', 'rodival@users.sf.net'), 'uxs' : ('Kris Van Hulle', 'uxs@users.sf.net'), # This one will be used for commits for which CVS doesn't record # the original author, as explained above. ####'cvs2svn' : ('cvs2svn', 'admin@example.com'), 'juga' : ('Jens-Uwe Gaspar', 'juga@users.sf.net'), } # This is the main option that causes cvs2svn to output to a # "fastimport"-format dumpfile rather than to Subversion: ctx.output_option = GitOutputOption( # The file in which to write the git-fast-import stream that # contains the changesets and branch/tag information: 'cvs2git-tmp/git-dump.dat', # The blobs will be written via the revision recorder, so in # OutputPass we only have to emit references to the blob marks: GitRevisionMarkWriter(), # This option can be set to an integer to limit the number of # revisions that are merged with the main parent in any commit. # For git output, this can be set to None (unlimited), though due # to the limitations of other tools you might want to set it to a # smaller number (e.g., 16). For Mercurial output, this should be # set to 1. max_merges=None, #max_merges=1, # Optional map from CVS author names to git author names: author_transforms=author_transforms, ) # Change this option to True to turn on profiling of cvs2svn (for # debugging purposes): run_options.profiling = 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 = True # Now set the project to be converted to git. cvs2git only supports # single-project conversions, so this method must only be called # once: run_options.set_project( # The filesystem path to the part of the CVS repository (*not* a # CVS working copy) that should be converted. This may be a # subdirectory (i.e., a module) within a larger CVS repository. ####r'test-data/main-cvsrepos', r'CVS-ORIG/DragonGoServer', # A list of symbol transformations that can be used to rename # symbols in this project. symbol_transforms=[ # 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'). 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('\\','/'), # This last rule eliminates leading, trailing, and repeated # slashes within the output symbol names: NormalizePathsSymbolTransform(), ], # See the definition of global_symbol_strategy_rules above for a # description of this option: symbol_strategy_rules=global_symbol_strategy_rules, ) ################################################################################# ##### File 'symbol-hints.txt' ###### ################################################################################# # Columns: project_id symbol_name conversion symbol_path preferred_parent_name 0 .trunk. trunk . . # 'Trunk' is a tag in 0 files, a branch in 678 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 678 files 0 DGS-stable-20120610 branch . .trunk. # 'DGS-stable-20120610' is a tag in 0 files, a branch in 461 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 54 files 0 start-branch-1_0_15 tag . .trunk. # 'start-branch-1_0_15' is a tag in 457 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 release-1_0_15-20120608 tag . DGS-stable-20120610 # 'release-1_0_15-20120608' is a tag in 460 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 pre-merge-1_0_14-20081228 tag . .trunk. # 'pre-merge-1_0_14-20081228' is a tag in 212 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 release-1_0_14-20081214 tag . DGS-stable-200712 # 'release-1_0_14-20081214' is a tag in 211 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 DGS-stable-200812 tag . DGS-stable-200712 # 'DGS-stable-200812' is a tag in 211 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 dev-start-20081116 tag . DGS-stable-200712 # 'dev-start-20081116' is a tag in 198 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 DGS-stable-200712 branch . .trunk. # 'DGS-stable-200712' is a tag in 0 files, a branch in 216 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 81 files 0 jug tag . .trunk. # 'jug' is a tag in 476 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 DGS-stable-200608 branch . .trunk. # 'DGS-stable-200608' is a tag in 0 files, a branch in 156 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 7 files 0 start tag rodival-start rodival # 'start' is a tag in 206 files, a branch in 0 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 0 files 0 rodival branch . .trunk. # 'rodival' is a tag in 0 files, a branch in 206 files, a trivial import in 59 files, a pure import in 59 files, and has commits in 206 files 0 Tournaments branch ragnar/old-tournaments .trunk. # 'Tournaments' is a tag in 0 files, a branch in 85 files, a trivial import in 0 files, a pure import in 0 files, and has commits in 69 files ################################################################################# ##### File 'LOG-2013-05-26' ###### ################################################################################# # cvs2git conversion of DragonGoServer at [26-May-2013] Time for pass1 (CollectRevsPass): 250.0 seconds. ----- pass 2 (CleanMetadataPass) ----- Converting metadata to UTF8... Done Time for pass2 (CleanMetadataPass): 0.293 seconds. ----- pass 3 (CollateSymbolsPass) ----- Checking for forced tags with commits... Done Time for pass3 (CollateSymbolsPass): 0.008 seconds. cvs2svn Statistics: ------------------ Total CVS Files: 680 Total CVS Revisions: 17965 Total CVS Branches: 1035 Total CVS Tags: 2431 Total Unique Tags: 8 Total Unique Branches: 5 CVS Repos Size in KB: 26080 First Revision Date: Tue Jun 26 09:42:02 2001 Last Revision Date: Sun May 26 16:03:09 2013 ------------------ (These are unaltered CVS repository stats and do not reflect tags or branches excluded via --exclude) Timings (seconds): ------------------ 250.0 pass1 CollectRevsPass 0.3 pass2 CleanMetadataPass 0.0 pass3 CollateSymbolsPass 250.3 total ########## ########## ########## ########## ########## ########## ######### ----- pass 4 (FilterSymbolsPass) ----- Filtering out excluded symbols and summarizing items... Done Time for pass4 (FilterSymbolsPass): 0.957 seconds. ----- pass 5 (SortRevisionSummaryPass) ----- Sorting CVS revision summaries... Done Time for pass5 (SortRevisionSummaryPass): 0.048 seconds. ----- pass 6 (SortSymbolSummaryPass) ----- Sorting CVS symbol summaries... Done Time for pass6 (SortSymbolSummaryPass): 0.028 seconds. ----- pass 7 (InitializeChangesetsPass) ----- Creating preliminary commit sets... Done Time for pass7 (InitializeChangesetsPass): 1.154 seconds. ----- pass 8 (BreakRevisionChangesetCyclesPass) ----- Breaking revision changeset dependency cycles... Done Time for pass8 (BreakRevisionChangesetCyclesPass): 1.649 seconds. ----- pass 9 (RevisionTopologicalSortPass) ----- Generating CVSRevisions in commit order... Done Time for pass9 (RevisionTopologicalSortPass): 1.690 seconds. ----- pass 10 (BreakSymbolChangesetCyclesPass) ----- Breaking symbol changeset dependency cycles... Done Time for pass10 (BreakSymbolChangesetCyclesPass): 0.364 seconds. ----- pass 11 (BreakAllChangesetCyclesPass) ----- Breaking CVSSymbol dependency loops... Done Time for pass11 (BreakAllChangesetCyclesPass): 1.053 seconds. ----- pass 12 (TopologicalSortPass) ----- Generating CVSRevisions in commit order... Done Time for pass12 (TopologicalSortPass): 0.881 seconds. ----- pass 13 (CreateRevsPass) ----- Mapping CVS revisions to Subversion commits... Creating Subversion r1 (Project initialization) Creating Subversion r2 (commit) Creating Subversion r3 (commit) [...] Creating Subversion r550 (copying to branch 'Tournaments') [...] Creating Subversion r1601 (copying to branch 'rodival') [...] Creating Subversion r1665 (post-commit default branch(es)) Creating Subversion r1666 (copying to tag 'start') [...] Creating Subversion r1859 (copying to branch 'DGS-stable-200608') [...] Creating Subversion r2715 (copying to branch 'DGS-stable-200712') [...] Creating Subversion r2758 (copying to tag 'dev-start-20081116') [...] Creating Subversion r3210 (copying to tag 'DGS-stable-200812') Creating Subversion r3211 (copying to tag 'release-1_0_14-20081214') [...] Creating Subversion r3222 (copying to tag 'pre-merge-1_0_14-20081228') [...] Creating Subversion r6895 (copying to tag 'start-branch-1_0_15') Creating Subversion r6896 (copying to branch 'DGS-stable-20120610') [...] Creating Subversion r7130 (copying to tag 'jug') [...] Creating Subversion r7142 (copying to tag 'release-1_0_15-20120608') Creating Subversion r7143 (commit) Creating Subversion r7144 (commit) Creating Subversion r7145 (commit) Creating Subversion r7146 (commit) Done Time for pass13 (CreateRevsPass): 2.222 seconds. ----- pass 14 (SortSymbolsPass) ----- Sorting symbolic name source revisions... Done Time for pass14 (SortSymbolsPass): 0.026 seconds. ----- pass 15 (IndexSymbolsPass) ----- Determining offsets for all symbolic names... Done. Time for pass15 (IndexSymbolsPass): 0.018 seconds. ----- pass 16 (OutputPass) ----- Time for pass16 (OutputPass): 1.725 seconds. cvs2svn Statistics: ------------------ Total CVS Files: 680 Total CVS Revisions: 17965 Total CVS Branches: 1035 Total CVS Tags: 2431 Total Unique Tags: 8 Total Unique Branches: 5 CVS Repos Size in KB: 26080 Total SVN Commits: 7146 First Revision Date: Tue Jun 26 09:42:02 2001 Last Revision Date: Sun May 26 16:03:09 2013 ------------------ Timings (seconds): ------------------ 250.0 pass1 CollectRevsPass 0.3 pass2 CleanMetadataPass 0.0 pass3 CollateSymbolsPass 1.0 pass4 FilterSymbolsPass 0.0 pass5 SortRevisionSummaryPass 0.0 pass6 SortSymbolSummaryPass 1.2 pass7 InitializeChangesetsPass 1.6 pass8 BreakRevisionChangesetCyclesPass 1.7 pass9 RevisionTopologicalSortPass 0.4 pass10 BreakSymbolChangesetCyclesPass 1.1 pass11 BreakAllChangesetCyclesPass 0.9 pass12 TopologicalSortPass 2.2 pass13 CreateRevsPass 0.0 pass14 SortSymbolsPass 0.0 pass15 IndexSymbolsPass 1.7 pass16 OutputPass 262.1 total ########## ########## ########## ########## ########## ########## ######### git-fast-import statistics: --------------------------------------------------------------------- Alloc'd objects: 40000 Total objects: 39562 ( 707 duplicates ) blobs : 17129 ( 564 duplicates 15486 deltas of 15615 attempts) trees : 15295 ( 143 duplicates 13814 deltas of 13957 attempts) commits: 7138 ( 0 duplicates 0 deltas of 0 attempts) tags : 0 ( 0 duplicates 0 deltas of 0 attempts) Total branches: 15 ( 7 loads ) marks: 1073741824 ( 24831 unique ) atoms: 610 Memory total: 4048 KiB pools: 2173 KiB objects: 1875 KiB --------------------------------------------------------------------- pack_report: getpagesize() = 4096 pack_report: core.packedGitWindowSize = 1073741824 pack_report: core.packedGitLimit = 8589934592 pack_report: pack_used_ctr = 22 pack_report: pack_mmap_calls = 8 pack_report: pack_open_windows = 1 / 1 pack_report: pack_mapped = 23539086 / 23539086 ########## ########## ########## ########## ########## ########## ######### Pushing to ssh://juga@git.code.sf.net/p/dragongoserver/dgs.git X11 forwarding request failed on channel 0 Counting objects: 39562, done. Delta compression using up to 4 threads. Compressing objects: 100% (10207/10207), done. Writing objects: 100% (39562/39562), 22.44 MiB | 51 KiB/s, done. Total 39562 (delta 29300), reused 39562 (delta 29300) remote: refresh queued. To ssh://juga@git.code.sf.net/p/dragongoserver/dgs.git * [new branch] DGS-stable-200608 -> DGS-stable-200608 * [new branch] DGS-stable-200712 -> DGS-stable-200712 * [new branch] DGS-stable-20120610 -> DGS-stable-20120610 * [new branch] Tournaments -> Tournaments * [new branch] master -> master * [new branch] rodival -> rodival * [new tag] DGS-stable-200812 -> DGS-stable-200812 * [new tag] dev-start-20081116 -> dev-start-20081116 * [new tag] jug -> jug * [new tag] pre-merge-1_0_14-20081228 -> pre-merge-1_0_14-20081228 * [new tag] release-1_0_14-20081214 -> release-1_0_14-20081214 * [new tag] release-1_0_15-20120608 -> release-1_0_15-20120608 * [new tag] start -> start * [new tag] start-branch-1_0_15 -> start-branch-1_0_15 updating local tracking ref 'refs/remotes/origin/DGS-stable-200608' updating local tracking ref 'refs/remotes/origin/DGS-stable-200712' updating local tracking ref 'refs/remotes/origin/DGS-stable-20120610' updating local tracking ref 'refs/remotes/origin/Tournaments' updating local tracking ref 'refs/remotes/origin/master' updating local tracking ref 'refs/remotes/origin/rodival'