Removing CVS files

Removing CVS files

Post by m.. » Thu, 13 May 1999 04:00:00



Howdy All,

I am a new CVS user and have begun a CVS repository on a Linux box.
All of my files are single branches (i.e. versions 1.1, 1.2, 1.3, 1.4
...)  I have a acouple of cases where I have commited a change for a
version that I now want to throw away.  It is always the latest version
that I want to do this for.  For instance,  I have versions 1.1 and 1.2
and I want to remove version 1.2 so that I can put a new 1.2 in its
place.  I understand the ramifications from a version management stand
point, but this is what I need to do.

Can somebody please tell me how to do this?  Please respond via email

Thanks,

Matt

--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

 
 
 

Removing CVS files

Post by Jim Kingdo » Thu, 13 May 1999 04:00:00


Quote:> For instance, I have versions 1.1 and 1.2 and I want to remove
> version 1.2 so that I can put a new 1.2 in its place.  I understand
> the ramifications from a version management stand point, but this is
> what I need to do.

In almost all cases you are better off putting a new 1.3 with the
contents of 1.1 (I know you say you understand the ramifications but
you don't say what would be wrong with 1.3).

In CVS see "undo" in the index of the Cederqvist, which points you to
something like:

cvs update -j 1.2 -j 1.1 foo.c

 
 
 

Removing CVS files

Post by Jochen Hollman » Fri, 14 May 1999 04:00:00



> I am a new CVS user and have begun a CVS repository on a Linux box.
> All of my files are single branches (i.e. versions 1.1, 1.2, 1.3, 1.4
> ...)

You are talking about all files are on the same branch (the HEAD), aren't
you ? (The different revisions are not called branches!)

Quote:> I have a acouple of cases where I have commited a change for a
> version that I now want to throw away.  It is always the latest version
> that I want to do this for.  For instance,  I have versions 1.1 and 1.2
> and I want to remove version 1.2 so that I can put a new 1.2 in its
> place.  I understand the ramifications from a version management stand
> point, but this is what I need to do.

No, it's not! The normal way to remove a version, that you don't what to have
anymore is to revert to an older version, e.g.

1.55 good version
1.56 bad versing, latest checkin

run

cvs up -r 1.55 -p file > file
cvs commit file

This will give you version 1.57 which is identically to 1.55
This is more likely what you want to have.

Removing the version 1.56 would easily result into to somebody else having
problems, because his reference to 1.56 would get stale!

- Jochen

 
 
 

Removing CVS files

Post by Jochen Hollman » Fri, 14 May 1999 04:00:00



> I am a new CVS user and have begun a CVS repository on a Linux box.
> All of my files are single branches (i.e. versions 1.1, 1.2, 1.3, 1.4
> ...)

You are talking about all files are on the same branch (the HEAD), aren't
you ? (The different revisions are not called branches!)

Quote:> I have a acouple of cases where I have commited a change for a
> version that I now want to throw away.  It is always the latest version
> that I want to do this for.  For instance,  I have versions 1.1 and 1.2
> and I want to remove version 1.2 so that I can put a new 1.2 in its
> place.  I understand the ramifications from a version management stand
> point, but this is what I need to do.

No, it's not! The normal way to remove a version, that you don't what to have
anymore is to revert to an older version, e.g.

1.55 good version
1.56 bad version, latest checkin

run

cvs up -r 1.55 -p file > file
cvs commit file

This will give you version 1.57 which is identically to 1.55
This is more likely what you want to have.

Removing the version 1.56 would easily result into to somebody else having
problems, because his reference to 1.56 would get stale!

- Jochen

 
 
 

1. removing a tag from a removed file in CVS

Let's say I have a file that has a tag on it.

cvs tag -F blah file

and that I'm using that tag to maintian a certain release elsewhere.  Now, say I
delete that file and don't want it as part of the 'blah' release.

rm file
cvs remove file

I cannot seem to remove the tag, and so if I update the 'blah' release, I get
the old version of the file.  The only solution I can think of is this:

cvs tag -d blah file
rm file
cvs remove file

which is kind of a pain because for every file that's already removed I can't
really do this.  Does anyone know of a better way to do it?

Dave

--

d  a  v  i  d . c o p e l a n d

    n o v o | i r o n l i g h t

voice            [415] 646.7026
  fax            [415] 646.7001

.      .     .    .   .  . ....

2. AcornSite Offline

3. CVS 1.10: how do I remove a file from CVS/Entries?

4. Help: Netscape fix?

5. CVS...removing files quest

6. Memory allocation/free - driver dispatch routine

7. cvs : removing and readding file

8. Network

9. Oops - need to reinstate files from 'cvs remove' for checkins

10. Oops - CVS files removed, still in Attic, want 'em back

11. CVS: how to maintain removed files from vendor release

12. cvs diff -r HEAD after removing files

13. Removing Ctrl-M's from files in CVS