Discussion:
how do I undo local changes
(too old to reply)
MEENA SELVAM
2005-07-08 22:31:10 UTC
Permalink
Hi,
I checkedout a file from a repository for first time.
i modified it. but i do not want my changes. now i
want to do a cvs update to get others changes.

but i will be asked for merging. i want to avoid that
step. even i want to prevent automatic merging

so i need to undo the changes. in systems like
accurev, there is a purge command to discard the local
changes.

but in CVS I only find the cvs admin -o command to
revert to older versions. But how can i simply undo
the changes locally, without concerning about version?

meena



__________________________________
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/
Rahul
2005-07-08 22:49:05 UTC
Permalink
You can do :

1. cvs up -C <file>
You will see a msg similar to
(Locally modified license.props moved to .#license.props.1.1)

It will pull the latest from CVS tree and save the current changes in a
# file

2. rm <file> and pull again - cvs co/up


Regards,
Rahul Bhargava
CTO,
WANdisco
http://www.wandisco.com/cvs
Jason Sicotte
2005-07-08 23:10:09 UTC
Permalink
$ cvs -H up
Usage: cvs.exe update [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev]
-A Reset any sticky tags/date/kopts.
-P Prune empty directories.
-C Overwrite locally modified files with clean repository
copies.
( . . . )
-W spec Wrappers specification line.

Looks like you want -C
-----Original Message-----
Of MEENA SELVAM
Sent: Friday, July 08, 2005 6:27 PM
Subject: how do I undo local changes
Hi,
I checkedout a file from a repository for first time.
i modified it. but i do not want my changes. now i want to do
a cvs update to get others changes.
but i will be asked for merging. i want to avoid that step.
even i want to prevent automatic merging
so i need to undo the changes. in systems like accurev, there
is a purge command to discard the local changes.
but in CVS I only find the cvs admin -o command to revert to
older versions. But how can i simply undo the changes
locally, without concerning about version?
meena
Spiro Trikaliotis
2005-07-09 08:42:26 UTC
Permalink
Hello,
but in CVS I only find the cvs admin -o command to revert to older
versions. But how can i simply undo the changes locally, without
concerning about version?
From your statement, I am not sure if you correctly understand the
impliciations of the admin -o command. Thus, the following applies:

WARNING: DON'T DO THIS! ;) There is almost never a reason to do a cvs
admin -o, thus, be very careful unless you fully understand what that
means.

This command has NOTHING to do with what you want to achieve. Your task
can be done by removing the file before doing an update, or using up -C
(as Jason und Rahul said).

Best regards,
Spiro.
--
Spiro R. Trikaliotis http://cbm4win.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
Continue reading on narkive:
Loading...