Jump to content

xlink recovery after repository rename?


Wolfram

Recommended Posts

Hiho.

I renamed a repository from within the client, and fixed the workspace references using this method: 

However, as that repository A is an (w)xlink source for my repository B, the xlink in B is now broken (it is listed as "unresolved link" and trying to edit it opens a popup "The specified repository couldn't be found".

It seems there also is no functionality to "just" delete the xlink, and create a new one under the same name, for the same reason.

I also tried the CLI using:

$ cm xlink -e <xlink_path> 14@new_repo_A_name

, but it just prints "Can't edit the xlink target repository (changes in the name, server or relative server are not allowed)."

 

So my questions are:

- Is there some way to recover from this (except maybe "undo the repo name change and leave everything as it originally was")?

- Is there a way to actually accomplish what I want (i.e., rename a repo, and keep xlinks intact or update then accordingly)?

- My next attempt would probably 1) revert the rename 2) delete the xlink 3) rename 4) create new xlink to renamed repo. Is that feasible? Is there a better way?

Thanks!

Link to comment
Share on other sites

On 11/21/2016 at 7:13 PM, Wolfram said:

It seems there also is no functionality to "just" delete the xlink, and create a new one under the same name, for the same reason.

You can delete the xlink and create a new one for the new repository name, did you get an error trying to do it?

It's correct you can't edit it, sorry about that but it's not supported.

On 11/21/2016 at 7:13 PM, Wolfram said:

So my questions are:

- Is there some way to recover from this (except maybe "undo the repo name change and leave everything as it originally was")?

You can revert the name yes, if you want to go ahead with the rename operation then you can remove the old xlink and create a new one.

On 11/21/2016 at 7:13 PM, Wolfram said:

- Is there a way to actually accomplish what I want (i.e., rename a repo, and keep xlinks intact or update then accordingly)?

Not right now.

On 11/21/2016 at 7:13 PM, Wolfram said:

- My next attempt would probably 1) revert the rename 2) delete the xlink 3) rename 4) create new xlink to renamed repo. Is that feasible? Is there a better way?

Try to delete the xlink without restoring the repository name, you should be able to do it.

Link to comment
Share on other sites

On 11/23/2016 at 11:26 AM, manu said:

You can delete the xlink and create a new one for the new repository name, did you get an error trying to do it?

[...]

Try to delete the xlink without restoring the repository name, you should be able to do it.

Yes, it's the same error. Repository got renamed, so I now deleted the wxlink referencing to it. Now the error "The specified repository couldn't be found" constantly keeps popping up everywhere, for example each time I try to refresh the Pending Changes window. Re-creating the wxlink to point to the new repo name doesn't change that, either.

Link to comment
Share on other sites

Update: The actual process appears to work, but it seems that background tabs are not updated, but do somehow refresh, producing the error. Maybe you can reproduce this behaviour on your end.

However, just regular working with the (Windows-)Client creates tons of tabs at the end of the day, and one rarely remebers to actively close every single tab you don't really/no longer need, so this is bound to happen, unless you remind all people in the team each time to take care of that.

The only advantage is that actually renaming a repository is a very rare use case, and usually does not happen in a "regular" work scenario (we're currently just getting to know the client and the system, as well as deciding on repository naming conventions, so I keep renaming some of our repos).

Link to comment
Share on other sites

Update: OK, even if renaming worked and all other problems were resolved, you can never again switch back your workspaces to any cs before the name change, as you will then keep getting "not found" errors in all situations.

All this makes the renaming of repositories an extremely dangerous procedure, which can break your project, and the working environment of every team member. Even if no xlinks are used, your working enviroment can break, see 

I suggest you guys remove the "Rename" option from the "Repositories" context menu altogether, until it works reliably. It should only be available in the much more powerful CLI interface.

Link to comment
Share on other sites

Hi wolfram,

yes, you have to take into account those details when a repository is part of a xlinked structure.

Unfortunately I can't find a workaround to access the old xlink information :( Notice changeset content can't be changed, it's an static configuration and a name redirection is currently now available for repository names.

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...