RADE

Source Code Manager

adl_solve_merge

Solving merges

Quick Reference

Abstract

The adl_solve_merge command resolves all the conflict cases in a given workspace or in the current one. 


Synopsis

adl_solve_merge [object...|-file file] [-ws workspace_name] [-no_manual] [-h | -help | -?]

Usage

When a workspace is created with the [1] adl_mk_ws command, parameters are set automatically. To modify the parameters relatives to the merge's cases, you can run the [2] adl_set_merge command.
In a given workspace or in your current workspace, you can know what are the merges you have to resolve, running the [3] adl_ls_merge command.

To read more about merge's principle, you can see either the [4] "Merger User Interface article", either the [5] "Resolving Conflicting Changes article" with the merger article.

When conflicts must be resolved, it is possible to launch the command several times, as long as there are merges left. Each time the command is launched, there is a menu giving the merges to be resolved, allowing the selection of a merge. You can resolve merge by merge all the conflicts.

Several menus are available depending on the merges to resolve:
MergeMenus.gif (2745 bytes)

When the adl_solve_merge command is launched, it first displays the list of all the merges left, then a fist selection menu. Possible merge types are:

If a list of objects is specified in a file or in the command line, only merges concerning these objects are displayed and are to resolved.

Example:

adl_solve_merge Solving manual merges in workspace "Prj" Merge type: Move 1 - Fw2\mod2.m\src\Fic3.cpp TreeForMerging Merge type: Change of content 2 - Fw1\mod1.m\src\F1.cpp TreeForMerging Enter - 1,2,… to solve a merge - G not to use the graphic tool for text file contents - L to list the merges to solve again - Q to quit Your choice:


 

Each type of merge is listed and is preceded by a number that you can enter as your choice, if you want to resolve this merge. It is possible to choose in any order, even to stop the command and launch it again later on (non resolved merges will be proposed again)

[Top]

Move/Rename merges

When a move/rename merge is chosen from the main menu, the command displays three (or more) paths to the concerned file:


Example:

... Your choice: 1 --------------------------------------------------------------- Fw2\mod2.m\src\Fic3.cpp: Move Common ancestor: V0 - Fw2\mod2.m\src\F3.cpp Created by "cga" into the workspace "Prj" the Tue Mar 28 09:53:57 2000. Changes to merge: V1 - Fw2\mod2.m\src\Fic3.cpp Seen as the current one in the workspace. Created by "tony" into the workspace "Dev2" the Tue Mar 28 10:00:51 2000. V2 - Fw2\mod2.m\src\File3.cpp Created by "mick" into the workspace "Dev1" the Tue Mar 28 09:58:20 2000. Enter - V0, V1,… to choose one of these moves - L to list the changes again - N to go to the next merge - M to come back to the main menu - Q to quit

In our example, you see that the file: …/F3.cpp has been renamed in Fic3.cpp by a workspace, and has been renamed in File3.cpp by another workspace. You must finally choose a name for this file.
Note: the merge on the name of a file doesn't lead to an automatic impact analysis. The user must verify that the change of that name doesn't create compilation's problems.

[Top]

Content file merges

In the default mode, an interactive graphic merger is launched. The call to this merger can be refused in three cases:

If the interactive merger is used, both three versions of the file are displayed (ancestor, version 1, version 2) and the interactive merger is automatically launched.

Example:

Your choice: 2 --------------------------------------------------------------- Fw1\mod1.m\src\F1.cpp: Change of content Common ancestor: V0 - Type: Text file, created the Tue Mar 28 09:52:17 2000 Created by "cga" into the workspace "Prj" the Tue Mar 28 09:52:17 2000. Changes to merge: V1 - Type: Text file, created the Tue Mar 28 10:01:08 2000 Seen as the current one in the workspace. Created by "tony" into the workspace "Dev2" the Tue Mar 28 10:01:08 2000. V2 - Type: Text file, created the Tue Mar 28 09:58:42 2000 Created by "nick" into the workspace "Dev1" the Tue Mar 28 09:58:42 2000.

If the user decides to quit the merger without having resolved the conflict, the command automatically proposes the second menu, corresponding to a file content merger without any interactive merger (see right after)

When more than two versions of a same file must be merged, or when the merger has been stopped before the end of the merge, a menu is displayed. This menu proposes the projection of the different versions of the file in a temporary directory. It also proposes a file which will be considered as the result file of the merge.

Example:

--------------------------------------------------------------- Fw1\mod1.m\src\F1.cpp: Change of content Common ancestor: V0 - Type: Text file, created the Tue Mar 28 09:52:17 2000 Created by "cga" into the workspace "Prj" the Tue Mar 28 09:52:17 2000. Changes to merge: V1 - Type: Text file, created the Tue Mar 28 10:01:08 2000 Seen as the current one in the workspace. Created by "tony" into the workspace "Dev2" the Tue Mar 28 10:01:08 2000. V2 - Type: Text file, created the Tue Mar 28 09:58:42 2000 Created by "nick" into the workspace "Dev1" the Tue Mar 28 09:58:42 2000. Projection directory: C:\TEMP\ADLMerge_Prj_TreeForMerging_3 (current) Enter - V0, V1,… to choose one of these contents - D to change the directory - P to project the files into the directory - U to project useful additional contents - F to enter the result file path - L to list the changes again - M to come back to the main menu - Q to quit Your choice:

[Top]


Refresh of the current image 

Merges are resolved one by one, without any impact on the content of the current image. 
Meanwhile, as soon as a merge has been resolved, a new choice will appear in the main menu; the possibility of refresh of the current image

Example:

Your choice: V1 V1 - Type: Text file, created the Tue Mar 28 10:01:08 2000 Command successful. Solving manual merges in workspace "Prj" Merge type: Move 1 - Fw2\mod2.m\src\Fic3.cpp TreeForMerging Enter - 1,2,… to solve a merge - R to refresh the image - G not to use the graphic tool for text file contents - L to list the merges to solve again - Q to quit Your choice: q

[Top]

Remarks:

Once a first merge has been chosen from the main menu, the command successively proposes the others merges, either launching the interactive merger, either displaying the corresponding sous-menu.

When all merges are resolved the command stops automatically with a refresh of the current image.

If the command needs a temporary directory (case of content type merge, without the interactive merger), this directory is not automatically cleaned by the command when it ends. Several reasons explain this way of being:

At least, the user is notified that this temporary directory won't be cleaned by the command. In the example there after, the user decides to resolve a content merge without the interactive merger.

Example:

--------------------------------------------------------------- Fw1\mod1.m\src\F1.cpp: Change of content Common ancestor: V0 - Type: Text file, created the Tue Mar 28 09:52:17 2000 Created by "cga" into the workspace "Prj" the Tue Mar 28 09:52:17 2000. Changes to merge: V1 - Type: Text file, created the Tue Mar 28 10:01:08 2000 Seen as the current one in the workspace. Created by "cga" into the workspace "Dev2" the Tue Mar 28 10:01:08 2000. V2 - Type: Text file, created the Tue Mar 28 09:58:42 2000 Created by "cga" into the workspace "Dev1" the Tue Mar 28 09:58:42 2000. The files have been projected. Notice that neither the files nor the directory will be deleted. Projection directory: C:\TEMP\ADLMerge_Prj_TreeForMerging_3 (current) Enter - V0, V1,… to choose one of these contents - D to change the directory - P to project the files into the directory - F to enter the result file path - L to list the changes again - M to come back to the main menu - Q to quit Your choice: m

[Top]

Important methodological advice

It seems very important to advise you not always to use the options: "LeftAll" and/or "RightAll".
You must not forget that, when you choose this way, you loose a modification on the file, without thinking of the right of this modification. This seams unacceptable in almost all cases (users don't often make a correction in a file which is useless).

This use can come from two distinct reasons:

  1) I don't know how I can resolve this merge

SCM answers to this question: a user can resolve the conflicts of another user, in another workspace. Launch the adl_solve_merge command giving as argument the name of the workspace in which you want to resolve the merge.

  2) I cannot manage the merge with the graphic merger; I prefer resolve this conflict on my own, with another graphic tool.

