Jump to content

Transformable Workspaces Documentation?


derkork

Recommended Posts

Hi, I just scanned over the 5.4 feature set and found that new "Transformable Workspaces" feature which would be extremely useful for us as it's basically the missing addendum to Xlinks. However I couldn't find any documentation on how these work or are set up. Could anyone point me to the related documentation, please? Thank you very much and keep up the great work :)

Link to comment
Share on other sites

Hi!

 

this is all we have right now, if you need further help I'll be happy to better elaborate it.

 

The transformer rules are stored in a local file inside the “.plastic” hidden directory at the root path of the Plastic SCM workspace. It allows you to write Move and Remove commands to move or remove Plastic SCM directories without affecting the repository structure, it’s only a local change and the developer will be the only one affected by the rules.

 

The file is called "plastic.transformerrules" and must be placed inside the workspace hidden directory called ".plastic".

 

== Transformer rules ==

 

The workspace content can be locally transformed based on some rules. It means, workspace items can be moved to different locations or even not loaded.

 

Two kind of rules are currently supported:

 

=== Move rules ===

 

This rule moves a controlled path to a different location. The source path and the parent folder of the destination path must be also controlled.

 

Parts of one repository can be loaded inside a different repository without any restriction.

 

Examples:

 

   mv /Game /TnT/Game

 

   mv /src/libs/nh3 /nh3

 

=== Remove rules ===

 

This rule allows to avoid loading certain parts of the tree. The specified path must be a controlled path.

 

Examples:

 

   rm /src/bin

 

   rm /textures/hugefile.map

 

=== How to use them ===

 

These rules are specified in a file named 'plastic.transformerrules' inside the workspace folder '.plastic' (it must be  manually created the first time).

 

After editing the file to add, remove or change any rule, an update operation must be manually executed to make the workspace changes effective (avoiding the update operation can lead to weird issues).

 

There cannot be pending changes when editing the rules file.

 

=== Current status ===

 

This functionality is still under development although a standard working cycle can be normally performed. The most common operations are supported: add, rm, co, unco, ci, merge, status, ls, etc.

 

==== Restrictions ====

 

* The xlinks cannot be moved by transformer rules.

 

Example:

 

   mv /src/xlink /xlink

 

* The tranformer rules cannot modify an already applied rule.

 

Example:

 

   mv /src/foo.c /src/bar.c

 

   mv /src /source

 

* The rm rules cannot be applied when they contain the source or destination of a mv rule.

 

Example:

 

    mv /src/foo.c /doc/foo.c

 

    rm /src or rm /doc

 

* The rm operation cannot be applied when it contains the source or destination of a mv rule.

 

Example:

 

    mv /src/foo.c /doc/foo.c

 

    $cm rm src

 

* The transformed moved nodes cannot be moved again.

 

Example:

 

    mv /src/foo.c /doc/foo.c

 

    $cm mv doc/foo.c foo.c

Link to comment
Share on other sites

Thank you very much for the documentation. It seems that my intended use case (moving stuff from XLinks) doesn't currently work. Is it intended to make this work in the future? Or would it be possible to modify xlinks such that you can only link to a part of another repository and not the whole repository?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...