[cvsnt] Mergepoints

Harrison, Andrew andy.harrison at anite.com
Tue Feb 24 11:03:57 GMT 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


> From: grstarrett at cox.net [mailto:grstarrett at cox.net]
> 
> > 
> > Also, I use WinCVS gui client, how can the merge be 
> performed using it?
> 
> I don't use WinCVS myself, perhaps someone who does could 
> comment.  I know there are a bunch who frequent this list.

I use WinCVS, so I'll try and help here, although I'm not sure if the way we
work is the 'normal' way of doing things given the number of 'corner' cases
we keep running into. (BTW Tony - Sorry, I think I've found another corner!
Another mail to follow once I've done a bit of investigating.) So the
following is the way we do things, and others probably do things
differently.

Ok, first a couple of definitions: A "branch" is an on going sequence of
revisions to files, whereas a "tag" is a static snapshot of the state of the
files. As a general rule if you are making changes with respect to
committing them to CVS then you should be working on a branch.

We have a main development branch called "Main_Dev". This branch contains
the latest 'stable' development build. To get the latest build click on the
"Update" Icon, and in "Update options" click "Retrieve rev/tag/branch" and
enter "Main_Dev" in the edit box. After the first time you've done this it
becomes 'sticky' and will always get the latest Main_Dev code when you do an
update, unless you specify something different. The current sticky tag is
displayed in the main WinCVS window with the file details. 

When an engineer is working on a change, he first gets the latest build from
the Main_Dev branch. He then creates a new branch "Branch1" (Obviously you
would call the branch something a bit more useful). Then do another update
and enter Branch1 in the "Retrieve rev/tag/branch" box. You now have your
new personal dev branch to work on.

As the engineer makes his changes, he can commit them to Branch1. The idea
is that this is his working area and it doesn't have to be a stable build,
and he's the only one changing it. Once his completed changes are stable and
committed to Branch1, he is ready to merge them into Main_Dev.

First update to Main_Dev again. You can either do this by doing the update
as above, or it's sometimes useful to do a Checkout Module to a new
directory so that you can have both versions on your local disk. It is
important that you have the Main_Dev branch (check in the file details in
CVS). If you have a different branch then you're merging into the wrong
place.

1. Doing the Merge:
1.1 Click on the update icon.
1.2. Tick the "Create Missing Directories" (you only *need* to do this if
new directories have been created in Branch1, but if you get into the habit
of doing it every time then you won't forget on that one time you need it).
1.3. In the "Merge Options" tab enter Branch1 in the "Only with this
rev/tag" box.
1.4. Click OK.
1.5. You should now see the merge happening in the window at the bottom of
WinCVS. If you want to, once it's completed scroll up and check the details
of what's happened. Any conflict will appear in here in red text. Conflicts
also appear in the main WinCVS window.

2. Check what's been merged (using flat mode)
2.1. Click the "Show All Committable Files Only" icon (left most of the row
of red icons)
2.2. Click on "Flat mode" (Curved Arrow pointing down & right)
2.3. You should now see a list of all the files that have been modified by
the merge. Any conflicts will be listed and need to be resolved now.

3. Resolving conflicts
3.1 A file with conflicts in will have conflict markers in it. It is up to
you to edit the file to make sure it is merged correctly. There are a number
of tools that can help you do this, but WinCVS doesn't seem to integrate
with them very well. This is where having the previous version on your local
disk helps.
3.2 If you need to get a previous revision to help with the manual merge,
it's easiest to get it from the graph:
3.2.1 Select the file you want to merge and click the Graph Icon (default
settings in dialog)
3.2.2 Right-Click on the revision you want and select "Retrieve revision
as..."
3.3 Repeat for all conflicts. As long as the time stamp on the file has
changed, WinCVS will assume the conflict has been resolved.

4. Commit the merged version
4.1 First deselect Flat mode & Committable files filter (in that order or
else it takes a while if you have lots of files!)
4.2 Select the uppermost directory
4.3 Click commit, enter the log string, click ok.
4.4 Tag the result.

And then you carry on the branch-modify-merge cycle. If one dev branch is
taking a while, the engineer might want to merge the Main_Dev branch into
his branch to take advantage of any changes since he branched. You do this
in the same way except with the branch names the other way round.

I hope that helps some, let me know if there's any specific bits you want me
to clarify.

Andy

--
Andy Harrison - Platform Software Engineer 
Anite Telecoms Ltd. 127 Fleet Road, Fleet, Hampshire, GU51 3QN, UK
"No matter how bad things seem... 
...nothing could be worse than being used as a towel rail." - A.A. Milne

Please note that my email domain has changed from @anitetelecoms.com to
@anite.com 
Registered in England No. 1721900 Registered Office: 353 Buckingham Avenue,
Slough, Berkshire SL1 4PF, United Kingdom 





Scanned for viruses by MessageLabs. The integrity and security of this message cannot be guaranteed. This email is intended for the named recipient only, and may contain confidential information and proprietary material. Any unauthorised use or disclosure is prohibited.


More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook