📄 version_control_systems.html
字号:
<p> Some other common <acronym title="Concurrent Versions System">CVS</acronym> commands are given below:</p><p> For any file in a <acronym title="Concurrent Versions System">CVS</acronym> repository multiple versions of the file may exist. You can compare the differences between revisions by using the<strong> </strong><strong>diff</strong> command. To compare the difference between revision <em><strong>x</strong></em> and revision <em><strong>y</strong></em> of a file in the <acronym title="Concurrent Versions System">CVS</acronym> repository enter the following commands:</p><pre class="code">bash$ cd <module directory>bash$ cvs diff -r<revision number x> -r<revision number y> <filename>(e.g. cvs diff -r 1.5 -r 1.6 main.c)</pre><p>To compare the differences between a local file and revision <em><strong>x </strong></em>on the file in the <acronym title="Concurrent Versions System">CVS</acronym> repository enter the following commands:</p><pre class="code">bash$ cd <module directory>bash$ cvs diff -r<revision number x> -l <filename>(e.g. cvs diff -r 1.5 -l main.c)</pre><p>To remove a file from a <acronym title="Concurrent Versions System">CVS</acronym> module enter the following commands:</p><pre class="code">bash$ cd <module directory>bash$ rm <filename>bash$ cvs remove <filename>bash$ cvs commit</pre><p>For more information on <acronym title="Concurrent Versions System">CVS</acronym> commands enter:</p><pre class="code">bash$ cvs --help-commands</pre><p>For information on a specific <acronym title="Concurrent Versions System">CVS</acronym> command enter:</p><pre class="code">bash$ cvs -H <command name></pre><p>This section only describes a small portion of <acronym title="Concurrent Versions System">CVS</acronym>‘s capabilities. For more information on <acronym title="Concurrent Versions System">CVS</acronym> see the <a href="http://ximbiot.com/cvs/cvshome/docs/" class="urlextern" title="http://ximbiot.com/cvs/cvshome/docs/" rel="nofollow">documentation</a>.</p></div><!-- SECTION [14672-19959] --><h3><a name="automatically_checking_out_projects" id="automatically_checking_out_projects">Automatically checking out projects</a></h3><div class="level3"><p>Many of the developers use the below script which automatically checks out or updates the local version of the the latest kernel, toolchain, and u-boot. Before the script is run, certain settings must be changed at the top of the script:</p><pre class="code">#!/bin/shSERVER=localhostGCC=/cvsroot/gcc3UBOOT=/cvsroot/uboot533KERNEL=/cvsroot/uclinux533CVS_CHECKOUT=/home/rgetz/todayscvs# -------------------------------GCC_CHECKOUT=$CVS_CHECKOUT/gccKERNEL_CHECKOUT=$CVS_CHECKOUT/kernelUBOOT_CHECKOUT=$CVS_CHECKOUT/u-boottouch ~/.cvspassif [ ! -d $GCC_CHECKOUT ] ; then mkdir -p $GCC_CHECKOUTfiif [ ! -d $KERNEL_CHECKOUT ] ; then mkdir -p $KERNEL_CHECKOUTfiif [ ! -d $UBOOT_CHECKOUT ] ; then mkdir -p $UBOOT_CHECKOUTficd $GCC_CHECKOUTcvs -d :pserver:anonymous@$SERVER:$GCC checkout .#1>/dev/null 2>/dev/nullcd $UBOOT_CHECKOUTcvs -d :pserver:anonymous@$SERVER:$UBOOT checkout . 1>/dev/null 2>/dev/nullcd $KERNEL_CHECKOUTcvs -d :pserver:anonymous@$SERVER:$KERNEL checkout . 1>/dev/null 2>/dev/nullcd ~if [ -f $GCC_CHECKOUT/buildscript/BuildToolChain ] ; then $GCC_CHECKOUT/buildscript/BuildToolChain -s $GCC_CHECKOUT -k $KERNEL_CHECKOUT/uClinux-dist -b $CVS_CHECKOUT/build-gcc -o $CVS_CHECKOUT/gccfi</pre><p>This script should be run every day to ensure that you are using the latest sources, and will build the <acronym title="Concurrent Versions System">CVS</acronym> toolchain. However, the cvs is a work in progress, and it is is possible that bug may be in cvs - if you find something - please report it so we can make sure it gets fixed. To report a new bug:</p><ul><li class="level1"><div class="li"> <a href="http://blackfin.uclinux.org/tracker/?func=add&group_id=18&atid=145" class="urlextern" title="http://blackfin.uclinux.org/tracker/?func=add&group_id=18&atid=145" rel="nofollow">New Toolchain Bug</a></div></li><li class="level1"><div class="li"> <a href="http://blackfin.uclinux.org/tracker/?func=add&group_id=17&atid=141" class="urlextern" title="http://blackfin.uclinux.org/tracker/?func=add&group_id=17&atid=141" rel="nofollow">New kernel bug</a></div></li><li class="level1"><div class="li"> <a href="http://blackfin.uclinux.org/tracker/?func=add&group_id=20&atid=153" class="urlextern" title="http://blackfin.uclinux.org/tracker/?func=add&group_id=20&atid=153" rel="nofollow">New U-Boot Bug</a></div></li></ul></div><!-- SECTION [19960-21837] --><h2><a name="subversion" id="subversion">Subversion</a></h2><div class="level2"><p>Subversion is touted as a replacement for <strong><acronym title="Concurrent Versions System">CVS</acronym></strong></p><p>Improvements include: </p><ul><li class="level1"><div class="li"> Better file movement handling</div></li><li class="level1"><div class="li"> Better branch and merge features</div></li><li class="level1"><div class="li"> More suited to work groups</div></li><li class="level1"><div class="li"> Atomic commits</div></li><li class="level1"><div class="li"> True version History</div></li></ul><p>An online book is available <a href="http://svnbook.red-bean.com" class="urlextern" title="http://svnbook.red-bean.com" rel="nofollow">http://svnbook.red-bean.com</a></p></div><!-- SECTION [21838-22149] --><h3><a name="getting_subversion" id="getting_subversion">Getting Subversion</a></h3><div class="level3"><p>Source for subversion is <a href="http://subversion.tigris.org" class="urlextern" title="http://subversion.tigris.org" rel="nofollow">http://subversion.tigris.org</a></p><p>Most popular distributions have packages installed </p></div><!-- SECTION [22150-22294] --><h3><a name="subversion_quick_start" id="subversion_quick_start">Subversion Quick Start</a></h3><div class="level3"></div><h4><a name="create_a_repository" id="create_a_repository">Create a Repository</a></h4><div class="level4"><pre class="code"> $ svnadmin create /home/student/work/svn $ ls /home/student/work/svn conf dav db format hooks locks README.txt</pre></div><h4><a name="set_up_a_project_for_management_with_subversion" id="set_up_a_project_for_management_with_subversion">Set up a project for management with Subversion</a></h4><div class="level4"><p> Three directories are needed for proper management</p><ul><li class="level1"><div class="li"> project/branches</div></li><li class="level1"><div class="li"> project/tags</div></li><li class="level1"><div class="li"> project/trunk - the main body</div></li></ul><p> Put the source in <strong>trunk</strong></p></div><h4><a name="add_a_project_to_the_repository" id="add_a_project_to_the_repository">Add a Project to the Repository</a></h4><div class="level4"><pre class="code">svn import /home/student/work/project file:///home/student/work/svn -m "initial import"</pre></div><h4><a name="check_the_project_out_of_the_repository" id="check_the_project_out_of_the_repository">Check the Project out of the Repository</a></h4><div class="level4"><p>The sub directory will be called “project”</p><pre class="code"> svn co file:///home/student/work/svn/trunk project</pre></div><h4><a name="initial_actions" id="initial_actions">Initial actions</a></h4><div class="level4"><ul><li class="level1"><div class="li"> <strong>svn diff</strong> to get unified diff output of your changes.</div></li><li class="level2"><div class="li"> <strong>svn commit</strong> commit a new version into the repository.</div></li><li class="level2"><div class="li"> <strong>svn update</strong> to bring your working copy up-to-date with the repository.</div></li></ul></div><h4><a name="check_the_project_out_of_the_repository1" id="check_the_project_out_of_the_repository1">Check the Project out of the Repository</a></h4><div class="level4"><p> The sub directory will be called “project” </p><pre class="code"> svn co file:///home/student/work/svn/trunk project</pre></div><h4><a name="initial_actions1" id="initial_actions1">Initial actions</a></h4><div class="level4"><ul><li class="level1"><div class="li"> <strong>svn diff</strong> to get unified diff output of your changes.</div></li><li class="level2"><div class="li"> <strong>svn commit</strong> commit a new version into the repository.</div></li><li class="level2"><div class="li"> <strong>svn update</strong> to bring your working copy up-to-date with the repository.</div></li></ul></div><!-- SECTION [22295-] --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -