head	1.6;
access;
symbols
	TIGRIS_1_1_0RC2:1.4
	TIGRIS_1_1_0RC1:1.4
	TIGRIS_1_1:1.4.0.4
	TIGRIS_1_0_8:1.4
	TIGRIS_1_0_8RC3:1.4
	TIGRIS_1_0_8RC2:1.4
	TIGRIS_1_0_8RC1:1.4
	TIGRIS_1_0_7:1.4
	TIGRIS_1_0_7RC3:1.4
	TIGRIS_1_0_7RC2:1.4
	TIGRIS_1_0_7RC1:1.4
	TIGRIS_1_0_6:1.4
	TIGRIS_1_0_6RC5:1.4
	TIGRIS_1_0_6RC4:1.4
	TIGRIS_1_0_6RC3:1.4
	TIGRIS_1_0_6RC2:1.4
	TIGRIS_1_0_6RC1:1.4
	TIGRIS_1_0_5:1.4
	TIGRIS_1_0_5RC6:1.4
	TIGRIS_1_0_5RC5:1.4
	TIGRIS_1_0_5RC4:1.4
	TIGRIS_1_0_5RC3:1.4
	TIGRIS_1_0_5RC2:1.4
	TIGRIS_1_0_5RC1:1.4
	TIGRIS_1_0_4:1.4
	TIGRIS_1_0_3:1.4
	TIGRIS_1_0_2:1.4
	TIGRIS_1_0_1:1.4
	TIGRIS_1_0:1.4.0.6
	TIGRIS_1_0_0:1.4
	TIGRIS_1_0_0_RC1:1.4.0.2;
locks; strict;
comment	@# @;


1.6
date	2001.06.21.07.07.40;	author jefflove;	state Exp;
branches;
next	1.5;

1.5
date	2001.06.11.03.14.33;	author jefflove;	state Exp;
branches;
next	1.4;

1.4
date	2001.02.22.01.02.52;	author lori;	state Exp;
branches;
next	1.3;

1.3
date	2001.02.11.18.29.47;	author jrobbins;	state Exp;
branches;
next	1.2;

1.2
date	2001.02.09.00.59.20;	author susank;	state Exp;
branches;
next	1.1;

1.1
date	2001.01.29.19.46.27;	author lori;	state Exp;
branches;
next	;


desc
@@


