summaryrefslogtreecommitdiff
path: root/devdocs/git/git-cvsimport.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/git/git-cvsimport.html
new repository
Diffstat (limited to 'devdocs/git/git-cvsimport.html')
-rw-r--r--devdocs/git/git-cvsimport.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/devdocs/git/git-cvsimport.html b/devdocs/git/git-cvsimport.html
new file mode 100644
index 00000000..277c37dc
--- /dev/null
+++ b/devdocs/git/git-cvsimport.html
@@ -0,0 +1,11 @@
+<h1>git-cvsimport</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>git-cvsimport - Salvage your data out of another SCM people love to hate</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content" data-language="shell">git cvsimport [-o &lt;branch-for-HEAD&gt;] [-h] [-v] [-d &lt;CVSROOT&gt;]
+ [-A &lt;author-conv-file&gt;] [-p &lt;options-for-cvsps&gt;] [-P &lt;file&gt;]
+ [-C &lt;git-repository&gt;] [-z &lt;fuzz&gt;] [-i] [-k] [-u] [-s &lt;subst&gt;]
+ [-a] [-m] [-M &lt;regex&gt;] [-S &lt;regex&gt;] [-L &lt;commit-limit&gt;]
+ [-r &lt;remote&gt;] [-R] [&lt;CVS-module&gt;]</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <p><strong>WARNING:</strong> <code>git cvsimport</code> uses cvsps version 2, which is considered deprecated; it does not work with cvsps version 3 and later. If you are performing a one-shot import of a CVS repository consider using <a href="http://cvs2svn.tigris.org/cvs2git.html">cvs2git</a> or <a href="https://gitlab.com/esr/cvs-fast-export">cvs-fast-export</a>.</p> <p>Imports a CVS repository into Git. It will either create a new repository, or incrementally import into an existing one.</p> <p>Splitting the CVS log into patch sets is done by <code>cvsps</code>. At least version 2.1 is required.</p> <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> <p>You should <strong>never</strong> do any work of your own on the branches that are created by <code>git cvsimport</code>. 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 <code>git merge</code> 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> <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">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">gitcvs-migration[7]</a>.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--v"> -v </dt> <dd> <p>Verbosity: let <code>cvsimport</code> report what it is doing.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--dltCVSROOTgt"> -d &lt;CVSROOT&gt; </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, <code>git cvsimport</code> will try to read it from <code>CVS/Root</code>. If no such file exists, it checks for the <code>CVSROOT</code> environment variable.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt-ltCVS-modulegt"> &lt;CVS-module&gt; </dt> <dd> <p>The CVS module you want to import. Relative to &lt;CVSROOT&gt;. If not given, <code>git cvsimport</code> tries to read it from <code>CVS/Repository</code>.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--Clttarget-dirgt"> -C &lt;target-dir&gt; </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" id="Documentation/git-cvsimport.txt--rltremotegt"> -r &lt;remote&gt; </dt> <dd> <p>The Git remote to import this CVS repository into. Moves all CVS branches into remotes/&lt;remote&gt;/&lt;branch&gt; akin to the way <code>git clone</code> uses <code>origin</code> by default.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--oltbranch-for-HEADgt"> -o &lt;branch-for-HEAD&gt; </dt> <dd> <p>When no remote is specified (via -r) the <code>HEAD</code> branch from CVS is imported to the <code>origin</code> branch within the Git repository, as <code>HEAD</code> already has a special meaning for Git. When a remote is specified the <code>HEAD</code> branch is named remotes/&lt;remote&gt;/master mirroring <code>git clone</code> behaviour. Use this option if you want to import into a different branch.</p> <p>Use <code>-o master</code> for continuing an import that was initially done by the old cvs2git tool.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--i"> -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" id="Documentation/git-cvsimport.txt--k"> -k </dt> <dd> <p>Kill keywords: will extract files with <code>-kk</code> 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" id="Documentation/git-cvsimport.txt--u"> -u </dt> <dd> <p>Convert underscores in tag and branch names to dots.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--sltsubstgt"> -s &lt;subst&gt; </dt> <dd> <p>Substitute the character "/" in branch names with &lt;subst&gt;</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--pltoptions-for-cvspsgt"> -p &lt;options-for-cvsps&gt; </dt> <dd> <p>Additional options for cvsps. The options <code>-u</code> and <code>-A</code> are implicit and should not be used here.</p> <p>If you need to pass multiple options, separate them with a comma.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--zltfuzzgt"> -z &lt;fuzz&gt; </dt> <dd> <p>Pass the timestamp fuzz factor to cvsps, in seconds. If unset, cvsps defaults to 300s.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--Pltcvsps-output-filegt"> -P &lt;cvsps-output-file&gt; </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" id="Documentation/git-cvsimport.txt--m"> -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" id="Documentation/git-cvsimport.txt--Mltregexgt"> -M &lt;regex&gt; </dt> <dd> <p>Attempt to detect merges based on the commit message with a custom regex. It can be used with <code>-m</code> to enable the default regexes as well. You must escape forward slashes.</p> <p>The regex must capture the source branch name in $1.</p> <p>This option can be used several times to provide several detection regexes.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--Sltregexgt"> -S &lt;regex&gt; </dt> <dd> <p>Skip paths matching the regex.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--a"> -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" id="Documentation/git-cvsimport.txt--Lltlimitgt"> -L &lt;limit&gt; </dt> <dd> <p>Limit the number of commits imported. Workaround for cases where cvsimport leaks memory.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--Altauthor-conv-filegt"> -A &lt;author-conv-file&gt; </dt> <dd> <p>CVS by default uses the Unix username when writing its commit logs. Using this option and an author-conv-file maps the name recorded in CVS to author name, e-mail and optional time zone:</p> <div class="listingblock"> <div class="content"> <pre> exon=Andreas Ericsson &lt;ae@op5.se&gt;
+ spawn=Simon Pawn &lt;spawn@frog-pond.org&gt; America/Chicago</pre> </div> </div> <p><code>git cvsimport</code> will make it appear as those authors had their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along. If a time zone is specified, GIT_AUTHOR_DATE will have the corresponding offset applied.</p> <p>For convenience, this data is saved to <code>$GIT_DIR/cvs-authors</code> each time the <code>-A</code> option is provided and read from that same file each time <code>git cvsimport</code> is run.</p> <p>It is not recommended to use this feature if you intend to export changes back to CVS again later with <code>git cvsexportcommit</code>.</p> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--R"> -R </dt> <dd> <p>Generate a <code>$GIT_DIR/cvs-revisions</code> 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>src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7</pre> </div> </div> <p>The revision data is appended to the file if it already exists, for use when doing incremental imports.</p> <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> </dd> <dt class="hdlist1" id="Documentation/git-cvsimport.txt--h"> -h </dt> <dd> <p>Print a short usage message and exit.</p> </dd> </dl> </div> </div> <h2 id="_output">Output</h2> <div class="sectionbody"> <p>If <code>-v</code> is specified, the script reports what it is doing.</p> <p>Otherwise, success is indicated the Unix way, i.e. by simply exiting with a zero exit status.</p> </div> <h2 id="issues">Issues</h2> <div class="sectionbody"> <p>Problems related to timestamps:</p> <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> <p>Problems related to branches:</p> <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> <p>Problems related to tags:</p> <div class="ulist"> <ul> <li> <p>Multiple tags on the same revision are not imported.</p> </li> </ul> </div> <p>If you suspect that any of these issues may apply to the repository you want to import, consider using cvs2git:</p> <div class="ulist"> <ul> <li> <p>cvs2git (part of cvs2svn), <code>https://subversion.apache.org/</code></p> </li> </ul> </div> </div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2012&ndash;2024 Scott Chacon and others<br>Licensed under the MIT License.<br>
+ <a href="https://git-scm.com/docs/git-cvsimport" class="_attribution-link">https://git-scm.com/docs/git-cvsimport</a>
+ </p>
+</div>