问题
Is there any command which can let me remove a workspace from Accurev? I tried accurev rmws WorkspaceName, and it says its removed the workspace, but when I try recreating the workspace it gives me the message that the workspace already exists.
I'd appreciate any help.
回答1:
It is not possible at all in AccuRev to remove a workspace/stream/snapshot name once it's been created. Deleting a workspace is just marking it as deleted - for later revival if that should be necessary.
This is clearly stated in the docs (CLI.pdf):
The
rmws
command makes the specified workspace inactive. More precisely, it deactivates the workspace stream in the depot; [...] Note: after performing anrmws
command, you cannot then create a new workspace with the same name. The name remains irrevocably associated with the inactive workspace.
You can change other parameters of the workspace though: You can give it a new name. You can move it to a new machine. You can move it to a new backing stream.
回答2:
Since you're trying to create a new workspace with the same name....
At a higher level you want to think of a workspace as mapping the current backing configuration to the current location on disk. With this in mind, you'll likely find yourself removing workspaces less. For example, I have a single 'mainline_dev' named workspace that gets moved around to many active project streams over the course of the month. Once I'm done on a given activity (say for the week), I'll promote my work (assign to my story/task/bugfix), and then reparent/move my workspace to the next stream to work. Upon 'update', my local disk fully mirror's the new stream location (hierarchy).
Thus, if you more generically name your workspace, you'll find a pattern of reusing them rather than removing and recreating.
HTH!
来源:https://stackoverflow.com/questions/3295951/remove-a-workspace-in-accurev