1.6
log
@html usage revision
@
text
@  <div class="docs" id="ddcvscvsmanaging">
   <h2>Managing project files and directories with command line CVS</h2>

   <div class="toc">
    <h3>CVS tool documents: Index</h3>

    <ul>
     <li>
      <a href="ddCVS.html">About source code version control with CVS</a> 

      <ul>
       <li><a href="ddCVS_cvsglossary.html">A version control glossary</a></li>

       <li><a href="ddUsingCVS_command-line.html">Using command-line CVS to access project source files</a></li>

       <li><a href="ddCVS_cvscontributing.html">Contributing source code changes with CVS</a></li>

       <li>
        <strong>You are here:</strong> Managing project files and directories with CVS 

        <ul>
         <li><a href="#cvsrelease">Releasing files</a></li>

         <li><a href="#cvsremove">Removing files</a></li>

         <li><a href="#cvsrenameandmove">Renaming and moving files</a></li>

         <li><a href="#cvsimport">Importing existing source files</a></li>

         <li><a href="#cvsandrcs">CVS and RCS</a></li>

         <li><a href="#keywords">Using keywords</a></li>

         <li><a href="#aboutbranching">Tagging and branching</a></li>
        </ul>
       </li>
      </ul>
     </li>
    </ul>
   </div>

   <div class="courtesylinks">
    <p><a href="/servlets/HelpTOC">Back to main Help index</a></p>
   </div>

   <h3><a id="cvsrelease" name="cvsrelease">Releasing files and directories</a></h3>

   <p>At certain point in a project's development cycle, managing your project's source repository invariably involves dealing with files and directories that have become deprecated or obsolete. The decision is made to abandon a certain piece of functionality within a module, for example. Or perhaps an change in infrastructure demands getting rid of some files and moving others. This section deals with several methods for dealing with such file management issues in CVS.</p>

   <p><i>Releasing</i> refers to a way of designating certain directories or modules that will no longer to be used in the project. The command to release is invoked within a working copy and effectively cancels cvs checkouts for the designated directories and their files. Unless these are expressly deleted, the files and directories actually remain intact within the repository, including all file revision history, but are no longer included in when working copies are checked out.</p>

   <p>The command to release a file or directory is:</p>

   <p><code>cvs rel filename</code> (or <code>/directory_name</code>)</p>

   <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_20.html#SEC122">More about releasing</a></p>

   <h3><a id="cvsremove" name="cvsremove">Removing files</a></h3>

   <p><i>Removing</i> is another way to get rid of files when you no longer want or need them to be part of the project's source repository. To do this, you must first delete the file from the working copy you have checked out on your local system.</p>

   <p>Then, to remove a file from the shared repository, type:</p>

   <p><code>cvs remove filename</code></p>

   <p>After you have removed one or more files, you must commit your changes.</p>

   <p>With "<b>cvs remove</b>" (or "<b>cvs rm</b>"), the old file is not completely eradicated but rather stored in CVS' so-called "attic" along with its complete revision history.</p>

   <div class="courtesylinks">
    <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_12.html#SEC62">More about removing files</a><br />
     <a href="http://cvsbook.red-bean.com/cvsbook.html#What_Happens_When_You_Remove_A_File">What happens when you remove a file</a></p>
   </div>

   <h3><a id="cvsrenameandmove" name="cvsrenameandmove">Renaming and moving files and directories</a></h3>

   <p>If you have imported some existing source code into your repository, you may have files and directories you want to rename or or move.</p>

   <p>The best way to rename a file in your working copy involves a series of steps. Use:</p>

   <p><code>cvs rm old_filename</code></p>

   <p>to remove the old name, then</p>

   <p><code>cvs add new_filename</code></p>

   <p>and finally,</p>

   <p><code>cvs commit new_filename</code></p>

   <p>There really is no specific way in CVS to remove or rename directories. However, you can produce that effect by creating a new directory, moving the files you need into it, removing unwanted files from the old directory, and then simply no longer using it. Later, you can "prune" these empty directories the next time you a check out a working copy by using:</p>

   <p><code>cvs checkout -P</code></p>

   <p>Another way to prune directories with no more files is to update with:</p>

   <p><code>cvs update -dP</code></p>

   <div class="courtesylinks">
    <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_14.html#SEC67">More about moving and renaming files</a><br />
     <a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_15.html#SEC71">More about moving and renaming directories</a></p>
   </div>

   <h3><a id="cvsimport" name="cvsimport">Importing existing code?</a></h3>

   <p>If you have existing files to add to the project, you can import these into CVS using the following command:</p>

   <p><code>cvs import filename</code></p>

   <p>Importing allows you to add a lot of files at once, something like a super "cvs add." To import <i>all</i> existing directories and files, in your top level directory type:</p>

   <p><code>cvs import -m "log message" projectname</code></p>

   <p>This creates the files and directories in the CVS repository for your project on this site. If you want to preserve these files and directories in their original state, you may want to tag or archive this set of original files before you or any other developers begin checking out working copies of project files.</p>

   <p>If your existing files are already under versioning control -- either in another CVS repository or in a versioning different system such as RCS -- there is no automated method for importing existing files that retains file histories. Using the cvs import command, copying files over, or creating them as new files does not retain these histories.</p>

   <h3><a id="cvsandrcs" name="cvsandrcs">CVS and RCS</a></h3>

   <p>If you're already familiar with RCS, both RCS and CVS use a similar format for storing the version control histories of individual files. But you should be aware of at least two critical differences in adapting CVS:</p>

   <ul>
    <li>One of the central principals in RCS is file locking, which prevents other developers from checking out or modifying a file when you have checked it out. The benefit to file locking is that developers never have to deal with conflicting modifications within files. RCS protects files by only allowing them to be modified by one person at a time. Therefore, the drawback to RCS is: you can't commit your changes to a file while another developer has it checked out.</li>

    <li>The central tenant of CVS is to allow developers to check out, modify, and commit files concurrently, truly a benefit to projects with remote, geographically dispersed developers. The tradeoff is that on a CVS version controlled project, you can count on dealing with merge conflicts in files. The only method for resolving such conflicts is by hand-editing the file. Thus, project workflow with CVS ends up being a little different.</li>
   </ul>

   <p><a href="http://www.cvshome.org/cyclic/cyclic-pages/rcs.html">More about RCS and CVS</a></p>

   <h3><a id="keywords" name="keywords">Keyword substitution</a></h3>

   <p>Keyword substitution (a.k.a keyword expansion) is an RCS holdover that may be useful to you as a developer. Keywords essentially let you embed version information permanently in source files. A string containing the full version information associated with a particular keyword is substituted whenever the file is subsequently revised.</p>

   <p>As an example, including:</p>

   <p><code>$Author: lori $</code></p>

   <p>within the files permanently retains the login name of the user who checked in that revision.</p>

   <p>Keyword substitution is a method for tracking file versions once the files are no longer part of a CVS repository. Keyword substitution can also be configured and suppressed.</p>

   <p><a href="http://cvshome.org/docs/manual/cvs_12.html#SEC98">More about keywords (including a list of common keywords)</a></p>

   <h3><a id="aboutbranching" name="aboutbranching">Tagging and branching</a></h3>

   <p>The CVS repository for your project hosted on this site supports branching and tagging your source files. At certain points in your project, you may want to enable development work in your project to progress in more than one direction simultaneously. Instead of maintaining a singular, linear path of development, CVS branching provides a way to divert or split the source tree for ancillary development activities without impacting progress of the project's primary effort. Examples of reasons to branch include:</p>

   <ul>
    <li>to distinguish a clearly defined set of functionality in project source files for QA and testing, or</li>

    <li>when you want to try an experiment such as added features or functionality without affecting the project's progress.</li>
   </ul>

   <p>Tagging is included in the discussion about branching because the two operations are used in conjunction. Tagging allows you to "take a snapshot" of the overall project's state at a certain point in time, for example, to preserve a build with some particular characteristic. Because CVS manages individual file revisions, tagging is an important option for benchmarking the overall state of project source code. Files included in a tag will most likely be at different points in their respective revision numbering.</p>

   <p>The critical difference between branching and tagging is the reason they are complimentary operations:</p>

   <p>Branching affects <i>individual files'</i> revision numbering, whereas tagging assigns a common identifying marker <i>across all project files</i> at a fixed point in time.</p>

   <p>So, for example, project files are often tagged at the point where branches are created.</p>

   <p>Ultimately, branches in your project with successful outcomes get incorporated or merged back in to the main development trunk. When that happens -- and it may occur repeatedly on large or long-term projects -- identifying the point where this merge occurs is another reason to create a tag.</p>

   <p><a id="cvstag" name="cvstag">To tag project files, type:</a></p>

   <p><code>cvs tag unique_tag_name</code></p>

   <p>Your tag name can be a release name or date, a product version identifier, or whatever you choose.</p>

   <p><a id="cvsbranch" name="cvsbranch">To create a branch, type:</a></p>

   <p><code>cvs tag -b unique_tag_name</code></p>

   <p>Branching and tagging are complex topics with many considerations and options. You can find more comprehensive information and instructions in the following resources:</p>

   <ul>
    <li>cvshome.org: <a href="http://www.cvshome.org/docs/manual/cvs_4.html#SEC48">"More about branching and tagging"</a></li>

    <li>The Cederqvist Manual: <a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_8.html#SEC50">"Branches"</a></li>

    <li>
     Open Source Development with CVS: 

     <ul>
      <li><a href="http://cvsbook.red-bean.com/cvsbook.html#Marking_A_Moment_In_Time__Tags_">"Marking A Moment In Time (Tags)"</a></li>

      <li><a href="http://cvsbook.red-bean.com/cvsbook.html#Branches">"Branches"</a></li>
     </ul>
    </li>
   </ul>

   <div class="courtesylinks">
    <p><a href="/servlets/HelpTOC">Back to main Help index</a></p>
   </div>
  </div>
 


