Jump to content

Readonly xlink into folder in containing repo?

Recommended Posts

Hi! Is it possible to create a readonly partial xlink targeting a subfolder inside the same repo that contains this xlink?

I'm aware that I could separate code into multiple repos, but my scenario is the following:

* I have a few existing libraries (in subfolders) with years of history inside a single repo.
* In the subfolder of the main application inside the same repo, I'd want to add xlinks to bin-folders with pre-built binaries from the above libraries (pointing out a specific branch/changeset for each such bin-folder).
* I don't want to move the above libraries into separate repos, since that would break the line of history.
* Also, I'm interested in the technical limits of xlinks, simply knowing if they can be pointing inside the same repo. If so, they could be used as checked-in replacements for symlinks (on Windows)!

And another question: a partial xlink can only be created from the command line, but can it be edited from the GUI (without becoming non-partial) ?

Best regards,
Göran W.

Share this post

Link to post
Share on other sites

Hello @gweronimo,

I'm afraid it's not possible, you will get the following error message:

A repository cannot be loaded inside itself. The repository XXXXX@YYYYYY:8087 cannot be loaded on '/Temp/bin/Debug/testing' because it is already loaded on '/'.

The best option you have is pushing the repository (or a subset of it) into an external repository and use it as the target of your xlinks.

The other option of course is using symbolic links.

Share this post

Link to post
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