[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: rename in cvs]

From: Dave Storrs
Subject: Re: address@hidden: Re: rename in cvs]
Date: Wed, 10 Oct 2001 06:00:55 -0700 (PDT)

Hi Miklos,

        What he means is this:  let's say that you want to rename file
"foo.c" in your working copy to "bar.c", and you want the name change to
sync up in the repository, without losing any of "foo.c"'s version
history.  You would then do the following:

- Make sure no one else is accessing the repository right now.
- 'cd' into the repository, find the file named "foo.c,v"
- 'mv foo.c,v bar.c,v'

        I've done this and it works, as long as no one is doing a checkout
or update while you are renaming (if they are, results are undefined
(=="openly hostile", as K&R once remarked)).

        The only downside is that you will not be able to reconstruct the
project as it did before you did this rename...because CVS will not be
able to serve up the file "foo.c" file for you.

        Hope this helps.


On Wed, 10 Oct 2001, Miklos Quartus wrote:

> Hi info-cvs,
> Have you tried to rename a file and to retain the revision history? Karl
> suggested to cp the ,v file from the Repository. Which one?
> Any help would be appreciated. Thank you,
> Miklos
> ----- Forwarded message from address@hidden -----
> Envelope-to: address@hidden
> Subject: Re: rename in cvs
> X-MS-Has-Attach: 
> X-MS-TNEF-Correlator: 
> Thread-Topic: rename in cvs
> Thread-Index: AcFQ86RA2o3xmLzjEdWpXABQi2kYTQ==
> From: <address@hidden>
> To: "Miklos Quartus" <address@hidden>
> Reply-To: <address@hidden>
> You can cp the ,v file in the repository... (mail address@hidden for
> more details).
> Good luck,
> -Karl
> Miklos Quartus <address@hidden> writes:
> > I feel sorry that your laptop was stolen. I hope you can recover both
> > financially and mentally...:)
> > 
> > I have question about renaming in CVS. I understand what is written in
> > the book, but if I do rm and cp oldname newname and cvs add newname, 
> > than the modifications will be lost. Is there any way to preserve the
> > log and revision history for a file if rename it?
> > 
> > I checked the 1.21 version of the manual.
> > 
> > Looking forward to hearing of you,
> > -- 
> > Miklos Quartus
> > Nokia Research Center
> > Mobile Networks Laboratory
> > Phone: +358 50 4873093
> ----- End forwarded message -----
> -- 
> Miklos Quartus
> Nokia Research Center
> Mobile Networks Laboratory
> Phone: +358 50 4873093
> _______________________________________________
> Info-cvs mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]