Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
That's not entirely correct.

CVS moves files that you have removed to a directory named Attic. The directory is also under version control, meaning all of the logs are maintained on the old file.

You can access the files later using cvs update. First, assume is at version 1.1. Then, assume the following sequence of commands to rename the file under version control:

$ mv $ cvs add $ cvs remove $ cvs commit -m "Renamed to" cvs commit: Examining . Removing; /home/cvs/personal/projects/music/scripts/,v <-- new revision: delete; previous revision: 1.1 done RCS file: /home/cvs/personal/projects/music/scripts/,v done Checking in; /home/cvs/personal/projects/music/scripts/,v <-- initial revision: 1.1 done

You haven't really removed from the repository. CVS has stored the file in the Attic directory so that you still have access to it. To access just the log:

$ cvs log RCS file: /home/cvs/personal/projects/music/scripts/Attic/,v Working file: head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2003/03/08 04:04:23; author: dwc; state: dead; lines: +0 -0 Renamed to ---------------------------- revision 1.1 date: 2003/03/08 04:03:53; author: dwc; state: Exp; Initial checkin ======================================================================

If you want back, you simply have to issue an update:

$ cvs update -r 1.1 -p > =================================================================== Checking out RCS: /home/cvs/personal/projects/music/scripts/Attic/,v VERS: 1.1 ***************

This is a special update that avoids using sticky revision tags. As far as I know, it must be specified to add a file back to the main repository that was previously removed. After recreating from the previous revision, use the following sequence of commands to add it back to the repository:

$ cvs add $ cvs commit -m "Readded"

I will admit that this is a fairly ugly way of dealing with the problem of renaming files and maintaining the versions on the old file, but saying that CVS throws away the log on the old file is misleading. After adding back to the main repository, the log file would look as you expect:

$ cvs log RCS file: /home/cvs/personal/projects/music/scripts/,v Working file: head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2003/03/08 03:57:56; author: dwc; state: Exp; lines: +0 -0 Readded ---------------------------- revision 1.2 date: 2003/03/08 03:55:18; author: dwc; state: dead; lines: +0 -0 Renamed to ---------------------------- revision 1.1 date: 2003/03/08 03:54:05; author: dwc; state: Exp; Initial checkin ======================================================================

I would argue that this is safer than editing the RCS admin files. If you make a mistake, all the developers on your team will have problems with the repository. This way, the developers will only see the files being removed or added after you have committed your changes.

In general, to make sense of all the different versions in a repository, I prefer to use ViewCVS, a Web interface to CVS repositories similar to CVSweb. It gives a very nice interface to the repository, including displaying files in the Attic.

Update: Added missing close code tag.


In reply to Re[2]: Using CVS for revision control by PotPieMan
in thread Using CVS for revision control by trs80

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Lady_Aleena]: Discipulus, Hello there. How are you?
    [Lady_Aleena]: Good GUH Discipulus! Do you have enough links there?
    [Discipulus]: here quite well thanks. still alive. Unfortunately I have the 64Kb limit
    Discipulus now is read a book to my daugther time. Just after she and mother stop yelling in the bathroom
    [Lady_Aleena]: See you later, Discipulus. Have fun reading to your daughter.
    Discipulus still yelling..;=(

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (7)
    As of 2017-09-24 18:25 GMT
    Find Nodes?
      Voting Booth?
      During the recent solar eclipse, I:

      Results (274 votes). Check out past polls.