6 git-cvsimport - Salvage your data out of another SCM people love to hate
 
  12 'git cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]
 
  13               [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
 
  14               [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
 
  15               [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
 
  16               [-r <remote>] [-R] [<CVS_module>]
 
  21 *WARNING:* `git cvsimport` uses cvsps version 2, which is considered
 
  22 deprecated; it does not work with cvsps version 3 and later.  If you are
 
  23 performing a one-shot import of a CVS repository consider using
 
  24 http://cvs2svn.tigris.org/cvs2git.html[cvs2git] or
 
  25 http://www.catb.org/esr/cvs-fast-export/[cvs-fast-export].
 
  27 Imports a CVS repository into Git. It will either create a new
 
  28 repository, or incrementally import into an existing one.
 
  30 Splitting the CVS log into patch sets is done by 'cvsps'.
 
  31 At least version 2.1 is required.
 
  33 *WARNING:* for certain situations the import leads to incorrect results.
 
  34 Please see the section <<issues,ISSUES>> for further reference.
 
  36 You should *never* do any work of your own on the branches that are
 
  37 created by 'git cvsimport'.  By default initial import will create and populate a
 
  38 "master" branch from the CVS repository's main branch which you're free
 
  39 to work with; after that, you need to 'git merge' incremental imports, or
 
  40 any CVS branches, yourself.  It is advisable to specify a named remote via
 
  41 -r to separate and protect the incoming branches.
 
  43 If you intend to set up a shared public repository that all developers can
 
  44 read/write, or if you want to use linkgit:git-cvsserver[1], then you
 
  45 probably want to make a bare clone of the imported repository,
 
  46 and use the clone as the shared repository.
 
  47 See linkgit:gitcvs-migration[7].
 
  53         Verbosity: let 'cvsimport' report what it is doing.
 
  56         The root of the CVS archive. May be local (a simple path) or remote;
 
  57         currently, only the :local:, :ext: and :pserver: access methods
 
  58         are supported. If not given, 'git cvsimport' will try to read it
 
  59         from `CVS/Root`. If no such file exists, it checks for the
 
  60         `CVSROOT` environment variable.
 
  63         The CVS module you want to import. Relative to <CVSROOT>.
 
  64         If not given, 'git cvsimport' tries to read it from
 
  68         The Git repository to import to.  If the directory doesn't
 
  69         exist, it will be created.  Default is the current directory.
 
  72         The Git remote to import this CVS repository into.
 
  73         Moves all CVS branches into remotes/<remote>/<branch>
 
  74         akin to the way 'git clone' uses 'origin' by default.
 
  76 -o <branch-for-HEAD>::
 
  77         When no remote is specified (via -r) the `HEAD` branch
 
  78         from CVS is imported to the 'origin' branch within the Git
 
  79         repository, as `HEAD` already has a special meaning for Git.
 
  80         When a remote is specified the `HEAD` branch is named
 
  81         remotes/<remote>/master mirroring 'git clone' behaviour.
 
  82         Use this option if you want to import into a different
 
  85 Use '-o master' for continuing an import that was initially done by
 
  89         Import-only: don't perform a checkout after importing.  This option
 
  90         ensures the working directory and index remain untouched and will
 
  91         not create them if they do not exist.
 
  94         Kill keywords: will extract files with '-kk' from the CVS archive
 
  95         to avoid noisy changesets. Highly recommended, but off by default
 
  96         to preserve compatibility with early imported trees.
 
  99         Convert underscores in tag and branch names to dots.
 
 102         Substitute the character "/" in branch names with <subst>
 
 104 -p <options-for-cvsps>::
 
 105         Additional options for cvsps.
 
 106         The options `-u` and '-A' are implicit and should not be used here.
 
 108 If you need to pass multiple options, separate them with a comma.
 
 111         Pass the timestamp fuzz factor to cvsps, in seconds. If unset,
 
 112         cvsps defaults to 300s.
 
 114 -P <cvsps-output-file>::
 
 115         Instead of calling cvsps, read the provided cvsps output file. Useful
 
 116         for debugging or when cvsps is being handled outside cvsimport.
 
 119         Attempt to detect merges based on the commit message. This option
 
 120         will enable default regexes that try to capture the source
 
 121         branch name from the commit message.
 
 124         Attempt to detect merges based on the commit message with a custom
 
 125         regex. It can be used with `-m` to enable the default regexes
 
 126         as well. You must escape forward slashes.
 
 128 The regex must capture the source branch name in $1.
 
 130 This option can be used several times to provide several detection regexes.
 
 133         Skip paths matching the regex.
 
 136         Import all commits, including recent ones. cvsimport by default
 
 137         skips commits that have a timestamp less than 10 minutes ago.
 
 140         Limit the number of commits imported. Workaround for cases where
 
 141         cvsimport leaks memory.
 
 143 -A <author-conv-file>::
 
 144         CVS by default uses the Unix username when writing its
 
 145         commit logs. Using this option and an author-conv-file
 
 146         maps the name recorded in CVS to author name, e-mail and
 
 150         exon=Andreas Ericsson <ae@op5.se>
 
 151         spawn=Simon Pawn <spawn@frog-pond.org> America/Chicago
 
 155 'git cvsimport' will make it appear as those authors had
 
 156 their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
 
 157 all along.  If a time zone is specified, GIT_AUTHOR_DATE will
 
 158 have the corresponding offset applied.
 
 160 For convenience, this data is saved to `$GIT_DIR/cvs-authors`
 
 161 each time the '-A' option is provided and read from that same
 
 162 file each time 'git cvsimport' is run.
 
 164 It is not recommended to use this feature if you intend to
 
 165 export changes back to CVS again later with
 
 166 'git cvsexportcommit'.
 
 169         Generate a `$GIT_DIR/cvs-revisions` file containing a mapping from CVS
 
 170         revision numbers to newly-created Git commit IDs.  The generated file
 
 171         will contain one line for each (filename, revision) pair imported;
 
 172         each line will look like
 
 175 src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
 
 178 The revision data is appended to the file if it already exists, for use when
 
 179 doing incremental imports.
 
 181 This option may be useful if you have CVS revision numbers stored in commit
 
 182 messages, bug-tracking systems, email archives, and the like.
 
 185         Print a short usage message and exit.
 
 189 If `-v` is specified, the script reports what it is doing.
 
 191 Otherwise, success is indicated the Unix way, i.e. by simply exiting with
 
 197 Problems related to timestamps:
 
 199  * If timestamps of commits in the CVS repository are not stable enough
 
 200    to be used for ordering commits changes may show up in the wrong
 
 202  * If any files were ever "cvs import"ed more than once (e.g., import of
 
 203    more than one vendor release) the HEAD contains the wrong content.
 
 204  * If the timestamp order of different files cross the revision order
 
 205    within the commit matching time window the order of commits may be
 
 208 Problems related to branches:
 
 210  * Branches on which no commits have been made are not imported.
 
 211  * All files from the branching point are added to a branch even if
 
 213  * This applies to files added to the source branch *after* a daughter
 
 214    branch was created: if previously no commit was made on the daughter
 
 215    branch they will erroneously be added to the daughter branch in git.
 
 217 Problems related to tags:
 
 219 * Multiple tags on the same revision are not imported.
 
 221 If you suspect that any of these issues may apply to the repository you
 
 222 want to import, consider using cvs2git:
 
 224 * cvs2git (part of cvs2svn), `http://subversion.apache.org/`
 
 228 Part of the linkgit:git[1] suite