CodeMatrix supports concurrent change through branches and
workspaces. Users make their changes in private
workspaces, and branches represent separate strands of
development. For more information on how branches and
workspaces are used in practice to support various
development strategies see our report
CodeMatrix strategies.
At various times in the development cycle changes in one
branch or workspace will need to be combined with those in
another. The specific situations are;-
- Changes from a parent branch to a workspace to
include other user's changes.
- Changes from a workspace to a parent branch to
include changes in the main strand.
- Changes between branches to keep common parts up to
date.
Merging changes from a parent branch to a workspace is
known as 'integration'.
Merging changes from a workspace to the parent, or between
is known as 'promotion'.
Because all testing and validation is performed within a
workspace and should be done with an up to date file set
CodeMatrix will not allow promotion of a workspace when
there are unintegrated changes pending in the parent
branch.
CXInsight provides wizards to guide you through the
process of integration and promotion. Right click the
branch or workspace and select 'Integrate' or 'Promote'.
The wizards are similar, the differences are noted in the
description of the integrate wizard below.
The selection confirmation page below allows the user
to double check the selection. CodeMatrix determines the
'natural' targets for the operation based on previous
branching operations and lists the choices where
appropriate. For an integration operation there is only
ever one source, the parent branch shown on the left below
and one target, the selected workspace shown on the
right below.
For a promotion operation between branches a mounted
workspace is needed in the target branch.
Notice that the direction of change flow is clearly
indicated.
Note that integration into checked out files is supported,
but not recommend. If changes are integrated into a
checked out file there is no mechanism to return to the
previous state. It is therefore recommended that files be
checked in before integration.
The 'promote' wizard has the following extra option

Files must be checked in before promotion. Selecting
this option instructs CodeMatrix to check in the workspace
files automatically.
The next stage is the automated merge. During this
stage a screen with the following items is shown.


You can track the progress of the merge and tailor the
display with the options shown.
For integrate only; if any
conflicting changes are found the 'manual conflict
resolution' page is shown. Because promotion of
unintegrated changes is not permitted conflicts can not
occur during promotion operations.
Use the options on this page to
analyse and resolve each conflicting change. The following
screen shot show a typical conflict in a text file. Select
the most appropriate option button on the right to resolve
the conflict. The actions of the buttons are described
below with reference to the example screen shot. Once all
conflicts for a file are resolved the program moves on to
the next file with conflicts. You can select any file from
the conflict list if you wish to process the files in a
different order. Once all files are dealt with the wizard
moves on to the final screen.

Accept their change
The following line is inserted into the target file in the
conflict location.
#include "NewInclude.h"
Accept our change
The following line is inserted into the target file in the
conflict location.
#include "NewInclude2.h"
Accept both changes
The following lines are inserted into the target file in
the conflict location.
#include "NewInclude.h"
#include
"NewInclude2.h"
Keep conflict
The following lines are inserted into the target file in
the conflict location. Note that the conflict start marker
is changed so CodeMatrix no longer considers this a
conflict. The conflict will still need to be resolved
manually later.
->>>>>>>>>>>>>>>>>>>> CodeMatrix detected conflict
start (1) >>>>>>>>>>>>
#include "NewInclude.h"
>>>>>>>>>>>>>>>>>>>> CodeMatrix detected conflict start
(2) >>>>>>>>>>>>>
#include "NewInclude2.h"
<<<<<<<<<<<<<<<<<<<< CodeMatrix detected conflict end
<<<<<<<<<<<<<<<<<
Edit Merged file
The default editor for the file type specified in
CXInsight options
is launched for the target file. You can then resolve the
conflicts manually. Remove or change the marker tags to
indicate to CodeMatrix that the conflict is resolved.
Accept merged
The target file is accepted complete with all conflicts
and markers.
For non-text files a
slightly different screen is show with the following
options. You can choose to edit either file and
subsequently accept your edited file or either unchanged
file.

|