[Top][All Lists]

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

Files Reverted with Trunk->Branch->Trunk Merge

From: das deniz
Subject: Files Reverted with Trunk->Branch->Trunk Merge
Date: 28 Aug 2003 04:38:47 -0700

single merge out to a branch and single merge back into trunk can
revert changes to all files that were created in the trunk after the
branch was created.

this is reproducible in all cvs versions tested 1.10, 1.11.2, 1.11.6

here are commands that can be used to reproduce this problem.
1) (start in up to date working area based on trunk)
   cvs tag -b branch_name
   (branch_name versions created, working area is still trunk)

2) cvs add new_file.c
   cvs ci -m "creation of file after branch created" new_file.c

3) cvs tag first_tag
   (mods to new_file)

4) cvs ci -m "mods to file after first_tag of trunk" new_file.c

5) cvs up -r branch_name
   (now in up to date working area based on branch: branch_name)
   cvs up -kk -j first_tag
   cvs ci -m "merge of first_tag out to branch_name"
   (creates branch rev of new_file.c based on HEAD version)
   (better would be to base version of file rev used for merge)

6) cvs up -d -P -A 
   (now in up to date working area based on trunk)
   cvs up -kk -j branch_name

7) cvs ci -m "merge of branch_name into trunk complete"

on completion of (7) the file contents of new_file.c are reverted to
first_tag version in trunk (loosing changed commited in (4)). i 'feel'
this is a problem though it seems currently to be 'correct' cvs

this is likely because there is no branch version created for files
which are created in the trunk after a branch was created. this does
not occur when creating new files in the branch because the trunk gets
a default version in the attic when files that are not in the trunk
are created in branches.

i only have a guess at the command options needed to avoid this
problem and, again i 'feel', the solution is not only 'non-intuitive'
but also 'non-cvs intuitive'.

6) cvs -kk -j first_tag -j branch_name  
   (diff trunk vs branch to get branch change-set 
   for merging into trunk? ok. but this is not what 
   all the cvs primers use for branch examples....)

would it be possible to make mods to CVS itself to use the revision of
the file used at the time of the merge out to the branch as the base
for the later creation of the new-born branch version?

please somebody pipe-up and tell me it's not 'just me'....



reply via email to

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