[Top][All Lists]

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

RE: Best method to overwrite someone's changes?

From: Jim.Hyslop
Subject: RE: Best method to overwrite someone's changes?
Date: Mon, 18 Apr 2005 15:53:38 -0400

address@hidden wrote:
> Or maybe this...
>    > cd to branchA sandbox
>    > cvs up -j branchA -j tag_yesterday_branchA 
>    > cvs commit

> >I found this e-mail (below) from Derek a while back. Can I use 
> >this method to revert a branch to a certain tag date? IOW,
> >
> >   > cvs up -r branchA -j tag_yesterday_branchA -j branchA
> >   > cvs commit
> >
> >Will this revert latest branchA's code to 
> tag_yesterday_branchA's code?

The two commands have two components to them. First, there's the question of
"cd to existing branch checkout" vs. "check out the branch", second there's
"which order do the -j options come?

The first one is the less complex of the two:

cd to branchA sandbox
cvs up -jX -jY


cvs up -r branchA -jX -jY

is not important. It's up to you.

What _is_ important is the order of the tags. To revert the changes you want
the newer tag specified _first_, followed by the older tag:

-j branchA -j tag_yesterday_branchA

You can, of course, always test it on one file and if it's wrong, just
revert to the repository version:

cvs up -jX -jY testfile
cvs di testfile
# oops - had it backwards - back out the merge
cvs up -C testfile

#and try again
cvs up -jY -jX testfile

Make sure there are no uncommitted changes, first, though!

Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( )
Columnist, C/C++ Users Journal ( )

reply via email to

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