@


1.5
log
@extensive markup rework - first pass toward house xhtmlification
@
text
@d1 2
a2 24
<!DOCTYPE html PUBLIC "-//CollabNet//DTD XHTML 1.0 Transitional//EN"
"http://collabnet.com/dtds/collabnet_transitional_10.dtd">
<html>
 <head>
  <title>Managing project files with CVS</title>
<style type="text/css">
 p.c3 {font-weight: bold}
 blockquote.c2 {font-weight: bold}
 div.c1 {margin-left: 2em}
</style>
<style type="text/css">
 p.c1 {font-weight: bold}
</style>
 </head>

 <body>
  <div class="docs" id="docid">
<h2>Managing project files and directories with command line CVS</h2>

  <p>CVS tool documents: Index</p>

  <div>
   <dl>
    <dt><a href="ddCVS.html">About source code version control with CVS</a></dt>
d4 2
a5 1
    <dt><a href="ddCVS_cvsglossary.html">A version control glossary</a></dt>
d7 3
a9 1
    <dd><a href="ddUsingCVS_command-line.html">Using command-line CVS to access project source files</a></dd>
d11 2
a12 1
    <dd><a href="ddCVS_cvscontributing.html">Contributing source code changes with CVS</a></dd>
d14 1
a14 2
    <dd>
     <b>You are here: Managing project files and directories with CVS</b> 
d16 1
a16 2
     <ul>
      <li><b><a href="#cvsrelease">Releasing files</a></b></li>
d18 2
a19 1
      <li><b><a href="#cvsremove">Removing files</a></b></li>
d21 2
a22 1
      <li><b><a href="#cvsrenameandmove">Renaming and moving files</a></b></li>
d24 1
a24 1
      <li><b><a href="#cvsimport">Importing existing source files</a></b></li>
d26 1
a26 1
      <li><b><a href="#cvsandrcs">CVS and RCS</a></b></li>
d28 1
a28 1
      <li><b><a href="#keywords">Using keywords</a></b></li>
d30 1
a30 3
      <li><b><a href="#aboutbranching">Tagging and branching</a></b></li>
     </ul>
    </dd>
d32 1
a32 3
    <dt><a href="/servlets/HelpTOC">Back to main Help index</a></dt>
   </dl>
  </div>
d34 7
a40 1
  <h3><a id="cvsrelease" name="cvsrelease">Releasing files and directories</a></h3>
d42 3
a44 1
  <p>At certain point in a project's development cycle, managing your project's source repository invariably involves dealing with files and directories that have become deprecated or obsolete. The decision is made to abandon a certain piece of functionality within a module, for example. Or perhaps an change in infrastructure demands getting rid of some files and moving others. This section deals with several methods for dealing with such file management issues in CVS.</p>
d46 1
a46 1
  <p><i>Releasing</i> refers to a way of designating certain directories or modules that will no longer to be used in the project. The command to release is invoked within a working copy and effectively cancels cvs checkouts for the designated directories and their files. Unless these are expressly deleted, the files and directories actually remain intact within the repository, including all file revision history, but are no longer included in when working copies are checked out.</p>
d48 1
a48 1
  <p>The command to release a file or directory is:</p>
d50 1
a50 3
   <p>
<b>cvs rel filename</b> (or <b>/directory_name</b>)
</p>
d52 1
d54 1
a54 1
  <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_20.html#SEC122">More about releasing</a></p>
d56 1
a56 1
  <h3><a id="cvsremove" name="cvsremove">Removing files</a></h3>
d58 1
a58 1
  <p><i>Removing</i> is another way to get rid of files when you no longer want or need them to be part of the project's source repository. To do this, you must first delete the file from the working copy you have checked out on your local system.</p>
d60 1
a60 1
  <p>Then, to remove a file from the shared repository, type:</p>
d62 1
a62 3
  <blockquote class="c2">
   cvs remove filename
  </blockquote>
d64 1
a64 1
  <p>After you have removed one or more files, you must commit your changes.</p>
d66 1
a66 1
  <p>With "<b>cvs remove</b>" (or "<b>cvs rm</b>"), the old file is not completely eradicated but rather stored in CVS' so-called "attic" along with its complete revision history.</p>
d68 1
a68 2
  <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_12.html#SEC62">More about removing files</a><br />
   <a href="http://cvsbook.red-bean.com/cvsbook.html#What_Happens_When_You_Remove_A_File">What happens when you remove a file</a></p>
d70 4
a73 1
  <h3><a id="cvsrenameandmove" name="cvsrenameandmove">Renaming and moving files and directories</a></h3>
d75 1
a75 1
  <p>If you have imported some existing source code into your repository, you may have files and directories you want to rename or or move.</p>
d77 1
a77 1
  <p>The best way to rename a file in your working copy involves a series of steps. Use:</p>
d79 1
a79 3
  <blockquote class="c2">
   cvs rm old_filename
  </blockquote>
d81 1
a81 1
  <p>to remove the old name, then</p>
d83 1
a83 3
  <blockquote class="c2">
   cvs add new_filename
  </blockquote>
