LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2007, 12:56 PM   #1
ve.ru
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Rep: Reputation: 0
CVS Newby question: how to do "svn revert filename" with CVS?


Hi,
I'm used to subversion, but now I have to work with CVS. I'd like to revert I all changes I've done on a specific file while keeping my changes done on other files. With subversion I would do "svn revert theFile", but I couldn't find out how to do this with CVS. All examples about reverting I found were about reverting all local changes.
Thanks in advance,
ve.ru
 
Old 01-27-2007, 01:31 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have a look at the section in Open Source Development with CVS that deals with reverting. From their example, if you decide that version 1.3 of a file is preferred over version 1.4 that was just checked in, you can revert the changes and create version 1.5 of the file with:
Code:
cvs update -j 1.4 -j 1.3 hello.c
cvs ci -m "reverted to 1.3 code" hello.c
 
Old 01-28-2007, 01:20 AM   #3
ve.ru
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your answer, but that isn't what I'm looking for. svn revert works on my local copy before my changes are checked in. It removes all changes I've done to that file and removes them witout having anything checked in. In this example the current version of this file is replaced by a previous one in the repository.

Thanks anyway,
ve.ru
 
Old 01-28-2007, 12:57 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Reverting local changes is different - and even simpler. This method retrieves the latest version from the repository and replaces your local copy with that. However it firstly moves your local, changed copy to another name:
Code:
cvs update -C hello.c
(Locally modified hello.c moved to .#hello.c.1.4)
U hello.c
In CVS, you can get help for a command by entering the command, followed by --help:
Code:
cvs update --help

Last edited by gilead; 01-28-2007 at 01:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running CVS Server on Fedora Core 4 with pserver as "cvs" user rupak Fedora 2 09-17-2005 02:06 PM
Running CVS Server with pserver as "cvs" user on Fedora Core 4 rupak Linux - Software 2 09-17-2005 12:10 PM
wincvs to cvs via pserver "encountered a problem" during login julianop Linux - Software 0 02-17-2005 09:09 PM
CVS: Can I restrict the "cvs remove" to specific users? CaptainRandom Linux - Software 4 01-13-2005 03:53 PM
cvs wine. Unable to download. Error "cvs: command not found" gonus Debian 5 08-03-2004 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration