Jump to content

Renaming repository leaves dangling workspaces


wvd_vegt
 Share

Recommended Posts

Hi,

I'm not sure it's by design but when I rename a repository that already has a workspace in it, the workspace's repository does not get updated. This leads to error messages when viewing items.

Furtunately when renaming it back all works again. But it gives the impression it that its not possible to rename a repository without deleting and recreating all workspaces.

wvd_vegt

Link to comment
Share on other sites

Hi, you are right, it's not a very clear operation right now. We are working to create a smoothly mechanism to achieve a successful rename.

In most of the case you don't need to delete your workspace, just close the GUI, open a command line window, cd to your workspace path and run a "cm update ." command. If this is not productive you can delete your "C:\..\wkPath\.plastic\plastic.wktree" and repeat the update.

Link to comment
Share on other sites

  • 1 year later...

In most of the case you don't need to delete your workspace, just close the GUI, open a command line window, cd to your workspace path and run a "cm update ." command. If this is not productive you can delete your "C:\..\wkPath\.plastic\plastic.wktree" and repeat the update.

 

I had a repository and workspace both named "Test". When I rename the repository in PlasticSCM to "RenamedTest" and then try to select the Branches or BranchExplorer options for the "Test" workspace, I get: "The specified repository could not be found: Test."

 

If I try to run "cm update ." before and after deleting the plastic.wktree file in the Test workspace folder, I get "The specified repository could not be found: Test."

 

So is there a way to rename a repository without deleting all associated workspaces and creating new workspaces?

Link to comment
Share on other sites

There's an easy way now to recover the workspace.

 

1) Open the GUI.

2) Open the repositories view

3) Right click in the one having the new name

4) Select "View branch explorer"

5) Select any branch, right click ans switch to it.

 

Your workspace will be working now with the "new" repository.

Link to comment
Share on other sites

  • 2 years later...
On 1/27/2014 at 3:49 PM, manu said:

There's an easy way now to recover the workspace.

 

1) Open the GUI.

2) Open the repositories view

3) Right click in the one having the new name

4) Select "View branch explorer"

5) Select any branch, right click ans switch to it.

 

Your workspace will be working now with the "new" repository.

This workaround fails if there are pending changes in your workspace, as you cannot switch your workspace to another branch if there are pending changes (yes, even if you set the "Behaviour when trying to switch/update..." to "Allow" in the Preferences (Windows-Client)). But you cannot discard your pending changes, as you will get the "repo not found" error. Even with the "cm update ." command.

So this creates a deadlock, and it appears the system breaks if you rename a repository, UNLESS *all* users in all their workspaces make sure they discard any pending changes BEFORE the rename is made...

Can you confirm that, or is there another method to recover or prevent this problem?

Link to comment
Share on other sites

Hello,

you are right, it would be much easier to address the xlink rename operation having the workspace free of changes.

There's not a direct way to easily undo your pending changes since you'll face the "repo not found" error, they belong to a repository that is not there anymore, at least with the name they know.

You can undo the repository name operation, make sure your team is not having changes and then follow the procedure.

If you are not able to do it you can remove the "plastic.changes" file you'll find inside the ".plastic" hidden directory at your workspace root directory. Notice this will remove all the plastic client knowledge about your changes files, not really a problem since you'll still have the files changed, moved or removed in your disk and Plastic can track them too. Without this file you'll be able to follow the procedure above.

Link to comment
Share on other sites

  • 3 years later...

Hi, sorry for bumping this --

I'm attempting to rename a repository but I also get the repository not found error.

I managed to fix it by renaming it manually inside:

  • The GUI
  • plastic.workspace
  • plastic.selector
  • syncviews.conf
  • hidden_branches.conf
  • replicationsourcesinfo.conf
  • plastic-guihelp.conf
  • guivisualstate.xml

It would be great if there was a warning that renaming a repository was not a supported operation from the GUI. Or in fact, just disabling it altogether, as it does not rename it properly everywhere at once.

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
 Share

×
×
  • Create New...