Thanks Craig and Frank!

Merging is *scary* business, especially at 1 AM when they're doing a new build 
for QA in a few hours, and, I'm the only one here . . . . 

<gulp/>

:-)

Erik


-----Original Message-----
From: Craig McClanahan <[EMAIL PROTECTED]>
Sent: Aug 22, 2005 12:42 AM
To: Struts Users Mailing List <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [OT] CVS help needed

On 8/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to