d85 1
a85 1
  <p>and finally,</p>
d87 1
a87 3
  <blockquote class="c2">
   cvs commit new_filename
  </blockquote>
d89 1
a89 1
  <p>There really is no specific way in CVS to remove or rename directories. However, you can produce that effect by creating a new directory, moving the files you need into it, removing unwanted files from the old directory, and then simply no longer using it. Later, you can "prune" these empty directories the next time you a check out a working copy by using:</p>
d91 1
a91 3
  <blockquote class="c2">
   cvs checkout -P
  </blockquote>
d93 1
a93 1
  <p>Another way to prune directories with no more files is to update with:</p>
d95 1
a95 3
  <blockquote class="c2">
   cvs update -dP
  </blockquote>
d97 1
a97 2
  <p><a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_14.html#SEC67">More about moving and renaming files</a><br />
   <a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_15.html#SEC71">More about moving and renaming directories</a></p>
d99 4
a102 1
  <h3><a id="cvsimport" name="cvsimport">Importing existing code?</a></h3>
d104 1
a104 1
  <p>If you have existing files to add to the project, you can import these into CVS using the following command:</p>
d106 1
a106 3
  <blockquote class="c2">
   cvs import filename
  </blockquote>
d108 1
a108 1
  <p>Importing allows you to add a lot of files at once, something like a super "cvs add." To import <i>all</i> existing directories and files, in your top level directory type:</p>
d110 1
a110 1
  <p class="c3">cvs import -m "log message" projectname</p>
d112 1
a112 1
  <p>This creates the files and directories in the CVS repository for your project on this site. If you want to preserve these files and directories in their original state, you may want to tag or archive this set of original files before you or any other developers begin checking out working copies of project files.</p>
d114 1
a114 1
  <p>If your existing files are already under versioning control -- either in another CVS repository or in a versioning different system such as RCS -- there is no automated method for importing existing files that retains file histories. Using the cvs import command, copying files over, or creating them as new files does not retain these histories.</p>
d116 1
a116 1
  <h3><a id="cvsandrcs" name="cvsandrcs">CVS and RCS</a></h3>
d118 1
a118 1
  <p>If you're already familiar with RCS, both RCS and CVS use a similar format for storing the version control histories of individual files. But you should be aware of at least two critical differences in adapting CVS:</p>
d120 1
a120 2
  <ul>
   <li>One of the central principals in RCS is file locking, which prevents other developers from checking out or modifying a file when you have checked it out. The benefit to file locking is that developers never have to deal with conflicting modifications within files. RCS protects files by only allowing them to be modified by one person at a time. Therefore, the drawback to RCS is: you can't commit your changes to a file while another developer has it checked out.</li>
d122 2
a123 2
   <li>The central tenant of CVS is to allow developers to check out, modify, and commit files concurrently, truly a benefit to projects with remote, geographically dispersed developers. The tradeoff is that on a CVS version controlled project, you can count on dealing with merge conflicts in files. The only method for resolving such conflicts is by hand-editing the file. Thus, project workflow with CVS ends up being a little different.</li>
  </ul>
d125 2
a126 1
  <p><a href="http://www.cvshome.org/cyclic/cyclic-pages/rcs.html">More about RCS and CVS</a></p>
d128 1
a128 1
  <h3><a id="keywords" name="keywords">Keyword substitution</a></h3>
d130 1
a130 1
  <p>Keyword substitution (a.k.a keyword expansion) is an RCS holdover that may be useful to you as a developer. Keywords essentially let you embed version information permanently in source files. A string containing the full version information associated with a particular keyword is substituted whenever the file is subsequently revised.</p>
d132 1
a132 1
  <p>As an example, including:</p>
d134 1
a134 3
  <blockquote class="c2">
   $Author: lori $
  </blockquote>
d136 1
a136 1
  <p>within the files permanently retains the login name of the user who checked in that revision.</p>
d138 1
a138 1
  <p>Keyword substitution is a method for tracking file versions once the files are no longer part of a CVS repository. Keyword substitution can also be configured and suppressed.</p>
d140 1
a140 1
  <p><a href="http://cvshome.org/docs/manual/cvs_12.html#SEC98">More about keywords (including a list of common keywords)</a></p>
d142 1
a142 1
  <h3><a id="aboutbranching" name="aboutbranching">Tagging and branching</a></h3>
d144 1
a144 1
  <p>The CVS repository for your project hosted on this site supports branching and tagging your source files. At certain points in your project, you may want to enable development work in your project to progress in more than one direction simultaneously. Instead of maintaining a singular, linear path of development, CVS branching provides a way to divert or split the source tree for ancillary development activities without impacting progress of the project's primary effort. Examples of reasons to branch include:</p>
d146 1
a146 2
  <ul>
   <li>to distinguish a clearly defined set of functionality in project source files for QA and testing, or</li>
d148 2
a149 2
   <li>when you want to try an experiment such as added features or functionality without affecting the project's progress.</li>
  </ul>
d151 2
a152 1
  <p>Tagging is included in the discussion about branching because the two operations are used in conjunction. Tagging allows you to "take a snapshot" of the overall project's state at a certain point in time, for example, to preserve a build with some particular characteristic. Because CVS manages individual file revisions, tagging is an important option for benchmarking the overall state of project source code. Files included in a tag will most likely be at different points in their respective revision numbering.</p>
d154 1
a154 1
  <p>The critical difference between branching and tagging is the reason they are complimentary operations:</p>
d156 1
a156 4
  <blockquote>
   <p>
Branching affects <i>individual files'</i> revision numbering, whereas tagging assigns a common identifying marker <i>across all project files</i> at a fixed point in time.
</p>
d158 1
a158 1
  </blockquote>
