It's all about the answers!

Ask a question

Swap sandbox repository workspace


Mark Richardson (2868) | asked Apr 25 '14, 8:06 a.m.
 I work on a project that is very large. At times it is necessary to work on multiple streams or create new ones. I have found that whenever I switch my repository workspace two bad things happen: 
(1) the entire repository workspace is redownloaded (same component) even though only several dozen files are actually different, and (2) non-versioned ignored files are all deleted (such as build files) requireing a complete rebuild.

Both of these are major hindrances to rapid development. The second one is the worse since I have to completely rebuild every time. Having multiple sandboxes does not solve the problem - it only takes up a ton of disk space and still requires builds per each sandbox and a download of the entire repository. With Clearcase I was able to switch config specs and then simply do a quick compile and hotswap of the new files.

So my questions are:
(A) How can I properly "hotswap" a sandboxes repository workspace?
(B) How can I prevent switching repository workspaces from wiping the entire sandbox?

One answer



permanent link
sam detweiler (12.5k6195201) | answered Apr 25 '14, 8:11 a.m.
can u explain what you are doing?

I have multiple jazz source repository workspaces connected concurrently. I don't ever 'swap'.

on the eclipse side, did you mean eclipse workspace (ie, sandbox workspace?).
did u logoff from the jazz repo connections before changing eclipse workspaces?

Comments
Mark Richardson commented Apr 25 '14, 8:20 a.m. | edited Apr 25 '14, 8:22 a.m.

  I am doing the following:

1. Right click the workspace I want to switch to in eclipse in the Team Artifacts view and hit "Load..."
2. Browse the components to select the folders to be loaded
3. Select the root folder for the component. Advanced options: put the sandbox in a different location on disk. Select "Load the selected folders but do not create Eclipse projects." The reason for this is we use an ant target to setup eclipse for us.
4. Finish. A dialog pops up warning about colliding folders and overwriting projects. I select the root folder and hit Finish (it's the same component in the same sandbox so I am expecting things to be overwritten. I am not expecting my build files to get lost).

The root folder ends up getting deleted and re-downloaded. As a side effect my build files are lost.

I am only using one eclipse workspace. There are multiple repository workspaces on the SCM side - one per each stream.


sam detweiler commented Apr 25 '14, 8:30 a.m. | edited Apr 25 '14, 8:39 a.m.

so there are files on you local machine which are not included in the stream/repo workspace.

I think 'load' is a replace all operation.
I think you would want to use 'accept' to prevent overwrite.  or load to a separate location and xcopy/cp to the current.

just so I know, what are the 'build files'? build.xml?


Mark Richardson commented Apr 25 '14, 9:49 a.m.

Build files are Java class files, configuration files, etc. Those are not included in the repo but are under the main folder because that's where they should go after a build.


How would I use 'accept'? Isn't that for incoming changes? I wouldn't have any incoming changes because the repository workspace is being switched.

I don't know if copying over files from a different location would work - namely if RTC would be smart about the new files. Even so it still requires a full redownload of the repo.


Mark Richardson commented Apr 25 '14, 9:49 a.m. | edited Apr 25 '14, 9:50 a.m.

duplicate post


sam detweiler commented Apr 25 '14, 9:53 a.m.

Ok, but I think you want it both ways... 

you are changing to a 'different' workspace, and expect all the files to be loaded,
but you want the old files there too.

build files = output of the build steps.


Mark Richardson commented Apr 25 '14, 12:50 p.m.

Philosophically yes. In all practicality they are the same minus a handful of .class files and perhaps some configuration files. That being the case it's much easier for development to simply hotswap / hotcompile those changes as opposed to the entire project. Building the entire project takes time.

showing 5 of 6 show 1 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.