SCM answers to this question: a user can resolve the conflicts on his own, in his own directory. Launch the adl_solve_merge command, asking for the projection of the differents versions of the file in a temporary directory, and resolve the conflict with an external tool. To do this, follow the example below:

Example of use of adl_solve_merge with merge out of the SCM merger

Solving manual merges in workspace "XXXXXX" Merge type: Change of content 1 - CAT3DControl.tst\CAT3DSettings.m\src\CATCGMSettings.cpp CGMTOPO Enter - 1, 2... to solve a merge - G not to use the graphic tool for text file contents - L to list the merges to solve again - Q to quit Your choice: G  Enter - 1, 2... to solve a merge - G to use the graphic tool for text file contents - L to list the merges to solve again - Q to quit Your choice: 1 --------------------------------------------------------------- CAT3DControl.tst\CAT3DSettings.m\src\CATCGMSettings.cpp: Change of content Common ancestor: V0 - Type: Text file, created the Wednesday, August 09, 2000 04:36:09 PM By "cgacxr1" into the workspace "CGMMASTER" the Wednesday, August 09, 2000 04:36:09 PM. Changes to merge: V1 - Type: Text file, created the Monday, September 18, 2000 08:23:19 PM Seen as the current one in the workspace. By "ahg" into the workspace "FIXPARTAHG" the Monday, September 18, 2000 08:23:19 PM. V2 - Type: Text file, created the Saturday, September 16, 2000 11:17:39 AM By "pbe" into the workspace "FIXPARTPBE" the Saturday, September 16, 2000 11:17:39 AM. Projection directory: C:\TEMP\SCMMerge_XXXXXX_T1_12 (not yet created) Enter - V0, V1... to choose one of these contents - D to change the directory - P to project the files in the directory - F to enter the result file path - L to list the changes again - M to come back to the main menu - Q to quit Your choice: P

---> SCM projects all the versions of the file in a temporary directory, always the same for this merge

The files have been projected. Notice that neither the files nor the directory will be deleted. Projection directory: C:\TEMP\SCMMerge_XXXXXX_T1_12 (current) Enter - V0, V1... to choose one of these contents - D to change the directory - P to project the files into the directory - U to project useful additional contents - F to enter the result file path - L to list the changes again - M to come back to the main menu - Q to quit Your choice: Q

---> In this case, the user gives himself time for thought and for the creation of the content result. He can give the result when the new adl_solve_merge is launched (with the option: F and enter the result file path)

[Top]

Options

adl_solve_merge accepts the following options:

-h|-help|-? Help of the command
object... Existing SCM object path(s), or identifier(s) prefixed by "soid:"
-file file File containing existing SCM object relative paths, or identifiers prefixed by "soid:"
-ws workspace_name Name of the workspace
-no_manual To not solve manual merge. This option is useful to solve any implicit and automatic merges, leaving manual merges not solved, thus avoiding any user interaction.

[Top]

Examples

Resolving merges to be done in the current workspace "MyWs":

adl_ch_ws MyWs  
adl_solve_merge

 

Resolving merges in the workspace "MyWs", with no merge left to do:

adl_solve_merge 
No merge in the workspace "MyWs"

 

Resolving merges in the workspace "MyWs" and only merges concerning objects in the file obj_file.txt:

adl_solve_merge -file obj_file.txt

[Top]


References

[1] 
[2] 
[3]
[4]
[5]
adl_mk_ws: creating workspaces
adl_set_merge: Updating merge's parameters
adl_ls_merge: Listing merges to be resolved
Merger User Interface article
Resolving Conflicting Changes article

[Top]


History

Version: 4 [Apr 2004] Choice of versions is prefixed by 'V'
Version: 3 [Jan 2004] New options [object...|-file file]
Version: 2 [Jan 2003] New option -no_manual
Version: 1 [Mar 2001] Document created

[Top]


Copyright © 2001, Dassault Systèmes. All rights reserved.