d160 1
a160 1
  <p>So, for example, project files are often tagged at the point where branches are created.</p>
d162 1
a162 1
  <p>Ultimately, branches in your project with successful outcomes get incorporated or merged back in to the main development trunk. When that happens -- and it may occur repeatedly on large or long-term projects -- identifying the point where this merge occurs is another reason to create a tag.</p>
d164 1
a164 1
  <p><a id="cvstag" name="cvstag">To tag project files, type:</a></p>
d166 1
a166 3
  <blockquote class="c2">
   cvs tag unique_tag_name
  </blockquote>
d168 1
a168 1
  <p>Your tag name can be a release name or date, a product version identifier, or whatever you choose.</p>
d170 1
a170 1
  <p><a id="cvsbranch" name="cvsbranch">To create a branch, type:</a></p>
d172 1
a172 3
  <blockquote class="c2">
   cvs tag -b unique_tag_name
  </blockquote>
d174 1
a174 1
  <p>Branching and tagging are complex topics with many considerations and options. You can find more comprehensive information and instructions in the following resources:</p>
d176 2
a177 3
  <ul>
   <li>cvshome.org: <a href="http://www.cvshome.org/docs/manual/cvs_4.html#SEC48">"More about branching and tagging"</a><br />
   </li>
d179 1
a179 2
   <li>The Cederqvist Manual: <a href="http://www.gnu.org/manual/cvs/html_chapter/cvs_8.html#SEC50">"Branches"</a><br />
   </li>
d181 2
a182 3
   <li>
    <i>Open Source Development with CVS</i>:<br />
     
d184 2
a185 2
    <dl>
     <dd><a href="http://cvsbook.red-bean.com/cvsbook.html#Marking_A_Moment_In_Time__Tags_">"Marking A Moment In Time (Tags)"</a></dd>
d187 4
a190 4
     <dd><a href="http://cvsbook.red-bean.com/cvsbook.html#Branches">"Branches"</a></dd>
    </dl>
   </li>
  </ul>
d192 3
a194 2
  <div class="courtesylinks">
   <a href="/servlets/HelpTOC">Back to main Help index</a>
d196 3
a198 3
 </div>
</body>
</html>
@


1.4
log
@index revisions and other general html edits
@
text
@d1 234
a234 194
<HTML>
<HEAD>
<TITLE>Managing project files with CVS</TITLE>
</HEAD>
<BODY>
<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="3" BORDER="0" WIDTH="100%">
  <TR>
    <SPAN CLASS="Header">Managing project files and directories with command line CVS</SPAN>
<P>
<SPAN CLASS="PlainText"><B>CVS tool documents: Index</B>
<UL>
<DL>
<DT><A HREF="ddCVS.html">About source code version control with CVS</A>
<DT><A HREF="ddCVS_cvsglossary.html">A version control glossary</A>
<DD><A HREF="ddUsingCVS_command-line.html">Using command-line CVS to access project source files</A>
<DD><A HREF="ddCVS_cvscontributing.html">Contributing source code changes with CVS</A>
<DD><B>You are here: Managing project files and directories with CVS
<UL>
	<LI><A HREF="#cvsrelease">Releasing files</A>
	<LI><A HREF="#cvsremove">Removing files</A>
	<LI><A HREF="#cvsrename&move">Renaming and moving files</A>
	<LI><A HREF="#cvsimport">Importing existing source files</A>
	<LI><A HREF="#cvsandrcs">CVS and RCS</A>
	<LI><A HREF="#keywords">Using keywords</A>
	<LI><A HREF="#aboutbranching">Tagging and branching</A></B>
</UL>
<DT><A HREF="/servlets/HelpTOC">Back to main Help index</A>
</DL>
</UL>
<P>

<HR NOSHADE SIZE=1>
<A NAME="cvsrelease"></A><SPAN CLASS="InputHeader">Releasing files and directories</SPAN>
<P>
At certain point in a project's development cycle, managing your project's source repository invariably involves dealing with files and directories that have become deprecated or obsolete. The decision is made to abandon a certain piece of functionality within a module, for example. Or perhaps an change in infrastructure demands getting rid of some files and moving others. This section deals with several methods for dealing with such file management issues in CVS.
<P>
<I>Releasing</I> refers to a way of designating certain directories or modules that will no longer to be used in the project. The command to release is invoked within a working copy and effectively cancels cvs checkouts for the designated directories and their files. Unless these are expressly deleted, the files and directories actually remain intact within the repository, including all file revision history, but are no longer included in when working copies are checked out.
<P>
The command to release a file or directory is:
<BLOCKQUOTE>
<B>cvs rel filename</B> (or <B>/directory_name</B>)
</BLOCKQUOTE>
<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_20.html#SEC122" TARGET="_new">More about releasing</A>
<P>

<HR NOSHADE SIZE=1>
<A NAME="cvsremove"></A><span class="InputHeader">Removing files</SPAN>
<P>
<I>Removing</I> is another way to get rid of files when you no longer want or need them to be part of the project's source repository. To do this, you must first delete the file from the working copy you have checked out on your local system.
<P>
Then, to remove a file from the shared repository, type: <BR>
<BLOCKQUOTE>
          <B>cvs remove filename</B>
</BLOCKQUOTE>
After you have removed one or more files, you must commit your changes. 
<P>
With &quot;<B>cvs remove</B>&quot (or &quot;<B>cvs rm</B>&quot), the old file is not completely eradicated but rather stored in CVS' so-called "attic" along with its complete revision history.
<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_12.html#SEC62" TARGET="_new">More about removing files</A><BR>
<A HREF="http://cvsbook.red-bean.com/cvsbook.html#What_Happens_When_You_Remove_A_File" TARGET="_new">What happens when you remove a file</A>
<P>

