From Fedora Project Wiki

m (typo)
(Use OL and LI to preserve multi-line PRE)
Line 13: Line 13:
== Import CVS to git ==
== Import CVS to git ==


# Install <code>git</code> if you haven't already: <pre>su -c 'yum install git-all'</pre>
<!-- use OL and LI elements, which is the only way to preserve multi-line PRE in MediaWiki -->
Make a directory for your new git repository: <pre>mkdir -p &lt;GITREPODIR&gt;
<!-- Q.v.:  http://marc.info/?l=mediawiki-l&m=119489994314561&w=2 -->
# Run <code>git-cvsimport</code> for the module.  Substitute the directory you just made for &lt;GITREPODIR&gt;, and the module name (like "foo-guide") for &lt;MODULE&gt;: <pre>git-cvsimport -d :pserver:anonymous@cvs.fedoraproject.org:/cvs/docs -S docs-common -v -C &lt;GITREPODIR&gt; -u -p x -a -A ~/authors.txt &lt;MODULE&gt;</pre>
<ol>
<li>Install <code>git</code> if you haven't already: <pre>su -c 'yum install git-all'</pre></li>
<li>Make a directory for your new git repository: <pre>mkdir -p &lt;GITREPODIR&gt;</pre></li>
<li>Run <code>git-cvsimport</code> for the module.  Substitute the directory you just made for &lt;GITREPODIR&gt;, and the module name (like "foo-guide") for &lt;MODULE&gt;.<br/>
''NOTE: The <code>\</code> character is a line wrap, so this is one line:''
<pre>git-cvsimport -d :pserver:anonymous@cvs.fedoraproject.org:/cvs/docs   \
-S docs-common -v -C &lt;GITREPODIR&gt; -u -p x -a -A ~/authors.txt &lt;MODULE&gt;</pre></li>
</ol>


This step could take quite a while, depending on the size of the repository and the speed of your network connection.
This step could take quite a while, depending on the size of the repository and the speed of your network connection.

Revision as of 16:39, 12 September 2008

This document demonstrates how to turn a Docs CVS module into a git repo.

Create author file

Get the script found here: http://pfrields.fedorapeople.org/scripts/authors-from-fas2-group.py

Run the script:

python authors-from-fas2-group.py

Provide your FAS username and password, and the group name docs. You will also need to run it again with the group name cvsl10n. Use the cat command to copy both sets of results (in any order) to a single file authors.txt.

NOTE: When you're finished with importing Docs CVS modules, don't bother to retain the authors.txt file, as the results are expected to change over time.

Import CVS to git

  1. Install git if you haven't already:
    su -c 'yum install git-all'
  2. Make a directory for your new git repository:
    mkdir -p <GITREPODIR>
  3. Run git-cvsimport for the module. Substitute the directory you just made for <GITREPODIR>, and the module name (like "foo-guide") for <MODULE>.
    NOTE: The \ character is a line wrap, so this is one line:
    git-cvsimport -d :pserver:anonymous@cvs.fedoraproject.org:/cvs/docs   \
    -S docs-common -v -C <GITREPODIR> -u -p x -a -A ~/authors.txt <MODULE>

This step could take quite a while, depending on the size of the repository and the speed of your network connection.