Documentation

Support

Unity Version Control

Use Xlinks

Create Xlinks to connect repositories in Unity Version Control.
Read time 2 minutesLast updated 14 days ago

You can use Xlinks to share components between different repositories. For more information about what Xlinks are and how you can use them, refer to Xlinks.

Use Xlinks in the GUI

Create an Xlink

You can create Xlinks in the UVCS desktop application.
  1. In the Workspace Explorer, right-click the directory or existing Xlink that you want to create an Xlink inside of.
  2. Select Create Xlink.
  3. In the dialog that opens, select the target changeset:
    1. Select the target UVCS server.
    2. Select a repository inside the server.
    3. Select a changeset inside the repository.
You can also optionally set the writable and relative server options for the Xlink:
  • Writable: allows you write permissions in the Xlinked repository.
  • Relative server: the Xlink gets the local version of the repository (recommended when you use replicated repositories).
If you create a writable Xlink, you can set the expansion rules.

Modify an Xlink

To modify an Xlink, right-click on the Xlink and select Edit Xlink. In the Edit Xlink dialog, you can edit the target changeset of the Xlink. If you have a writable Xlink, you can edit the expansion rules.

Use Xlinks in the CLI

Create an Xlink

To create an Xlink, you need to use the
cm xlink
command. For more information, you can refer to the
xlink
CLI reference, or use the
cm help xlink
command.
For example, you can create the following Xlink:
cm xlink component1 / 1@mylibrary

Parameter

Description

component1
The directory in the project repository that points to the mounted
mylibrary
component. This directory must not already exist in the repository. The xlink command creates an item for the directory, and throws an error if a file of the directory already exists with the same name.
/
The directory in the target repository.
1
The changeset number in the target repository.
mylibrary
The target repository. Together with the changeset, this forms a changeset specification. In this case, there is no server specified. If you do specify a server, the spec looks like the following:
1@mylibrary@servername:8087
.

Create a partial Xlink

Use a partial Xlink to mount a subdirectory in your repository. A partial Xlink has to be read only. For example:
cm xlink component1Src /src/dll cs:478@mylibrary
In the above example, the Xlink ensures that any files in
cs:478@mylibrary
that exist in the subdirectory
/src/dll
appear as read only files under the
/component1Src
directory in the current workspace.

Create a writable Xlink

To create a writable Xlink, you need to specify the
-w
modifier, for example:
cm xlink -w component1 / 1@mylibrary

Modify an Xlink

To modify an existing Xlink, you can use the
-e
modifier. For example, you can modify an existing Xlink
component1
to point to changeset 5 on repository
mylibrary
:
cm xlink -e component1 / 5@mylibrary
For more information about how to modify an Xlink in the command line, refer to the
xlink
CLI reference, or use the
cm help xlink
command.