<HR NOSHADE SIZE=1>
<A NAME="cvsrename&move"></A><SPAN CLASS="InputHeader">Renaming and moving files and directories</SPAN>

<P>If you have imported some existing source code into your repository, you may have files and directories you want to rename or or move.

<P>The best way to rename a file in your working copy involves a series of steps. Use:
<BLOCKQUOTE>
<B>cvs rm old_filename</B>
</BLOCKQUOTE>
to remove the old name, then 
<BLOCKQUOTE>
<B>cvs add new_filename</B> 
</BLOCKQUOTE>
and finally,
<BLOCKQUOTE>
<B>cvs commit new_filename</B>
</BLOCKQUOTE>

<P>
There really is no specific way in CVS to remove or rename directories. However, you can produce that effect by creating a new directory, moving the files you need into it, removing unwanted files from the old directory, and then simply no longer using it. Later, you can "prune" these empty directories the next time you a check out a working copy by using:
<BLOCKQUOTE>
<B>cvs checkout -P</B>
</BLOCKQUOTE>
Another way to prune directories with no more files is to update with:
<BLOCKQUOTE>
<B>cvs update -dP</B>
</BLOCKQUOTE>

<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_14.html#SEC67" TARGET="_new">More about moving and renaming files</A><BR>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_15.html#SEC71" TARGET="_new">More about moving and renaming directories</A>
<P>

<HR NOSHADE SIZE=1>
<A NAME="cvsimport"></A><SPAN CLASS="InputHeader">Importing existing code?</SPAN>
<P>
If you have existing files to add to the project, you can import these into CVS using the following command:
<BLOCKQUOTE>
		<B>cvs import filename</B>
</BLOCKQUOTE>

<P>
Importing allows you to add a lot of files at once, something like a super "cvs add." To import <I>all</I> existing directories and files, in your top level directory type:
<P>
<B>cvs import -m &quot;log message&quot projectname</B>
<P>
This creates the files and directories in the CVS repository for your project on this site. If you want to preserve these files and directories in their original state, you may want to tag or archive this set of original files before you or any other developers begin checking out working copies of project files.
<P>
If your existing files are already under versioning control -- either in another CVS repository or in a versioning different system such as RCS -- there is no automated method for importing existing files that retains file histories. Using the cvs import command, copying files over, or creating them as new files does not retain these histories.
<P>

<HR NOSHADE SIZE=1>
<A NAME="cvsandrcs"></A><SPAN CLASS="InputHeader">CVS and RCS</SPAN>
<P>
If you're already familiar with RCS, both RCS and CVS use a similar format for storing the version control histories of individual files. But you should be aware of at least two critical differences in adapting CVS:
<P>
<UL>
<LI>One of the central principals in RCS is file locking, which prevents other developers from checking out or modifying a file when you have checked it out. The benefit to file locking is that developers never have to deal with conflicting modifications within files. RCS protects files by only allowing them to be modified by one person at a time. Therefore, the drawback to RCS is: you can't commit your changes to a file while another developer has it checked out.
<LI>The central tenant of CVS is to allow developers to check out, modify, and commit files concurrently, truly a benefit to projects with remote, geographically dispersed developers. The tradeoff is that on a CVS version controlled project, you can count on dealing with merge conflicts in files. The only method for resolving such conflicts is by hand-editing the file. Thus, project workflow with CVS ends up being a little different.
</UL>
<P>
<A HREF="http://www.cvshome.org/cyclic/cyclic-pages/rcs.html" TARGET="_new">More about RCS and CVS</A>
<P>

<HR noShade SIZE=1>
<A NAME="keywords"></A><SPAN CLASS="InputHeader">Keyword substitution</SPAN>
<P>
Keyword substitution (a.k.a keyword expansion) is an RCS holdover that may be useful to you as a developer. Keywords essentially let you embed version information permanently in source files. A string containing the full version information associated with a particular keyword is substituted whenever the file is subsequently revised. 
<P>
As an example, including:
<BLOCKQUOTE>
<B>$Author: yourname $</B>
</BLOCKQUOTE>
within the files permanently retains the login name of the user who checked in that revision.
<P>Keyword substitution is a method for tracking file versions once the files are no longer part of a CVS repository. Keyword substitution can also be configured and suppressed.
<P>
<A HREF="http://cvshome.org/docs/manual/cvs_12.html#SEC98" TARGET="_new">More about keywords (including a list of common keywords)</A>
<P>

