[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Merging files between branches which did not exist at branch creatio
From: |
Kaz Kylheku |
Subject: |
Re: Merging files between branches which did not exist at branch creation |
Date: |
17 Oct 2002 13:54:22 -0700 |
Craig Andrews <address@hidden> wrote in message news:<address@hidden>...
> Hi all,
>
> I have a problem which is this. I have two branches of a repository, like
> this:
>
> 1.1 -> 1.2 -> 1.3
> \_1.1.2.1 BRANCH1
> \_1.1.4.1 BRANCH2
>
> If I add a file onto BRANCH2, then I want it also on BRANCH1, I have to
> manually merge the differences, like this:
>
> cvs up -j ORIGINAL_REVISION -j LATEST_REVISION filename
>
> I wondered if there is any way to add the file to BRANCH1 in such a way that
> I wouldn't have to do this. I.e.
>
> cvs up -j LATEST_REVISION filename
It sounds like this is what you are doing when you merge from BRANCH1
to the trunk, and would like the same ``convenience'' when merging
from BRANCH1 to BRANCH2.
Firstly, -j LATEST_REVISION only works once, even from a branch to the
trunk. After that, you have to track the last revision you have merged
and use two -j options, otherwise you will be repeatedly applying
existing patches.
The Meta-CVS software keeps track of inter-branch merging. So if you
added a file to branch-2, and needed to bring it to the trunk, and to
branch-1, you would do this:
mcvs sw branch-1 # switch to branch-1
mcvs merge branch-2 # merge latest stuff from branch-2
mcvs ci # commit, after verifying, resolving
conflicts, etc.
mcvs sw # no arguments, switch to main trunk
mcvs merge branch-2
mcvs ci
The program manages the underlying CVS tags that are required to do
this. It will independently keep track of what has been merged from
branch-2 to branch-2 and what has been merged from branch-2 to the
trunk. Moreover, it's relatively efficient, within the constraints
imposed by the CVS architecture: each merge operation requires only
one tagging of all of the files.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Merging files between branches which did not exist at branch creation,
Kaz Kylheku <=