[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Merging just my changes from a branch to head?
From: |
Todd Denniston |
Subject: |
Re: Merging just my changes from a branch to head? |
Date: |
Wed, 09 Apr 2008 10:35:07 -0400 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080213) |
Peter Kahn wrote, On 04/09/2008 10:01 AM:
Thanks ,but that wasn't really my question and automatic propagation doesn't
sound like a CVS feature. I think my lack of a concrete example is a
problem, so let me re-write this with one. Here is what I'm looking to do:
bob made 100s of changes to the R1_5 branch for the admin module
bob would like to merge his changes, and only his changes from the
R1_5_BRANCH to the HEAD
bob can find all of his changes with a command like this
cvs rlog -r R1_5_BRANCH -wbob admin viewer
the question is: is there a cvs way to construct a merge command from that
list or do I need to involve my favorite scripting language and some regular
expressions to massage it into tags that I can use for the update/merge
command?
My idea was this:
parse the log to find earliest version for each file in the list and add it
to a tag BOB_FIRST_CHANGE
parse the log to find the latest version for each file in the list and add
it to a tag BOB_MOST_RECENT_CHANGE
cvs co -dMergeAdmin admin
cvs up -DMergeAdmin -j BOB_FIRST_CHANGE -j BOB_MOST_RECENT_CHANGE admin
resolve the conflicts
cvs ci -m "merged bob's changes from R1_5" MergeAdmin
Is there an easier way or is this the right track?
with out tags already there it will be fun, but there are some helpers already.
cvs2cl[1][2] will look at your repository and group the commit logs (assuming
you used the same commit message for a coherent checkin, instead of one new
comment per file), by grouping the commit logs you should be able to see WHEN
each of the checkin's happened, and using that info you could then use either
a combination of 'checkout -D' and 'tag
[BOB_FIRST_CHANGE|BOB_MOST_RECENT_CHANGE]' or 'rtag -D' to apply tags, and
then do the merge.
I prefer to do the checkout's so I can verify what I am taging first.
[1] http://www.red-bean.com/cvs2cl/
BTW, if you are on windows instead of Unix, you may need to use cvs2cl.py that
comes with CVSNT instead.
[2] I think you want to run as:
cvs2cl -t
so you can see any tags that may already be applied to groups of files.
On Tue, Apr 8, 2008 at 9:55 AM, Andy <address@hidden> wrote:
You wouldn't. My understanding of CVS is that you would have to
checkout the original head and apply your change there and then commit
it back into CVS. The change should then be automatically propagated
forwards to all the branches and the main trunk checkins made after
the head was created.
--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter