You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by er...@mindspring.com on 2005/08/22 06:28:32 UTC

[OT] CVS help needed

I hope one of you fellow night owls can help me.

I have a CVS problem that doesn't come up much I guess. I need to merge files from the trunk to a branch. Note that this is the *opposite* of a common situation -- where the need is to merge files from a branch to the trunk.

A branch was created several days ago. However, I continued to commit to the trunk, whereas I should have immediately switched to the branch and started committing there. So now I have many files that are three or four versions ahead in the trunk, and those changes are needed in the branch.

How do I update my files in the branch with the latest versions of those files from the trunk, meanwhile keeping the sticky tag on the branch intact?

Thanks for any help,

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] CVS help needed

Posted by Craig McClanahan <cr...@gmail.com>.
On 8/21/05, erikweber@mindspring.com <er...@mindspring.com> wrote:
> I hope one of you fellow night owls can help me.
> 
> I have a CVS problem that doesn't come up much I guess. I need to merge files from the trunk to a branch. Note that this is the *opposite* of a common situation -- where the need is to merge files from a branch to the trunk.
> 
> A branch was created several days ago. However, I continued to commit to the trunk, whereas I should have immediately switched to the branch and started committing there. So now I have many files that are three or four versions ahead in the trunk, and those changes are needed in the branch.
> 
> How do I update my files in the branch with the latest versions of those files from the trunk, meanwhile keeping the sticky tag on the branch intact?
> 

I've never actually tried the direction you are talking about, but the
CVS online manual:

http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Branching_and_merging#Merging_an_entire_branch

implies that you can merge *from* the trunk as well as *to* the trunk
... the key is knowing that the argument to the "-j" option is the
magic branch name that denotes the trunk ... "HEAD".

> Thanks for any help,
> 

Worst case, you can always migrate individual files by a tedious brute
force technique.  Assume you've got a file named "Foo.java" and you
want to update the version on branch "Branch" with the current version
from the trunk:

cvs update -r HEAD Foo.java
mv Foo.java Foo.java.save
cvs update -r Branch Foo.java
mv Foo.java.save Foo.java
cvs commit

> Erik

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] CVS help needed

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Eric, when you say trunk, do you mean head?  If so, would it be feasible 
to just delete the tag for your branch and re-tag head with that tag? 
Assuming that ALL the changes in head are changes you want to add to the 
branch, I *think* this will have the desired effect.  Not sure if it has 
an undesirable effect on history, that might be my only concern.

I have incidentally done this once or twice myself, not by accident but 
just because something changed between the time I applied a tag and cut 
a release and I wanted the change in the release, which is of course 
based on a specific tag.  I haven't seen any problems doing it.

Frank

erikweber@mindspring.com wrote:
> I hope one of you fellow night owls can help me.
> 
> I have a CVS problem that doesn't come up much I guess. I need to merge files from the trunk to a branch. Note that this is the *opposite* of a common situation -- where the need is to merge files from a branch to the trunk.
> 
> A branch was created several days ago. However, I continued to commit to the trunk, whereas I should have immediately switched to the branch and started committing there. So now I have many files that are three or four versions ahead in the trunk, and those changes are needed in the branch.
> 
> How do I update my files in the branch with the latest versions of those files from the trunk, meanwhile keeping the sticky tag on the branch intact?
> 
> Thanks for any help,
> 
> Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> .
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org