<HR NOSHADE SIZE=1>
<A NAME="aboutbranching"></A><SPAN CLASS="InputHeader">Tagging and branching </SPAN>
<P>
The CVS repository for your project hosted on this site supports branching and tagging your source files. At certain points in your project, you may want to enable development work in your project to progress in more than one direction simultaneously. Instead of maintaining a singular, linear path of development, CVS branching provides a way to divert or split the source tree for ancillary development activities without impacting progress of the project's primary effort. Examples of reasons to branch include:
<UL>
<LI>to distinguish a clearly defined set of functionality in project source files for QA and testing, or
<LI>when you want to try an experiment such as added features or functionality without affecting the project's progress.
</UL>
<P>
Tagging is included in the discussion about branching because the two operations are used in conjunction. Tagging allows you to "take a snapshot" of the overall project's state at a certain point in time, for example, to preserve a build with some particular characteristic. Because CVS manages individual file revisions, tagging is an important option for benchmarking the overall state of project source code. Files included in a tag will most likely be at different points in their respective revision numbering.
<P>
The critical difference between branching and tagging is the reason they are complimentary operations:
<BLOCKQUOTE>
Branching affects <I>individual files'</I> revision numbering, whereas tagging assigns a common identifying marker <I>across all project files</I> at a fixed point in time.
</BLOCKQUOTE>
So, for example, project files are often tagged at the point where branches are created.
<P>
Ultimately, branches in your project with successful outcomes get incorporated or merged back in to the main development trunk. When that happens -- and it may occur repeatedly on large or long-term projects -- identifying the point where this merge occurs is another reason to create a tag.
<P>
<A NAME="cvstag"></A>To tag project files, type:
<BLOCKQUOTE>
<B>cvs tag unique_tag_name</B>
</BLOCKQUOTE>
<P>
Your tag name can be a release name or date, a product version identifier, or whatever you choose.
<P>
<A NAME="cvsbranch"></A>To create a branch, type:
<BLOCKQUOTE>
<B>cvs tag -b unique_tag_name </B>
</BLOCKQUOTE>
<P>
Branching and tagging are complex topics with many considerations and  options. You can find more comprehensive information and instructions in the following resources:
<P> 
<UL>
<DL>
<DT><LI>cvshome.org: <A HREF="http://www.cvshome.org/docs/manual/cvs_4.html#SEC48" TARGET="_new">"More about branching and tagging"</A><BR>
<DT><LI>The Cederqvist Manual: <A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_8.html#SEC50" TARGET="_new">"Branches"</A><BR>
<DT><LI><I>Open Source Development with CVS</I>:<BR>
<DD><A HREF="http://cvsbook.red-bean.com/cvsbook.html#Marking_A_Moment_In_Time__Tags_" TARGET="_new">"Marking A Moment In Time (Tags)"</A>
<DD><A HREF="http://cvsbook.red-bean.com/cvsbook.html#Branches" TARGET="_new">"Branches"</A>
</UL>
</DL>
<P>

<HR NOSHADE SIZE=1>
<A HREF="/servlets/HelpTOC">Back to main Help index</A></P></SPAN>

</SPAN> 
</TR>
</TABLE>
</BODY>
</HTML>@


1.3
log
@added <title> tags to all files
@
text
@d3 1
a3 3

<TITLE>File Management with Command-Line CVS</TITLE>

d8 3
a10 7
    <TD CLASS="Header" NOWRAP>File management with command-line CVS</TD>
  </TR>
</TABLE>

<TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2" BORDER="0" WIDTH="100%">
  <TR>
<SPAN CLASS="PlainText">
d13 15
a27 7
<DT><A HREF="#managing">Managing project files and directories</A>
	<DD><A HREF="#cvsrelease">Releasing</A>
	<DD><A HREF="#cvsremove">Removing</A>
	<DD><A HREF="#cvsrename&move">Renaming and moving</A>
<DT><A HREF="#aboutbranching">Tagging and branching</A>
	<DD><A HREF="#cvstag">Creating tags</A>
	<DD><A HREF="#cvsbranch">Creating branches</A>
d31 3
a33 1
<A NAME="managing"><span class="InputHeader">Managing project files</SPAN></A>
a36 2
<A NAME="cvsrelease"></A><SPAN CLASS="InputHeader">Releasing files and directories</SPAN>
<P>
d46 5
a50 1
<A NAME="cvsremove"></A><P><I>Removing</I> is another way to get rid of files when you no longer want or need them to be part of the project's source repository. To do this, you must first delete the file from the working copy you have checked out on your local system.
d58 1
a58 1
With &quot<B>cvs remove</B>&quot (or &quot<B>cvs rm</B>&quot), the old file is not completely eradicated but rather stored in CVS' so-called "attic" along with its complete revision history.
d62 1
d64 1
a64 1
<P>
d95 1
d97 7
d106 38
d156 1
a156 1
 Branching affects <I>individual files'</I> revision numbering, whereas tagging assigns a common identifying marker <I>across all project files</I> at a fixed point in time.
d163 1
a163 1
<blockquote>
d170 1
a170 1
<blockquote>
d181 1
a181 1
<DD><A HREF="http://cvsbook.red-bean.com/cvsbook.html#Marking_A_Moment_In_Time__Tags_" target="_new">"Marking A Moment In Time (Tags)"</A>
d185 1
d187 2
a188 4

<HR noShade SIZE=1>
<a href="Help.html">Back to main Help index</a></p></span>

d192 3
a194 2
</TABLE></BODY>
</HTML>
@


1.2
log
@removed window's nasty line breaks, and corrected more links in HelpBox files
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d1 7
d140 2
a141 1
</TABLE>@


1.1
log
@new and revised help documentation for v1.0
@
text
@d1 132
a132 132
<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="3" BORDER="0" WIDTH="100%">
  <TR>
    <TD CLASS="Header" NOWRAP>File management with command-line CVS</TD>
  </TR>
</TABLE>

<TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2" BORDER="0" WIDTH="100%">
  <TR>
<SPAN CLASS="PlainText">
<UL>
<DL>
<DT><A HREF="#managing">Managing project files and directories</A>
	<DD><A HREF="#cvsrelease">Releasing</A>
	<DD><A HREF="#cvsremove">Removing</A>
	<DD><A HREF="#cvsrename&move">Renaming and moving</A>
<DT><A HREF="#aboutbranching">Tagging and branching</A>
	<DD><A HREF="#cvstag">Creating tags</A>
	<DD><A HREF="#cvsbranch">Creating branches</A>
