RADE

Source Code Manager

adl_import

Importing changes into a workspace

Quick Reference

Abstract

The adl_import command allows the transfer of objects' changes between two workspaces.


Synopsis

adl_import object... [-from origin_ws_rev] [-tree local_tree] [-all_chg | {-chg chg...}] [-unco] [-import_proj | -import_merge] [-simul [-simul_dir temp_dir]] [-h|-help|-?] (1)
adl_import object... {-origin_path | -op} -from origin_ws_rev <...> (2)
adl_import -file file_name -from origin_ws_rev <...> (3)
adl_import -cs change_set... <...> (4)

Usage

This command allows the transfer of objects' changes (on components, directories, files) between two workspaces. Note that importing a change means doing it again inside the target workspace and not moving it (the changes remains valid in the origin workspace).
To import a whole workspace or several framework, you can run the [6] adl_import_ws command. 
You can launch this command in a graphic mode; see the [4] adl_gui command. To known the state of your workspace run the [5] adl_ds_ws command.

Here are presented three most frequent uses:

Example: adl_import <origin_image>/Fw1/Mod1.m/src/file1.cpp
Explanation: being in a given workspace, you can import a file seen in an image of another workspace, as soon as this image can be accessible on the local network.

Example: adl_import <current_working_image>/Fw1/Mod1.m/src/file1.cpp -from xxx
or:  cd <current_working_image>/Fw1/Mod1.m/src then adl_import file1.cpp -from xxx
Explanation: you give the name of a file being in the arrival workspace, and you want to import a version of this file, as it was in the given version of the origin workspace.

Example: adl_import -cs ChangeSet1
Explanation: no origin workspace is needed. You give the name or identifier of one or several change set(s). Theses change sets contain somes changes in several workspace trees. The command try to import all of theses changes of all workspace trees in the destination workspace. If the related software objects are not in the destination workspace,  the command fails. You have to import the software objects before.

 

Workspace xxx revision
In the previous examples, xxx represents a revision of the origin workspace of the import.
In all the SCM commands accepting a workspace revision, the allowed syntaxes for specifying a revision are:  espace[.arborescence[.{numéro|label|last}]]

For the "chg" option, the specified changes can be the followings:

If you use the -from option
The changes to import are read in the revision <origin_ws_rev> of the origin workspace.
  (1) The SCM object must be one of your current image.
  (2) The SCM object must be a relative path ("Fw1/Mod1.m/src/f1.cpp") or an identifier ("soid:xxx") to find in the origin workspace revision.
  (3) The file must contain relative paths or identifiers to find in the origin workspace revision.

If you don't use the -from option

Specify the SCM object you want to import as a path in the origin workspace's image.
The changes to import are read in the workspace revision which is projected in this image.
  (4) The change sets can be names or identifiers prefixed by "csid:".

NOTICE:

[Top]

Naming Rules

Here are some samples of specifying a workspace revision:

Syntax Meaning Example
workspace All the published revisions (last one in each tree)  Mechrel6
workspace.tree The last published revision in this tree  Mechrel6.DRWCXR6
workspace.tree.number The revision number n (150)  Mechrel6.DRWCXR6.150
workspace.tree.label The last revision that was published with the label "label" (public)  Mechrel6.DRWCXR6.public
workspace.tree.last The last workspace revision (possibly in work) Mechrel6.DRWCXR6.last

[Top]

Options

adl_import accepts the following options:

-h|-help|-? Help of the command
object ... Path(es) of the SCM object(s) whose changes are to import, or identifier(s) prefixed by "soid:".
-from origin_ws_rev Origin workspace revision, with the format "ws[.tree[.{number|label|last}]".
-tree ws_tree_name Name of the workspace tree in which import the changes.
-all_chg All the changes
-chg chg Only the specified changes
-unco Uncheck-out contained elements in the current image
-import_proj Import only the projectable changes from the origin workspace.
-import_merge Import all the changes even if merges have to be solved in the origin workspace.
-simul To simulate the import.
-simul_dir temp_dir Temporary directory path in which project the files for simulation.
-origin_path The object is a relative path to find in the origin workspace revision.
-op The object is a relative path to find in the origin workspace revision.
-file file_name  File containing relative paths or identifiers to find in the origin workspace revision.
-cs  Import all the changes of the change set list.

[Top]

Examples

Import all the changes of FileName.txt from the revision projected in the origin image:

adl_ch_ws MyWsDev
adl_import <origin_ws_image_dir>/MyFw/FileName.txt

 

Import all the changes of FileName.txt from the PUBLIC revision of <origin_ws>:  

adl_ch_ws MyWsDev
adl_import <MyWsImageDir>/MyFw/FileName.txt -from <origin_ws

 

Import a ditto of FileName.txt:

adl_ch_ws MyWsDev
adl_import MyFw/FileName.txt -origin_path|-op -from <origin_ws>

 

Import a file "MyFile.c" from a non existing workspace "AnotherWs":  

adl_ch_ws MyWsDev
adl_import MyFw/MyFile.c -from AnotherWs
Looking for the workspace "AnotherWs"
#ERR# ADLCMD - 0421: No workspace "AnotherWs" found
Give an origin workspace revision with the format "ws[.tree[.{number|label|last}]".

##### THE COMMAND ENTIRELY OR PARTIALLY FAILED #####

 

Import a non existing file "MyWrongFile.c":

adl_ch_ws MyWsDev
adl_import MyFw/MyWrongFile.c
Verifying the path "MyWrongFile.c".
#ERR# ADLCMD - 7625: The path "MyWrongFile.c" belongs to the current image "image_MyWsDev".
If you don't use the option -from, the path must be found in the origin workspace's image.

##### THE COMMAND ENTIRELY OR PARTIALLY FAILED #####

Import change sets "MyChangeSet1" and "MyChangeSet2":

adl_ch_ws MyWsDev
adl_import -cs MyChangeSet1 MyChangeSet2

[Top]


References

[4]
[5]
[6]
adl_gui: Graphic import tool
adl_ds_ws: Displaying workspace state
adl_import_ws: import a whole workspace

[Top]


History

Version: 2 Dec 2001] Document updated
Version: 1 [Mar 2001] Document created

[Top]


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