<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="generator" content="AsciiDoc 8.4.5" /> <title>git-cvsimport(1)</title> <style type="text/css"> /* Debug borders */ p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { /* border: 1px solid red; */ } body { margin: 1em 5% 1em 5%; } a { color: blue; text-decoration: underline; } a:visited { color: fuchsia; } em { font-style: italic; color: navy; } strong { font-weight: bold; color: #083194; } tt { color: navy; } h1, h2, h3, h4, h5, h6 { color: #527bbd; font-family: sans-serif; margin-top: 1.2em; margin-bottom: 0.5em; line-height: 1.3; } h1, h2, h3 { border-bottom: 2px solid silver; } h2 { padding-top: 0.5em; } h3 { float: left; } h3 + * { clear: left; } div.sectionbody { font-family: serif; margin-left: 0; } hr { border: 1px solid silver; } p { margin-top: 0.5em; margin-bottom: 0.5em; } ul, ol, li > p { margin-top: 0; } pre { padding: 0; margin: 0; } span#author { color: #527bbd; font-family: sans-serif; font-weight: bold; font-size: 1.1em; } span#email { } span#revnumber, span#revdate, span#revremark { font-family: sans-serif; } div#footer { font-family: sans-serif; font-size: small; border-top: 2px solid silver; padding-top: 0.5em; margin-top: 4.0em; } div#footer-text { float: left; padding-bottom: 0.5em; } div#footer-badges { float: right; padding-bottom: 0.5em; } div#preamble { margin-top: 1.5em; margin-bottom: 1.5em; } div.tableblock, div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { margin-top: 1.5em; margin-bottom: 1.5em; } div.admonitionblock { margin-top: 2.5em; margin-bottom: 2.5em; } div.content { /* Block element content. */ padding: 0; } /* Block element titles. */ div.title, caption.title { color: #527bbd; font-family: sans-serif; font-weight: bold; text-align: left; margin-top: 1.0em; margin-bottom: 0.5em; } div.title + * { margin-top: 0; } td div.title:first-child { margin-top: 0.0em; } div.content div.title:first-child { margin-top: 0.0em; } div.content + div.title { margin-top: 0.0em; } div.sidebarblock > div.content { background: #ffffee; border: 1px solid silver; padding: 0.5em; } div.listingblock > div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } div.quoteblock { padding-left: 2.0em; margin-right: 10%; } div.quoteblock > div.attribution { padding-top: 0.5em; text-align: right; } div.verseblock { padding-left: 2.0em; margin-right: 10%; } div.verseblock > div.content { white-space: pre; } div.verseblock > div.attribution { padding-top: 0.75em; text-align: left; } /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } div.admonitionblock .icon { vertical-align: top; font-size: 1.1em; font-weight: bold; text-decoration: underline; color: #527bbd; padding-right: 0.5em; } div.admonitionblock td.content { padding-left: 0.5em; border-left: 2px solid silver; } div.exampleblock > div.content { border-left: 2px solid silver; padding: 0.5em; } div.imageblock div.content { padding-left: 0; } span.image img { border-style: none; } a.image:visited { color: white; } dl { margin-top: 0.8em; margin-bottom: 0.8em; } dt { margin-top: 0.5em; margin-bottom: 0; font-style: normal; color: navy; } dd > *:first-child { margin-top: 0.1em; } ul, ol { list-style-position: outside; } ol.arabic { list-style-type: decimal; } ol.loweralpha { list-style-type: lower-alpha; } ol.upperalpha { list-style-type: upper-alpha; } ol.lowerroman { list-style-type: lower-roman; } ol.upperroman { list-style-type: upper-roman; } div.compact ul, div.compact ol, div.compact p, div.compact p, div.compact div, div.compact div { margin-top: 0.1em; margin-bottom: 0.1em; } div.tableblock > table { border: 3px solid #527bbd; } thead { font-family: sans-serif; font-weight: bold; } tfoot { font-weight: bold; } td > div.verse { white-space: pre; } p.table { margin-top: 0; } /* Because the table frame attribute is overriden by CSS in most browsers. */ div.tableblock > table[frame="void"] { border-style: none; } div.tableblock > table[frame="hsides"] { border-left-style: none; border-right-style: none; } div.tableblock > table[frame="vsides"] { border-top-style: none; border-bottom-style: none; } div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } div.hdlist tr { padding-bottom: 15px; } dt.hdlist1.strong, td.hdlist1.strong { font-weight: bold; } td.hdlist1 { vertical-align: top; font-style: normal; padding-right: 0.8em; color: navy; } td.hdlist2 { vertical-align: top; } div.hdlist.compact tr { margin: 0; padding-bottom: 0; } .comment { background: yellow; } @media print { div#footer-badges { display: none; } } div#toctitle { color: #527bbd; font-family: sans-serif; font-size: 1.1em; font-weight: bold; margin-top: 1.0em; margin-bottom: 0.1em; } div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } div.toclevel2 { margin-left: 2em; font-size: 0.9em; } div.toclevel3 { margin-left: 4em; font-size: 0.9em; } div.toclevel4 { margin-left: 6em; font-size: 0.9em; } /* Overrides for manpage documents */ h1 { padding-top: 0.5em; padding-bottom: 0.5em; border-top: 2px solid silver; border-bottom: 2px solid silver; } h2 { border-style: none; } div.sectionbody { margin-left: 5%; } @media print { div#toc { display: none; } } /* Workarounds for IE6's broken and incomplete CSS2. */ div.sidebar-content { background: #ffffee; border: 1px solid silver; padding: 0.5em; } div.sidebar-title, div.image-title { color: #527bbd; font-family: sans-serif; font-weight: bold; margin-top: 0.0em; margin-bottom: 0.5em; } div.listingblock div.content { border: 1px solid silver; background: #f4f4f4; padding: 0.5em; } div.quoteblock-attribution { padding-top: 0.5em; text-align: right; } div.verseblock-content { white-space: pre; } div.verseblock-attribution { padding-top: 0.75em; text-align: left; } div.exampleblock-content { border-left: 2px solid silver; padding-left: 0.5em; } /* IE6 sets dynamically generated links as visited. */ div#toc a:visited { color: blue; } </style> </head> <body> <div id="header"> <h1> git-cvsimport(1) Manual Page </h1> <h2>NAME</h2> <div class="sectionbody"> <p>git-cvsimport - Salvage your data out of another SCM people love to hate </p> </div> </div> <h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> <div class="verseblock-content"><em>git cvsimport</em> [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>] [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>] [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>] [-r <remote>] [-R] [<CVS_module>]</div> <div class="verseblock-attribution"> </div></div> </div> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> <div class="paragraph"><p>Imports a CVS repository into git. It will either create a new repository, or incrementally import into an existing one.</p></div> <div class="paragraph"><p>Splitting the CVS log into patch sets is done by <em>cvsps</em>. At least version 2.1 is required.</p></div> <div class="paragraph"><p><strong>WARNING:</strong> for certain situations the import leads to incorrect results. Please see the section <a href="#issues">ISSUES</a> for further reference.</p></div> <div class="paragraph"><p>You should <strong>never</strong> do any work of your own on the branches that are created by <em>git cvsimport</em>. By default initial import will create and populate a "master" branch from the CVS repository’s main branch which you’re free to work with; after that, you need to <em>git merge</em> incremental imports, or any CVS branches, yourself. It is advisable to specify a named remote via -r to separate and protect the incoming branches.</p></div> <div class="paragraph"><p>If you intend to set up a shared public repository that all developers can read/write, or if you want to use <a href="git-cvsserver.html">git-cvsserver(1)</a>, then you probably want to make a bare clone of the imported repository, and use the clone as the shared repository. See <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div> </div> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> <div class="dlist"><dl> <dt class="hdlist1"> -v </dt> <dd> <p> Verbosity: let <em>cvsimport</em> report what it is doing. </p> </dd> <dt class="hdlist1"> -d <CVSROOT> </dt> <dd> <p> The root of the CVS archive. May be local (a simple path) or remote; currently, only the :local:, :ext: and :pserver: access methods are supported. If not given, <em>git cvsimport</em> will try to read it from <tt>CVS/Root</tt>. If no such file exists, it checks for the <tt>CVSROOT</tt> environment variable. </p> </dd> <dt class="hdlist1"> <CVS_module> </dt> <dd> <p> The CVS module you want to import. Relative to <CVSROOT>. If not given, <em>git cvsimport</em> tries to read it from <tt>CVS/Repository</tt>. </p> </dd> <dt class="hdlist1"> -C <target-dir> </dt> <dd> <p> The git repository to import to. If the directory doesn’t exist, it will be created. Default is the current directory. </p> </dd> <dt class="hdlist1"> -r <remote> </dt> <dd> <p> The git remote to import this CVS repository into. Moves all CVS branches into remotes/<remote>/<branch> akin to the way <em>git clone</em> uses <em>origin</em> by default. </p> </dd> <dt class="hdlist1"> -o <branch-for-HEAD> </dt> <dd> <p> When no remote is specified (via -r) the <em>HEAD</em> branch from CVS is imported to the <em>origin</em> branch within the git repository, as <em>HEAD</em> already has a special meaning for git. When a remote is specified the <em>HEAD</em> branch is named remotes/<remote>/master mirroring <em>git clone</em> behaviour. Use this option if you want to import into a different branch. </p> <div class="paragraph"><p>Use <em>-o master</em> for continuing an import that was initially done by the old cvs2git tool.</p></div> </dd> <dt class="hdlist1"> -i </dt> <dd> <p> Import-only: don’t perform a checkout after importing. This option ensures the working directory and index remain untouched and will not create them if they do not exist. </p> </dd> <dt class="hdlist1"> -k </dt> <dd> <p> Kill keywords: will extract files with <em>-kk</em> from the CVS archive to avoid noisy changesets. Highly recommended, but off by default to preserve compatibility with early imported trees. </p> </dd> <dt class="hdlist1"> -u </dt> <dd> <p> Convert underscores in tag and branch names to dots. </p> </dd> <dt class="hdlist1"> -s <subst> </dt> <dd> <p> Substitute the character "/" in branch names with <subst> </p> </dd> <dt class="hdlist1"> -p <options-for-cvsps> </dt> <dd> <p> Additional options for cvsps. The options <em>-u</em> and <em>-A</em> are implicit and should not be used here. </p> <div class="paragraph"><p>If you need to pass multiple options, separate them with a comma.</p></div> </dd> <dt class="hdlist1"> -z <fuzz> </dt> <dd> <p> Pass the timestamp fuzz factor to cvsps, in seconds. If unset, cvsps defaults to 300s. </p> </dd> <dt class="hdlist1"> -P <cvsps-output-file> </dt> <dd> <p> Instead of calling cvsps, read the provided cvsps output file. Useful for debugging or when cvsps is being handled outside cvsimport. </p> </dd> <dt class="hdlist1"> -m </dt> <dd> <p> Attempt to detect merges based on the commit message. This option will enable default regexes that try to capture the source branch name from the commit message. </p> </dd> <dt class="hdlist1"> -M <regex> </dt> <dd> <p> Attempt to detect merges based on the commit message with a custom regex. It can be used with <em>-m</em> to enable the default regexes as well. You must escape forward slashes. </p> <div class="paragraph"><p>The regex must capture the source branch name in $1.</p></div> <div class="paragraph"><p>This option can be used several times to provide several detection regexes.</p></div> </dd> <dt class="hdlist1"> -S <regex> </dt> <dd> <p> Skip paths matching the regex. </p> </dd> <dt class="hdlist1"> -a </dt> <dd> <p> Import all commits, including recent ones. cvsimport by default skips commits that have a timestamp less than 10 minutes ago. </p> </dd> <dt class="hdlist1"> -L <limit> </dt> <dd> <p> Limit the number of commits imported. Workaround for cases where cvsimport leaks memory. </p> </dd> <dt class="hdlist1"> -A <author-conv-file> </dt> <dd> <p> CVS by default uses the Unix username when writing its commit logs. Using this option and an author-conv-file in this format </p> <div class="listingblock"> <div class="content"> <pre><tt> exon=Andreas Ericsson <ae@op5.se> spawn=Simon Pawn <spawn@frog-pond.org></tt></pre> </div></div> <div class="paragraph"><p><em>git cvsimport</em> will make it appear as those authors had their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along.</p></div> <div class="paragraph"><p>For convenience, this data is saved to <tt>$GIT_DIR/cvs-authors</tt> each time the <em>-A</em> option is provided and read from that same file each time <em>git cvsimport</em> is run.</p></div> <div class="paragraph"><p>It is not recommended to use this feature if you intend to export changes back to CVS again later with <em>git cvsexportcommit</em>.</p></div> </dd> <dt class="hdlist1"> -R </dt> <dd> <p> Generate a <tt>$GIT_DIR/cvs-revisions</tt> file containing a mapping from CVS revision numbers to newly-created Git commit IDs. The generated file will contain one line for each (filename, revision) pair imported; each line will look like </p> <div class="listingblock"> <div class="content"> <pre><tt>src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7</tt></pre> </div></div> <div class="paragraph"><p>The revision data is appended to the file if it already exists, for use when doing incremental imports.</p></div> <div class="paragraph"><p>This option may be useful if you have CVS revision numbers stored in commit messages, bug-tracking systems, email archives, and the like.</p></div> </dd> <dt class="hdlist1"> -h </dt> <dd> <p> Print a short usage message and exit. </p> </dd> </dl></div> </div> <h2 id="_output">OUTPUT</h2> <div class="sectionbody"> <div class="paragraph"><p>If <em>-v</em> is specified, the script reports what it is doing.</p></div> <div class="paragraph"><p>Otherwise, success is indicated the Unix way, i.e. by simply exiting with a zero exit status.</p></div> </div> <h2 id="issues">ISSUES</h2> <div class="sectionbody"> <div class="paragraph"><p>Problems related to timestamps:</p></div> <div class="ulist"><ul> <li> <p> If timestamps of commits in the CVS repository are not stable enough to be used for ordering commits changes may show up in the wrong order. </p> </li> <li> <p> If any files were ever "cvs import"ed more than once (e.g., import of more than one vendor release) the HEAD contains the wrong content. </p> </li> <li> <p> If the timestamp order of different files cross the revision order within the commit matching time window the order of commits may be wrong. </p> </li> </ul></div> <div class="paragraph"><p>Problems related to branches:</p></div> <div class="ulist"><ul> <li> <p> Branches on which no commits have been made are not imported. </p> </li> <li> <p> All files from the branching point are added to a branch even if never added in CVS. </p> </li> <li> <p> This applies to files added to the source branch <strong>after</strong> a daughter branch was created: if previously no commit was made on the daughter branch they will erroneously be added to the daughter branch in git. </p> </li> </ul></div> <div class="paragraph"><p>Problems related to tags:</p></div> <div class="ulist"><ul> <li> <p> Multiple tags on the same revision are not imported. </p> </li> </ul></div> <div class="paragraph"><p>If you suspect that any of these issues may apply to the repository you want to import consider using these alternative tools which proved to be more stable in practice:</p></div> <div class="ulist"><ul> <li> <p> cvs2git (part of cvs2svn), <tt>http://cvs2svn.tigris.org</tt> </p> </li> <li> <p> parsecvs, <tt>http://cgit.freedesktop.org/~keithp/parsecvs</tt> </p> </li> </ul></div> </div> <h2 id="_author">Author</h2> <div class="sectionbody"> <div class="paragraph"><p>Written by Matthias Urlichs <<a href="mailto:smurf@smurf.noris.de">smurf@smurf.noris.de</a>>, with help from various participants of the git-list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>.</p></div> </div> <h2 id="_documentation">Documentation</h2> <div class="sectionbody"> <div class="paragraph"><p>Documentation by Matthias Urlichs <<a href="mailto:smurf@smurf.noris.de">smurf@smurf.noris.de</a>>.</p></div> </div> <h2 id="_git">GIT</h2> <div class="sectionbody"> <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> </div> <div id="footer"> <div id="footer-text"> Last updated 2010-12-16 02:52:11 UTC </div> </div> </body> </html>