Jump to content

Using XLinks with Distributed Repos


Tom Clifton

Recommended Posts

Hi,

I am looking at breaking up an existing project in to a couple of repositories so that we can make use of xlinks to share code between the original project repo and a repo for a new project. Whilst looking in to this I came across some issues that I have not been able to resolve and was hoping someone could provide some help.

Our team has a mix of people creating their repos in a centralised way with @cactus@cloud and others that set up a local repository and use a sync view to push/pull to the repo in the cloud.

For the new setup I have broken up functionality in to a couple of new repositories, "Tech" and "Tools" which contains common cross-project functionality. In the original project repository (in my local repository) I created an xlink to the new Tech repository as follows:  
 

cm xlink -w Source/Tech / cs:1@Tech@cactus@cloud

I have committed and pushed those changes to the cloud repo. I have a second workspace for this project that is setup to track the cloud repo directly. In that workspace I am able to update the workspace as normal and i can see that the Source/Tech folder is populated with the contents as in changeset 1 of the new repo as expected. However in my other workspace which is set up as a local repo tracking the cloud repo that Source/Tech folder is empty.

According to your documentation here you should update the workspace by clocking "update woekspace" in the GUI but as far as I'm aware this button is not available when creating local repos and updating via a sync view.

I came across another forum post here which seems to be discussing something similar but in their case their xlink appears to be to a local repo whereas I want to set up my xlink to the cloud repo. Do I still need to adjust my sync view or create a new sync view to get this working? What is the process for syncing with an xlink at a cloud repo on a workspace for a local repository or is this not supported?

Thanks
Tom

Link to comment
Share on other sites

Hi,

If you have a cloud repo with some Xlinks, you will need to create a sync view to pull the parent repo + the Xlinks to your local server. 

At the end of the day, you have multiple repos in the cloud linked via Xlinks. If you are also working with local repos, you will need to pull all the cloud repos to local and then if you create a new workspace pointing to local, you will be able to run an update and download the data from local.

Regards,

Carlos.

Link to comment
Share on other sites

Hi Carlos,

Thanks for the reply. I managed to figure out what I was doing wrong in the end it was a bit of a facepalm moment.

I said this before:
 

Quote

According to your documentation here you should update the workspace by clocking "update woekspace" in the GUI but as far as I'm aware this button is not available when creating local repos and updating via a sync view.

That part was incorrect as the missing step was running "Update Workspace" - it just wasn't in the location I was expecting. The reason for this is that I have only pressed Update workspace for my cloud repos in the Incoming Changes tab after clicking on View in the green box that appears in the gui when there are changes.

image.thumb.png.e003c93b4b5ac8fcc4d4ffb794e10d70.png


However I never use that option in my usual distributed workflow and wasn't aware it was even available. My usual workflow would be to push/pull in the sync view when syncing with the cloud repo and interact with the branch explorer at other times. It was only when I noticed the "Update Workspace" button in the Workspace Explorer tab that I realised that was available here too. Clicking that resolved the issues as expected.

The documentation I linked doesn't explicitly mention that the Update Workspace button is located on the Workspace Explorer view although it probably does infer it with the screenshot - crucially the screenshot doesn't show the Update Workspace button there though! It might be nice just to make that part of the documentation a little clearer but hopefully this explanation helps anyone else who's confused by that.

Thanks!

Tom

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...