</DL>
</UL>
<P>
<A NAME="managing"><span class="InputHeader">Managing project files</SPAN></A>
<P>
At certain point in a project's development cycle, managing your project's source repository invariably involves dealing with files and directories that have become deprecated or obsolete. The decision is made to abandon a certain piece of functionality within a module, for example. Or perhaps an change in infrastructure demands getting rid of some files and moving others. This section deals with several methods for dealing with such file management issues in CVS.
<P>
<A NAME="cvsrelease"></A><SPAN CLASS="InputHeader">Releasing files and directories</SPAN>
<P>
<I>Releasing</I> refers to a way of designating certain directories or modules that will no longer to be used in the project. The command to release is invoked within a working copy and effectively cancels cvs checkouts for the designated directories and their files. Unless these are expressly deleted, the files and directories actually remain intact within the repository, including all file revision history, but are no longer included in when working copies are checked out.
<P>
The command to release a file or directory is:
<BLOCKQUOTE>
<B>cvs rel filename</B> (or <B>/directory_name</B>)
</BLOCKQUOTE>
<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_20.html#SEC122" TARGET="_new">More about releasing</A>
<P>
<A NAME="cvsremove"></A><P><I>Removing</I> is another way to get rid of files when you no longer want or need them to be part of the project's source repository. To do this, you must first delete the file from the working copy you have checked out on your local system.
<P>
Then, to remove a file from the shared repository, type: <BR>
<BLOCKQUOTE>
          <B>cvs remove filename</B>
</BLOCKQUOTE>
After you have removed one or more files, you must commit your changes. 
<P>
With &quot<B>cvs remove</B>&quot (or &quot<B>cvs rm</B>&quot), the old file is not completely eradicated but rather stored in CVS' so-called "attic" along with its complete revision history.
<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_12.html#SEC62" TARGET="_new">More about removing files</A><BR>
<A HREF="http://cvsbook.red-bean.com/cvsbook.html#What_Happens_When_You_Remove_A_File" TARGET="_new">What happens when you remove a file</A>

<P>
<A NAME="cvsrename&move"></A><SPAN CLASS="InputHeader">Renaming and moving files and directories</SPAN>

<P>If you have imported some existing source code into your repository, you may have files and directories you want to rename or or move.

<P>The best way to rename a file in your working copy involves a series of steps. Use:
<BLOCKQUOTE>
<B>cvs rm old_filename</B>
</BLOCKQUOTE>
to remove the old name, then 
<BLOCKQUOTE>
<B>cvs add new_filename</B> 
</BLOCKQUOTE>
and finally,
<BLOCKQUOTE>
<B>cvs commit new_filename</B>
</BLOCKQUOTE>

<P>
There really is no specific way in CVS to remove or rename directories. However, you can produce that effect by creating a new directory, moving the files you need into it, removing unwanted files from the old directory, and then simply no longer using it. Later, you can "prune" these empty directories the next time you a check out a working copy by using:
<BLOCKQUOTE>
<B>cvs checkout -P</B>
</BLOCKQUOTE>
Another way to prune directories with no more files is to update with:
<BLOCKQUOTE>
<B>cvs update -dP</B>
</BLOCKQUOTE>

<P>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_14.html#SEC67" TARGET="_new">More about moving and renaming files</A><BR>
<A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_15.html#SEC71" TARGET="_new">More about moving and renaming directories</A>


<P>
<A NAME="aboutbranching"></A><SPAN CLASS="InputHeader">Tagging and branching </SPAN>
<P>
The CVS repository for your project hosted on this site supports branching and tagging your source files. At certain points in your project, you may want to enable development work in your project to progress in more than one direction simultaneously. Instead of maintaining a singular, linear path of development, CVS branching provides a way to divert or split the source tree for ancillary development activities without impacting progress of the project's primary effort. Examples of reasons to branch include:
<UL>
<LI>to distinguish a clearly defined set of functionality in project source files for QA and testing, or
<LI>when you want to try an experiment such as added features or functionality without affecting the project's progress.
</UL>
<P>
Tagging is included in the discussion about branching because the two operations are used in conjunction. Tagging allows you to "take a snapshot" of the overall project's state at a certain point in time, for example, to preserve a build with some particular characteristic. Because CVS manages individual file revisions, tagging is an important option for benchmarking the overall state of project source code. Files included in a tag will most likely be at different points in their respective revision numbering.
<P>
The critical difference between branching and tagging is the reason they are complimentary operations:
<BLOCKQUOTE>
 Branching affects <I>individual files'</I> revision numbering, whereas tagging assigns a common identifying marker <I>across all project files</I> at a fixed point in time.
</BLOCKQUOTE>
So, for example, project files are often tagged at the point where branches are created.
<P>
Ultimately, branches in your project with successful outcomes get incorporated or merged back in to the main development trunk. When that happens -- and it may occur repeatedly on large or long-term projects -- identifying the point where this merge occurs is another reason to create a tag.
<P>
<A NAME="cvstag"></A>To tag project files, type:
<blockquote>
<B>cvs tag unique_tag_name</B>
</BLOCKQUOTE>
<P>
Your tag name can be a release name or date, a product version identifier, or whatever you choose.
<P>
<A NAME="cvsbranch"></A>To create a branch, type:
<blockquote>
<B>cvs tag -b unique_tag_name </B>
</BLOCKQUOTE>
<P>
Branching and tagging are complex topics with many considerations and  options. You can find more comprehensive information and instructions in the following resources:
<P> 
<UL>
<DL>
<DT><LI>cvshome.org: <A HREF="http://www.cvshome.org/docs/manual/cvs_4.html#SEC48" TARGET="_new">"More about branching and tagging"</A><BR>
<DT><LI>The Cederqvist Manual: <A HREF="http://www.gnu.org/manual/cvs/html_chapter/cvs_8.html#SEC50" TARGET="_new">"Branches"</A><BR>
<DT><LI><I>Open Source Development with CVS</I>:<BR>
<DD><A HREF="http://cvsbook.red-bean.com/cvsbook.html#Marking_A_Moment_In_Time__Tags_" target="_new">"Marking A Moment In Time (Tags)"</A>
<DD><A HREF="http://cvsbook.red-bean.com/cvsbook.html#Branches" TARGET="_new">"Branches"</A>
</UL>
</DL>


<HR noShade SIZE=1>
<a href="Help.html">Back to main Help index</a></p></span>


</SPAN> 
</TR>
@

