⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 version_control_systems.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><div class="toc"><div class="tocheader toctoggle" id="toc__header">Table of Contents</div><div id="toc__inside"><ul class="toc"><li class="level1"><div class="li"><span class="li"><a href="#version_control_systems" class="toc">Version Control Systems</a></span></div><ul class="toc"><li class="level2"><div class="li"><span class="li"><a href="#cvs" class="toc">CVS</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#cvs_quick_start" class="toc">CVS Quick start</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#accessing_the_blackfin_uclinux_repository" class="toc">Accessing the Blackfin/uClinux Repository</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#adding_files_to_cvs" class="toc">Adding Files to CVS</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#automatically_checking_out_projects" class="toc">Automatically checking out projects</a></span></div></li></ul></li><li class="level2"><div class="li"><span class="li"><a href="#subversion" class="toc">Subversion</a></span></div><ul class="toc"><li class="level3"><div class="li"><span class="li"><a href="#getting_subversion" class="toc">Getting Subversion</a></span></div></li><li class="level3"><div class="li"><span class="li"><a href="#subversion_quick_start" class="toc">Subversion Quick Start</a></span></div></li></ul></li></ul></li></ul></div></div><h1><a name="version_control_systems" id="version_control_systems">Version Control Systems</a></h1><div class="level1"></div><!-- SECTION [1-38] --><h2><a name="cvs" id="cvs">CVS</a></h2><div class="level2"><p>Concurrent Versioning System (<acronym title="Concurrent Versions System">CVS</acronym>) provides a central repository where multiple versions of project files can be stored and tracked, this makes collaboration between several developers simpler and more efficient.  <acronym title="Concurrent Versions System">CVS</acronym> allows developers to checkout modules, make changes, and then commit these changes to the <acronym title="Concurrent Versions System">CVS</acronym> repository; these changes can then be reviewed by other developers.  <acronym title="Concurrent Versions System">CVS</acronym>&lsquo;s ability to provide older versions of files is useful, for example, when trying to locate bugs in source code.  Often a newer version of source code, which fixes one bug, may introduce a new bug.  With <acronym title="Concurrent Versions System">CVS</acronym> the newer version of the code can be compared to an older version to help locate the bug.</p></div><!-- SECTION [39-736] --><h3><a name="cvs_quick_start" id="cvs_quick_start">CVS Quick start</a></h3><div class="level3"><p>To update your source files for the toolchain, run the following commands:  </p><pre class="code">cvs -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 login&lt;press enter when prompted for a password&gt;cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 checkout .</pre><p> To update your source files for Das U-boot, run the following commands:  </p><pre class="code">cvs -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uboot533 login&lt;press enter when prompted for a password&gt;cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uboot533 checkout .</pre><p>To update your source files for the uClinux kernel, run the following commands:  </p><pre class="code">cvs -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uclinux533 login&lt;press enter when prompted for a password&gt;cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uclinux533 checkout .</pre><p><code>cvs -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uclinux533 checkout -D 2006-04-25 .</code><a href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Guide_to_CVS_commands#Date_input_formats" class="urlextern" title="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Guide_to_CVS_commands#Date_input_formats"  rel="nofollow">cvs date input formats</a></p></div><!-- SECTION [737-2124] --><h3><a name="accessing_the_blackfin_uclinux_repository" id="accessing_the_blackfin_uclinux_repository">Accessing the Blackfin/uClinux Repository</a></h3><div class="level3"><p> Many of the Blackfin/uClinux projects use a Source Code Version Control System, known as a <acronym title="Concurrent Versions System">CVS</acronym> repository. Definitions for several terms relating to <acronym title="Concurrent Versions System">CVS</acronym> are given below: </p><ul><li class="level1"><div class="li"> <strong>Repository</strong> - This refers to the overall <acronym title="Concurrent Versions System">CVS</acronym> for a given project.  It is the location where all modules relating to the project are stored.</div></li><li class="level1"><div class="li"> <strong>Modules</strong> - These are analogous to sub-directories within the repository. They store files relating to one aspect of the project.  These modules may be checked out, edited locally, and then committed to the repository.</div></li><li class="level1"><div class="li"> <strong>Checkout</strong> - Checking out a module refers to retrieving a module&rsquo;s contents and storing it locally.  The files which make up the module may then be edited and tested locally before being committed to the <acronym title="Concurrent Versions System">CVS</acronym> repository. Some <acronym title="Concurrent Versions System">CVS</acronym> repositories provide anonymous, read-only access while others allow only registered developer access.</div></li><li class="level1"><div class="li"> <strong>Commit</strong> - After changes are made locally to a module these changes may be added to the <acronym title="Concurrent Versions System">CVS</acronym> repository.  When changes are added to a <acronym title="Concurrent Versions System">CVS</acronym> repository it is referred to as committing the changes. Not all users can commit a file in <acronym title="Concurrent Versions System">CVS</acronym>, as you must have special permissions.</div></li></ul><p> Check if you have a cvs  installed on your machine. To do a quick check, <code>whereis cvs</code> </p><pre class="code">rgetz@home:~&gt; whereis cvscvs: /usr/bin/cvs</pre><p>If it is not installed, you will need to install it from your distribution installation disks, or compile it from source from the cvs project <a href="http://www.nongnu.org/cvs/" class="urlextern" title="http://www.nongnu.org/cvs/"  rel="nofollow">home page</a>.</p><p>There are a few methods to access (check out) the <acronym title="Concurrent Versions System">CVS</acronym> repositories at <a href="http://cvs.blackfin.uclinux.org" class="urlextern" title="http://cvs.blackfin.uclinux.org"  rel="nofollow">cvs.blackfin.uclinux.org</a>. You can access them:</p><ul><li class="level1"><div class="li"> Directly, via a cvs client</div></li><li class="level1"><div class="li"> Directly, but through your firewall</div></li><li class="level1"><div class="li"> Daily Snapshots via http</div></li><li class="level1"><div class="li"> Mirroring the <acronym title="Concurrent Versions System">CVS</acronym> repositories locally</div></li></ul></div><h4><a name="direct_cvs_access" id="direct_cvs_access">Direct CVS Access</a></h4><div class="level4"><p>Information on accessing the repository will be available under the project&rsquo;s <em><acronym title="Concurrent Versions System">CVS</acronym></em> tab on the blackfin.uclinux.org website.  In order to work with <acronym title="Concurrent Versions System">CVS</acronym> a <acronym title="Concurrent Versions System">CVS</acronym> client must be installed.  The standard command-line <acronym title="Concurrent Versions System">CVS</acronym> client for Linux is simply called <code>cvs</code>, however, several graphical front鈥慹nds for <code>cvs</code> are available.  Also, the Eclipse Integrated Development Environment (IDE) includes a graphical <acronym title="Concurrent Versions System">CVS</acronym> client.  For more information on Eclipse see <a href="using_eclipse.html" class="wikilink1" title="using_eclipse.html">Using Eclipse</a>.</p></div><h4><a name="indirect_access" id="indirect_access">Indirect Access</a></h4><div class="level4"><p>Normally the cvs server runs on port 2401, which may be blocked if you are sitting behind a firewall. The developers at blackfin.uclinux.org also run the cvs server at port 443, which is normally secure, encrypted https traffic. Since most firewalls will pass traffic on port 443, you can slip through the firewall by using this port. To check to see if this works for you, try telneting to port 443, and pressing <code>enter</code>: </p><pre class="code">rgetz@home:~&gt; telnet blackfin.uclinux.org 443Trying 149.99.17.51...Connected to blackfin.uclinux.org.Escape character is '^]'.cvs [pserver aborted]: bad auth protocol start:Connection closed by foreign host.</pre><p> If you see the <code>pserver aborted</code>, you can tunnel through your firewall :) Just change the server that is used from <code>cvs.blackfin.uclinux.org:/cvsroot/project</code> to <code>blackfin.uclinux.org:443/cvsroot/project</code>. For example: </p><pre class="code">rgetz@home:~&gt; cvs -d:pserver:anonymous@blackfin.uclinux.org:443/cvsroot/uclinux533 loginLogging in to :pserver:anonymous@blackfin.uclinux.org:443/cvsroot/uclinux533CVS password: &lt;enter&gt;</pre><p><code>cvs.blackfin.uclinux.org</code><code>blackfin.uclinux.org:443</code></p></div><h4><a name="http_browsing" id="http_browsing">HTTP Browsing</a></h4><div class="level4"><p>A web based <acronym title="Concurrent Versions System">CVS</acronym> server also runs on the <a href="http://cvs.blackfin.uclinux.org" class="urlextern" title="http://cvs.blackfin.uclinux.org"  rel="nofollow">server</a>, which allows for browsing of the <acronym title="Concurrent Versions System">CVS</acronym> tree as well as downloading, colorized context sensitive diffs, annotated source (showing who modified what line of source), and other features is available. If you determine that you can only access cvs via the web check out <a href="http-cvsgrab.sourceforge.net.html" class="wikilink2" title="http-cvsgrab.sourceforge.net.html">cvsgrab</a>, a cvs client which will download things via the web interface.</p></div><h4><a name="daily_snapshots" id="daily_snapshots">Daily Snapshots</a></h4><div class="level4"><p>Daily snapshots of the <acronym title="Concurrent Versions System">CVS</acronym> Head is are taken once a day, and placed on the web server, which can be downloaded from the <code>SCM</code> tab in each project.</p></div><h4><a name="mirroring_cvs" id="mirroring_cvs">Mirroring CVS</a></h4><div class="level4"><p>Since the connection from the <code>cvs.blackfin.uclinux.org</code> can be slow at times, the best way of speeding this connection up, is to use a local mirror. To set up a local mirror, you can use <a href="http://samba.anu.edu.au/rsync/" class="urlextern" title="http://samba.anu.edu.au/rsync/"  rel="nofollow">rsync</a>. This will provide you a local copy of the entire repository, which you can access much faster than <code>cvs.blackfin.uclinux.org</code>. </p><p></p><p>To set up a local repository, do the following:</p><ol><li class="level1"><div class="li"> Check to ensure you can talk to the rsync server on cvs.blackfin.uclinux.org<pre class="code">rgetz@home:~&gt; rsync cvs.blackfin.uclinux.org::uclinux533      uclinux533 cvsgcc3            gcc3 cvsuboot533        uboot533 cvsjtag            jtag cvsjtagtools       jtagtools cvs</pre><p>If port 873 is blocked on your firewall, there is no way to connect to the rsync server.</p></div></li><li class="level1"><div class="li"> Ensure that your pserver is alive, by trying to telnet to port 2401 on the localhost.<pre class="code">rgetz@home:~&gt; telnet 127.0.0.1 2401Trying 127.0.0.1...telnet: connect to address 127.0.0.1: Connection refused</pre><p> If it says <code>Connection refused</code>, continue to the next step. If it responds back with:</p><pre class="code">rgetz@home:~&gt; telnet 127.0.0.1 2401Trying 149.99.17.51...Connected to blackfin.uclinux.org.Escape character is '^]'.cvs [pserver aborted]: bad auth protocol start:Connection closed by foreign host.</pre><p>Skip the next step.</p></div></li><li class="level1"><div class="li"> Find the file in <code>/etc/xinetd.d</code> which controls the cvs pserver. On different distributions, it may be different be a different filename than this example.<pre class="code">rgetz@home:~&gt; grep -i cvspserver /etc/xinetd.d/*/etc/xinetd.d/cvs:service cvspserver</pre><p>From this we can see that <code>/etc/xinetd.d/cvs</code> controls the service cvspserver. We need to edit this file, to turn on cvs.  To do this you must be root.</p></div><ol><li class="level2"><div class="li"> First create a new file, <code>/usr/bin/mypserver.sh</code>. This will look at <code>/cvsroot/</code> directory and allow all sub-directories to have cvs access.<pre class="code">#!/bin/sh/usr/bin/cvs -f `find /cvsroot/* -maxdepth 0 -type d | sed -e '1,$s/.*/--allow-root=&amp;/'` pserver</pre></div></li><li class="level2"><div class="li"> Change the permissions of the file you just created, so it is executable.<pre class="code">home:/home/rgetz # chmod 555 /usr/bin/mypserver.shhome:/home/rgetz # ls -l /usr/bin/mypserver.sh-r-xr-xr-x  1 root root 107 2005-08-25 15:42 /usr/bin/mypserver.sh</pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -