2

Is it possible to simulate multi developer scenario with RTC source control so that when I make code changes I can test accepting change sets for example. This is just so I can test a multi developer environment but using just one user.

I've tried creating multiple Eclipse workspaces, and loading the same project area into each Eclipse workspace. Using this method I am unable to accept change sets as RTC source control will just ask me to resync my workspace once I make a change in work Eclipse workspace: enter image description here

It seems the only method of accepting incoming changes is to 1. Right click on the stream from within 'Pending CHanges' view 2. Select load 3. Select following option : enter image description here

blue-sky
  • 51,962
  • 152
  • 427
  • 752

1 Answers1

2

Make sure you use the Stream (ie make sure you don't deliver directly to another repo workspace simulating another user)

(Note: this is entirely different in ClearCase, where the "out of sync" can happen between the configuration of an UCM view and the one of a Stream after a rebase)

If you create different repo workspace (loaded in different Eclipse workspace), this can cause some confusion when used within the same Eclipse instance.

As said in this thread

repository workspaces are meant to isolate changes - being your private stream.
There is no automatic accepting of changes so you are in full control of what flows in. You can also run private builds on them. that is the whole idea.

If you want to run several repository workspaces with shared code you should use a Stream I think.
The clean repo workspace would be used to accept the changes you decide to deliver to your stream.
So you are trying to use a repository workspace as a stream. While they are almost identical, I am not sure about how they would react to changes delivered to them. Especially while being loaded.

You should use two Eclipse instances. I am concerned about having the same eclipse projects loaded multiple times in the same sandbox and the same Eclipse

That "confusion" is explained in the same thread:

This is expected behavior.
When you change WS1 by delivering to it, the content you've loaded to disk for WS1 isn't updated. So you have to reload.
For this reason, you are not allowed to deliver to other user's workspaces. You can't alter someone's workspace but you can alter your own because you would know why it went out of sync.

Check out point 7 and 10 of "Good practices and key workflows for Rational Team Concert Source Control users".


Note: the article "Loading Content from a Jazz Source Control Repository in Rational Team Concert 2.0" (also valid for RTC3.0) mentions in the section "Reloading Out-of-sync Shared Folders" a similar advice than the one given by the OP:

The local workspace can become out of sync with the remote workspace due to a couple of reasons:

  • The remote workspace is loaded multiple times and changes have been checked in or accepted from another client session.
  • An error was encountered during an operation (e.g. Accept) that modifies both the local and remote workspaces.

When the local workspace became out of sync with the remote workspace in RTC 1.0, the user was forced to run the Load wizard and reselect the folders that needed to be reloaded.
In RTC 2.0, this new option will automatically select the out of sync folders and reload them so they are no longer out of sync.
Also new in RTC 2.0 is an indication in the Pending Changes view that there are projects out of sync, as shown below.

out of sync RTC projects

Clicking on the Reload out of sync link in the Pending Changes view will open the Load wizard.

Load Repository Workspace dialog

The reload option will be selected by default and clicking next will then allow you to select which folders to reload.
As you can see in the following screen shot, all the projects in the Foundation component are out of sync and need to be reloaded.
Clicking Finish will reload these folders and bring them back in sync.

Projects to reload

Also the thread "How to handle project out of sync " provides an interesting illustration of that mechanism (even though it isn't exactly your situation).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks, it seems this is not possible then. To simulate a multi developer project I would need to actually create multiple users, there is no way to simulate this using multiple Eclipse workspaces ? – blue-sky Apr 16 '12 at 15:13
  • @user470184: it should be possible, but provided you accept changes delivered to a Stream, not changes directly from another repo workspace. Did you deliver first to the stream? If yes, try with another Eclipse instance instead of just switching workspace with the same Eclipse instance. – VonC Apr 16 '12 at 15:15
  • I first checked the changes into my local repository, then delivered them to a stream. When I refresh the pending changes view in the separate Eclipse instance I get the message above in screenshot - 'Some of your projects are out of sync.....'. This is correct way of simulating two developers ? – blue-sky Apr 16 '12 at 15:29
  • @user470184 your workflow seems good. However, in the second Eclipse instance, did you try first to unload all your repo workspace (ie empty Eclipse workspace)? You can accept changes in a second repo workspace without having to load said repo workspace first. – VonC Apr 16 '12 at 15:54
  • I've unloaded the projects in the second Eclipse instance. But when I refresh the 'Pending Changes' view (in second Eclipse instance) it does'nt display the delivered changes. – blue-sky Apr 16 '12 at 16:06
  • @user470184 did you create *two* repo workspace on the same stream? The "Pending changes" view should display incoming changes in the second repo workspace. – VonC Apr 16 '12 at 17:04
  • Yes I created two repo workspaces on the same stream. I make a change in one workspace and deliver it to the stream but the "Pending Changes" view does not display the incoming changes on the second repo, it just displays the message above in screenshot - 'Some of your projects are out of sync.....'. – blue-sky Apr 17 '12 at 08:46
  • @user470184 did you try, in your second Eclipse instance, with the second repo workspace loaded, a "Refresh Remote Changes"? (illustrated in http://stackoverflow.com/questions/9620670/why-arent-my-pending-changes-being-shown-in-rtc) – VonC Apr 17 '12 at 09:35
  • Yes I've tried that but same result. It seems that because my projects are out of sync I cannot view the incoming change set. This is probably not a valid use case anyway as I'm attempting to simulate multiple developers using just one user. – blue-sky Apr 17 '12 at 10:10
  • @user470184 ok, strange. I will test it with one of my project. – VonC Apr 17 '12 at 10:20
  • No, thank you. I've re-edited, should be right clicking on stream instead of project. – blue-sky Apr 17 '12 at 10:29
  • @user470184 Ok. I have edited my answer as well, to make the option you mention more visible. – VonC Apr 17 '12 at 11:03