Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CVS revision and tag

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a file "foo" it had

revision: 1.0
tag MyTag_1

Then I modified the file and committed it to CVS, I saw
revision: 1.1

And I tag it as
tag: MyTag_2

Then I realized I did something wrong. How do I roll back to revision 1.0 and tag it still as "MyTag_2" ?
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't actually roll back revisions in the sense of deleting them from CVS, but you can roll back your changes and make a third revision that looks just like the first one.

CVS tags can normally be re-assigned to later generations. I used to work in a shop, where they'd move the PRODUCTION tag each time we committed a new release candidate. So no problem there.

In fact, since there's no history on tag movement, CVS actually is deficient in that respect. Someone could move tags and recovery would be difficult.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With other words, what you should probably do is

- get the file contents of revision 1.0
- commit them (which gives them revision 1.2)
- move your tag to revision 1.2

I can't tell you the exact CVS commands to do so, because Eclipse hides all the details quite nicely...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic