FW: [cvsnt] Re: Regresssion and branches in the current sand box?

Siegfried Heintze siegfried at heintze.com
Fri Oct 1 06:11:01 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Oh -- I'm trying to answer my own question based on this old posting from
Glen I fished out of my mail folder.

I started with "cvs import -C -d -n -m initial test_and_examples". There was
no initial branch name. Is that my problem?

I edit, save changes, and commit with emacs.

So then I create the trunk by typing
"cvs tag trunk"

I made some changes and created a branch with the following command
"cvs tag -r trunk -b branch2"

I edit, save changes and commit.

Now I want to add revisions to the trunk. So I do (as per Glen's suggestion)


"cvs update -j HEAD -j trunk"

I make some changes and commit them.

Now I switch back to the branch

"cvs update -j HEAD -j branch2"

I get the message "Merging differences between 1.6 and 1.4 into
PseudoListBoxTest.cpp"

I don't want a merge! I want to switch!

I tried using "update -j HEAD -r trunk" but that does a merge too.

OK, now I see Bo's response to my other posting on this same subject.

So I try "cvs update -r branch2" but the comments in my source code indicate
I'm still in the trunk. What happened to branch2?

What is the difference between the "-j" and the "-r" in the update command?

I tried "cvs update -j HEAD -j 1.4.0.2" and that did a merge. Not what I
wanted.

Below is the result of "cvs log PseudoListBoxTest.cpp"

Thanks,
    Siegfried

RCS file:
/CVSTest/tests_and_examples/PseudoListBoxTest/PseudoListBoxTest.cpp,v
Working file: PseudoListBoxTest.cpp
head: 1.7
branch:
locks: strict
access list:
symbolic names:
	branch2: 1.4.0.2
	trunk: 1.4
	branch: 1.2.0.2
	main: 1.2
keyword substitution: kv
total revisions: 7;	selected revisions: 7
description:
----------------------------
revision 1.7
date: 2004/10/01 04:46:09;  author: siegfried;  state: Exp;  lines: +3 -3;
kopt: kv;  commitid: d4c415ce1110b0b;  mergepoint: 1.4;  filename:
PseudoListBoxTest.cpp;
modify the branch2
----------------------------
revision 1.6
date: 2004/10/01 04:34:50;  author: siegfried;  state: Exp;  lines: +3 -3;
kopt: kv;  commitid: 8c8415cde69025e;  mergepoint: 1.4;  filename:
PseudoListBoxTest.cpp;
Modify the trunk!
----------------------------
revision 1.5
date: 2004/10/01 04:29:56;  author: siegfried;  state: Exp;  lines: +4 -4;
kopt: kv;  commitid: 920415cdd447ea2;  filename: PseudoListBoxTest.cpp;
define branch2
----------------------------
revision 1.4
date: 2004/10/01 04:26:42;  author: siegfried;  state: Exp;  lines: +3 -3;
kopt: kv;  commitid: 670415cdc817c25;  filename: PseudoListBoxTest.cpp;
define trunk
----------------------------
revision 1.3
date: 2004/09/30 19:37:01;  author: siegfried;  state: Exp;  lines: +5 -3;
kopt: kv;  commitid: c10415c605d66c1;  filename: PseudoListBoxTest.cpp;
Test branch?
----------------------------
revision 1.2
date: 2004/09/30 19:24:05;  author: siegfried;  state: Exp;  lines: +4 -0;
kopt: kv;  commitid: e98415c5d555cdb;  filename: PseudoListBoxTest.cpp;
Test keywords
----------------------------
revision 1.1
date: 2004/09/23 04:50:08;  author: siegfried;  state: Exp;
initial
============================================================================
=




>
>
>-----Original Message-----
>From: cvsnt-bounces at cvsnt.org [mailto:cvsnt-bounces at cvsnt.org] On Behalf Of
Glen Starrett
>Sent: Monday, August 23, 2004 9:36 PM
>To: cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
>Subject: [cvsnt] Re: Regresssion and branches in the current sand box?
>
>Siegfried Heintze wrote:
>
>> I get confused when I use 
>> 
>> cvs update -r <branch or revision>
>> 
>> I get the files I want but when I try to edit and commit my changes, I
get
>> strange messages.
>> 
>> I found I can recover with "cvs update -A", but then I get the most
recent
>> stuff again.
>> 
>> What happens if 
>> (1) my current revision of a certain file is 1.6 and I want to abandon
1.6
>> and 1.5 and start editing with 1.4 to create 1.7? What are the commands
for
>> this? Do I have to create a new sandbox? 
>
>To revert the current version back to an older state:
>cvs up -j HEAD -j 1.4
>(the order of the -j's is important)
>
>> 
>> I suppose I could use "cvs update -r 1.4", load this into the editor,
then
>> do "cvs update -A", then finish editing and write the contents of the
editor
>> buffer to disk and "cvs commit". Hmmm... It seems there should be a
better
>> way.
>
>Or just rename the old one:
>cvs up -r 1.4 foo.c
>mv foo.c foo.c.1.4
>cvs up -A
>cp foo.c.1.4 foo.c
>
>...or check it out to stdout and redirect it back onto the real file:
>cvs co -p foo.c > foo.c
>(I think that works, never tried it)
>
>> 
>> (2) I have created a new branch and want to switch back and forth between
>> branches. After reading "Essential CVS", it looks like I have to check
out a
>> new sand box for each branch I want to edit. Is this correct? 
>
>No, unless you want to edit them at the same time.
>cvs up -CAdP -r mybranch
>
>> 
>> I was hoping it would just write the current branch to the current
>> directory.
>> 
>> Incidentally, does "cvs update -r " accept a revision number or a branch?
It
>> looks like it does from the documentation.
>
>Both.  Also a commit id, if you want to use one of those.  Straight from 
>"cvs -H up":
>
>     -r rev  Update using specified revision/tag (is sticky).
>
>
>> 
>> I suppose I could always release the current sandbox, check out the other
>> sandbox in the same directory, edit it, commit, release and checkout the
>> first branch again. Hmm.....
>>   Thanks,
>>         Siegfried
>> 
>
>
>-- 
>Glen Starrett
>_______________________________________________
>cvsnt mailing list
>cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
>http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook