Christian Robottom Reis wrote: > Hello there, > > I'm trying to merge a set of changes from HEAD to a > branch opened a > while back. The changes I would like to merge were committed to HEAD > between 2 days ago and today; I'll use ChangeLog as an example because > it's a file being actively changed on both HEAD and branch. I have the > file on a branch checkout: > > [EMAIL PROTECTED]:~/devel/IC-0.6$ cvs status ChangeLog > > =================================================================== > File: ChangeLog Status: Up-to-date > > Working revision: 1.222.2.5 > Repository revision: 1.222.2.5 > /cvs/IndexedCatalog/ChangeLog,v > Sticky Tag: INDEXED_CATALOG_0_6_0_branch > (branch: 1.222.2) > Sticky Date: (none) > Sticky Options: (none) > > Now let's say I want to merge in the referred changes. The > way I see it > (as per book and info reading) is: > > cvs up -j HEAD:"2 days ago" -j HEAD ChangeLog HEAD has a specific meaning - it means "the latest revision on the trunk [footnote]". Because you have specified an exact revision, the date component will be ignored (the date component can only be used with a _branch_ tag), so your command boils down to:
cvs up -j HEAD -j HEAD which tells CVS "Take the difference between revision 'HEAD' and revision 'HEAD', and apply that difference to my local file." Since the two revisions are identical, there is no difference and nothing to apply. If this is the first time you are merging (which I strongly suspect, given your question), then CVS will use the ancestor revision (in the specific example you provided, 1.222) as the implied starting point, allowing you to use only one tag: cvs up -j HEAD This will be the equivalent of: cvs up -j INDEXED_CATALOG_0_6_0 -j HEAD (assuming that you have a non-branch tag called INDEXED_CATALOG_0_6_0 applied to the branch point). After you have completed the merge, you need to apply a tag so that, on the next merge, you can specify *which* revisions need to be applied: cvs tag -rHEAD INDEXED_CATALOG_0_6_0_branch_last_merge Then, the next time you merge, the commands will be: cvs up -j INDEXED_CATALOG_0_6_0_branch_last_merge -j HEAD [fix up any conflicts, then check in] cvs tag -F -rHEAD INDEXED_CATALOG_0_6_0_branch_last_merge [Footnote] There is one exception - for the 'diff' command, HEAD means "the most recent revision in the currently-checked-out branch". -- Jim Hyslop Senior Software Designer Leitch Technology International Inc. (http://www.leitch.com) Columnist, C/C++ Users Journal (http://www.cuj.com/experts) _______________________________________________ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
