RADE
|
Source Code Manager
|
adl_forget_chg
Forgetting changes |
Quick Reference |
Abstract
The adl_forget_chg command forgets one or many local changes of SCM object(s) in
the current workspace and the current image.
|
Synopsis
adl_forget_chg object... -all_chg |{-chg changes...} -last | -local
[-unco] [-force] [-simul [-simul_dir temp_dir]] [-h | -help
| -?]
Usage
This command considers local "check-out" as modification (see [1] adl_co command), in the use of the command.
It allows:
- To forget the last modification with the last option
- To forget all the local modifications with the local
option and to replace the local object by the one in the parent workspace.
- To display all the differences, without any recording in the database, with the
simul option
- To project out of the workspace, the current file, as it would be extracted from the
database, with the -dir <directory> option: it gives the opportunity to see
the file before retrieving it (no back to the future is possible!)
- To indicate the type of modification you want to remove with the -chg content |
move option
- To forget all the modifications of any type with the -all_chg option.
To have the list of changes on different objects, you can run the [2] adl_ds_chg command.
[Top]
Options
adl_forget_chg accepts the following options:
-h|-help|-? |
Help of the command |
object... |
Path(es), or identifier(s) prefixed by "soid:" of the SCM object(s) whose local changes are to forget |
-all_chg |
All the changes |
-chg changes |
Specified changes |
-last |
The last local changes |
-local |
All the local changes |
-unco |
Uncheck-out contained elements in the current image |
-force |
Forget the changes even if they are visible in a published workspace revision. |
-simul |
To simulate the import. |
-simul_dir dir_name |
Temporary directory path in which project the files for simulation. |
This command has several options:
- object...: can be a file but also a directory. In the case of a directory,
you can rename or move this directory (and not the objects stored in this directory)
- -all_chg: as SCM manages independently 5 types of modifications, it is possible to
specify those you want to forget. However, for now, the only modifications usable by the
users are: 'move' and 'content'.
- -chg: It is possible to specify the type of modification you want to forget. Possible
types of changes are:
- del Creation/deletion
- move Move
- content Change of content (file element only)
- exec Change of executable for Unix (file element only)
- descr Change of description
- -last: several consecutive modifications can be made in a workspace
- -local: for example several adl_co between adl_refresh, adl_sync, etc
You then can
choose to either forget all the local modifications, i.e. those never promoted (using
-local), or to come back "revision" by "revision" (see
examples given by adl_forget_chg -h). In the case of a checked-out file, adl_forget_chg
-last is equivalent to adl_unco and means you forget the current check-out (though the
-local option forgets not only the current check-out but also all the local
modifications made before).
- -unco: to manage an unusual case: if an object is seen as being deleted after having
forgotten a modification, this forgetting in itself is not performed if the
object himself or one of its objects is currently checked-out
- -force: the command refuses to forget a modification done before the last adl_publish;
In fact, as the workspace is published, all it content is considered as valid! With this
option, you can go over this prohibition... BE CAREFUL: a modification forgotten in a
workspace (but managed elsewhere) can come back one day!
- -simul: it is possible to simulate a retrieval, and you can indicate the directory
where the files, modified by the command, must be projected
- -simul_dir: directory directory where the files, modified by the command, are going to
be projected. If no directory is specified, only traces will be displayed.
[Top]
Warnings About -force
When the -force option is not used, it is mandatory that the modifications to
forget are not visible through a published revision
of
the workspace (cf adl_publish).
Here, we would like to speak
about the case of a workspace
- in which local modifications
exist - created either by collect, import or local operations (adl_co,
adl_mv, etc)
- which is the origin workspace for transfers to another workspace that
belongs either to the same site or to another remote site
In the case where changes are performed locally, then forgotten (adl_forget_chg),
then done again (see example) and
if a transfer is performed before the command adl_forget_chg is run, then the
next transfer will bring the new change and will lead to a merge
with the change that has been
forgotten in the origin workspace.
This can be surprising for the user who is running the transfer.
This merge is due to the delta mechanism used by transfers.
Sample
- - adl_co XXX + changes in XXX
- - adl_publish
- - transfer from the workspace (adl_import, adl_import_ws, adl_promote_is,
adl_sync_is, etc)
- - adl_forget_chg XXX -force -all_chg -last
- - adl_co XXX + changes in XXX
- - transfer to the same target workspace -> a merge occurs on
file XXX.
[Top]
Examples
Forget last change of content on the "MyFile" file, in the MyFramework in
the workspace "MyWsDev":
adl_ch_ws MyWsDev
cd MyFramework/PublicInterfaces
adl_forget_chg MyFile -chg content -last
|
Forget all changes in my workspace MyWsDev for a file
adl_ch_ws MyWsDev
adl_forget_chg MyFramework/PublicInterfaces/MyFile -all_chg
-local
or
adl_forget_chg soid:DC1WLx9CbYQ3+++-HE5Y -all_chg
-local
|
Simulation where the result of the simulation sent
to the "MyTempDir" directory:
adl_forget_chg MyFramework/PublicInterfaces/ MyFile -chg
content -last -simul -simul_dir MyTempDir
|
[Top]
References
[Top]
History
Version 2 [Nov 2002] |
Add warnings about the use of -force option |
Version 1 [Mar 2001] |
Document created |
[Top]
Copyright © 2001, Dassault Systèmes. All rights reserved.