Synchronize: sync

Use the sync command to synchronize changes on your local hard disk (working folders or workspace) to your view and vice versa. For instance, if you deleted a file or a folder on disk, sync deletes that file or folder from the view. If you have a new file or not-in-view folder (with files) on your local hard disk, sync adds them to the view. sync does not synchronize views with each other.

sync supports the same syntax as the ci command (check in) for process items and reasons for checking in files. If the project requires a reason for adding/checking in files, specify one with -d or -r. If the project requires a process item, specify one with -cr, -req or -task.

Syntax

The syntax for this command is:

stcmd{Ex} sync workspace|view|both [-o] [-nivf][-q] [-cmp] [-rp “working folder path”]
[-l | -u | -nel] [-vl "labelName"]
[-nomove] [-d|-r "comment"  | -rf "fileName"]
[[-active | [-cr | -req | -task] processItemPath] -pi typename:"path" [-mark]]

Example

The following is a simple sync example:

stcmd connect "User:PW@server:port"
stcmd set project=projectname view=viewname
stcmd sync {view | workspace | both} -nivf

When you specify view, sync applies to the view all the changes you have made to your workspace (that is, working folders on disk). When you specify workspace, sync applies to your workspace all the changes made to your view. When you specify both, it does both of the above.