Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
CVS2GIT(1)			 User Commands			    CVS2GIT(1)

       cvs2git - convert a cvs repository into a git repository

       cvs2git [OPTION]... --options=PATH

       Create  a  new  git repository based on the version history stored in a
       CVS repository. Each CVS	commit will be mirrored	in the git repository,
       including such information as date of commit and	id of the committer.

       The output of this program are a	"blobfile" and a "dumpfile", which to-
       gether can be loaded into a git repository using	"git fast-import".

       CVS-REPOS-PATH is the filesystem	path of	the part of the	CVS repository
       that  you  want to convert.  This path doesn't have to be the top level
       directory of a CVS repository; it can  point  at	 a  project  within  a
       repository,  in	which  case only that project will be converted.  This
       path or one of its parent directories has  to  contain  a  subdirectory
       called CVSROOT (though the CVSROOT directory can	be empty).

       It  is  not  possible directly to convert a CVS repository to which you
       only have remote	access,	but the	FAQ describes tools that may  be  used
       to create a local copy of a remote CVS repository.

	      Read  the	 conversion options from path instead of from the com-
	      mand line. This option allows far	 more  conversion  flexibility
	      than can be achieved using the command-line alone. See the docu-
	      mentation	for more information. Only the following  command-line
	      options  are  allowed  in	combination with --options: -h/--help,
	      --help-passes,	 --version,	-v/--verbose,	   -q/--quiet,
	      -p/--pass/--passes, --dry-run, --profile,	--trunk-only, --encod-
	      ing, and --fallback-encoding. Options are	processed in the order
	      specified	on the command line.

	      Write the	"blob" data (containing	revision contents) to path.

	      Write the	revision data (branches	and commits) to	path.

	      Do not create any	output;	just print what	would happen.

	      Convert only trunk commits, not tags nor branches.

	      Use  encoding  as	 the encoding for filenames, log messages, and
	      author names in the CVS repos. This option may be	specified mul-
	      tiple  times, in which case the encodings	are tried in order un-
	      til      one	succeeds.      Default:	      ascii.	   See for a list of
	      other standard encodings.

	      If none of the encodings specified with  --encoding  succeed  in
	      decoding	an author name or log message, then fall back to using
	      encoding in lossy	'replace' mode.	Use of this option  may	 cause
	      information to be	lost, but at least it allows the conversion to
	      run to completion. This option only affects the encoding of  log
	      messages	and  author  names;  there is no fallback encoding for
	      filenames. (By using an --options	file, it is possible to	 spec-
	      ify a fallback encoding for filenames.) Default: disabled.

	      If  a file appears both inside and outside of the	CVS attic, re-
	      tain the attic version in	a subdirectory called  'Attic'.	 (Nor-
	      mally this situation is treated as a fatal error.)

	      Transform	 RCS/CVS  symbol  names	 before	entering them into the
	      output history. pattern is  a  Python  regexp  pattern  that  is
	      matches  against	the  entire  symbol name; replacement is a re-
	      placement	using Python's regexp reference	syntax.	You may	 spec-
	      ify any number of	these options; they will be applied in the or-
	      der given	on the command line.

	      Read symbol conversion hints from	path. The format  of  path  is
	      the  same	 as the	format output by --write-symbol-info, namely a
	      text file	with four  whitespace-separated	 columns:  project-id,
	      symbol,  conversion, and parent-lod-name.	 project-id is the nu-
	      merical ID of the	project	to which the symbol belongs,  counting
	      from  0.	project-id can be set to '.' if	project-specificity is
	      not needed. symbol-name is the name of the symbol	 being	speci-
	      fied.  conversion	 specifies how the symbol should be converted,
	      and can be one of	the values 'branch', 'tag', or	'exclude'.  If
	      conversion is '.', then this rule	does not affect	how the	symbol
	      is converted. parent-lod-name is the name	 of  the  symbol  from
	      which  this  symbol  should  sprout,  or '.trunk.' if the	symbol
	      should sprout from trunk.	If parent-lod-name is omitted or  '.',
	      then this	rule does not affect the preferred parent of this sym-
	      bol. The file may	contain	blank lines or	comment	 lines	(lines
	      whose first non-whitespace character is '#').

	      Specify  how  to convert ambiguous symbols (those	that appear in
	      the CVS archive as both branches and tags). opt must be 'heuris-
	      tic' (decide how to treat	each ambiguous symbol based on whether
	      it was used more often as	a branch/tag in	CVS), 'strict' (no de-
	      fault;  every ambiguous symbol has to be resolved	manually using
	      --force-branch, --force-tag, or --exclude), 'branch' (treat  ev-
	      ery  ambiguous symbol as a branch), 'tag'	(treat every ambiguous
	      symbol as	a tag),	or 'exclude' (do not  convert  ambiguous  sym-
	      bols). The default is 'heuristic'.

	      Force  symbols  whose names match	regexp to be branches.	regexp
	      must match the whole symbol name.

	      Force symbols whose names	match regexp to	be tags.  regexp  must
	      match the	whole symbol name.

	      Exclude branches and tags	whose names match regexp from the con-
	      version. regexp must match the whole symbol name.

	      Do not exclude branches that were	only used for a	single import.
	      (By  default such	branches are excluded because they are usually
	      created by the inappropriate use of cvs import.)

	      Set the default username to name when this program needs to gen-
	      erate  a commit for which	CVS does not record the	original user-
	      name.  This happens when a branch	or tag	is  created.  Default:

	      Specify  a file in the format of Subversion's config file, whose
	      [auto-props] section can be used to set arbitrary	properties  on
	      files  in	 the  Subversion  repository based on their filenames.
	      (The [auto-props]	section	header must be present;	other sections
	      of the config file, including the	enable-auto-props setting, are
	      ignored.)	 Filenames are matched to the filename patterns	 case-

	      Specify  an  apache-style	 mime.types file for setting svn:mime-

	      For files	that don't have	the kb expansion mode but have a known
	      mime  type,  set	the eol-style based on the mime	type. For such
	      files, set svn:eol-style to "native" if  the  mime  type	begins
	      with "text/", and	leave it unset (i.e., no EOL translation) oth-
	      erwise. Files with unknown mime types are	not affected  by  this
	      option. This option has no effect	unless the --mime-types	option
	      is also specified.

	      Set svn:eol-style	to style for files that	 don't	have  the  CVS
	      'kb'  expansion  mode  and  whose	 end-of-line  translation mode
	      hasn't been determined by	one of the other options.  style  must
	      be 'binary' (default), 'native', 'CRLF', 'LF', or	'CR'.

	      By default, cvs2svn sets svn:keywords on CVS files to "author id
	      date" if the mode	of the RCS file	in question is either kv,  kvl
	      or unset.	If you use the --keywords-off switch, cvs2svn will not
	      set svn:keywords for any file. While this	 will  not  touch  the
	      keywords	in the contents	of your	files, Subversion will not ex-
	      pand them.

	      Include .cvsignore files in the output. (Normally	they  are  un-
	      needed because cvs2svn sets the corresponding svn:ignore proper-

	      Record CVS revision numbers as file properties in	the Subversion
	      repository. (Note	that unless it is removed explicitly, the last
	      CVS revision number will remain associated with  the  file  even
	      after the	file is	changed	within Subversion.)

	      Use CVS to extract revision contents. This option	is slower than
	      --use-internal-co	or --use-rcs.

	      Use RCS 'co' to extract revision contents. This option is	faster
	      than --use-cvs but fails in some cases.

	      Use an external Python program to	extract	the file revision con-
	      tents from the RCS files and output them to the  blobfile.  This
	      option  is  much	faster	than --use-rcs or --use-cvs but	leaves
	      keywords unexpanded and requires a separate, seekable blob  file
	      to write to in parallel to the main cvs2git script.

	      Set the path to use for temporary	data. The default is to	create
	      a	temporary subdirectory under /tmp.

	      Path to the co program. (co is needed if the --use-rcs option is

	      Path  to the cvs program.	(cvs is	needed if the --use-cvs	option
	      is used.)

	      Execute only pass	pass of	the conversion.	pass can be  specified
	      by name or by number (see	--help-passes).

       -p [start]:[end], --passes=[start]:[end]
	      Execute  passes start through end	of the conversion (inclusive).
	      start and	end can	be specified by	name or	by number (see --help-
	      passes). If start	or end is missing, it defaults to the first or
	      last pass, respectively. For this	to  work  the  earlier	passes
	      must  have been completed	before on the same CVS repository, and
	      the generated data files must be in the temporary	directory (see

	      Print the	version	number.

       -h, --help
	      Print the	usage message and exit with success.

	      Print  the  numbers  and names of	the conversion passes and exit
	      with success.

       --man  Output the unix-style manpage for	this program to	standard  out-

       -v, --verbose
	      Print  more information while running. This option may be	speci-
	      fied twice to output voluminous debugging	information.

       -q, --quiet
	      Print less information while running. This option	may be	speci-
	      fied twice to suppress all non-error output.

	      Write  to	 path symbol statistics	and information	about how sym-
	      bols were	converted during CollateSymbolsPass.

	      Prevent the deletion of temporary	files.

	      Profile with 'cProfile' (into file cvs2svn.cProfile).

       A directory under /tmp (or the directory	specified by --tmpdir) is used
       as scratch space	for temporary data files.

       Main authors are:
       C. Michael Pilato <>
       Greg Stein <>
       Branko Aibej <>
       Blair Zajac <>
       Max Bowsher <>
       Brian Fitzpatrick <>
       Tobias RingstrA<paragraph>m <>
       Karl Fogel <>
       Erik HA1/4lsmann	<>
       David Summers <>
       Michael Haggerty	<>

       Manpage	was  written  for  the Debian GNU/Linux	system by Laszlo 'GCS'
       Boszormenyi <>	(but may be used by others).

       cvs(1), git(1), git-fast-import(1)

Version	2.4.0			 Jul 02, 2017			    CVS2GIT(1)


Want to link to this manual page? Use this URL:

home | help