I am trying to connect my code to a ClearCase Stream. Currently I'm operating under the belief that, once connected to ClearCase, the "Deliver Stream" activity from the drop-down menu will perform this task.
However, all the literature I have read is just vague enough that it isn't clear if this will overwrite the code that is currently in that stream, or if that code will overwrite the code that is currently in my workspace.
I do not want to lose my workspace code, nor do I want to overwrite my ClearCase code if I can help it.
Will this "Deliver Stream" activity do either of these things? And, more importantly, will it actually connect my code to source control?
If not, and this is really the heart of my question, then how do I connect my RAD 7.5 workspace to a ClearCase source controlled file sharing system?
It won't affect your workspace, but I would recommend doing those operations outside of RAD first, to be sure of what is actually taking place:
I am trying to connect my code to a ClearCase Stream
First: is your code versioned in ClearCase in the first place: is your workspace part of a (snapshot) ClearCase view attached to an UCM Stream?
If not, you need to create an UCM dynamic view attached to the right stream, and use clearfsimport to add your files.
Once the import is done, create a snapshot view on the same stream to be used in RAD (since, as I mentioned in your previous question, dynamic views aren't well suited for compilation)
if this will overwrite the code that is currently in that stream, or if that code will overwrite the code that is currently in my workspace
A Deliver Stream is about:
deliver and integrate change sets to the integration stream once an activity has been completed.
For example, if your task was to create a new feature A, you can deliver a change set relating only to new feature A into the integration stream.
That means your current workspace represents a snapshot view loaded and attached to a child stream "FeatureA", and "Deliver Stream" would trigger an UCM deliver between your current (child-)stream FeatureA and the parent Integration stream.
See more at "Integration stream vs integration view in ClearCase".
If you do a "Deliver Stream" from RAD:
As you deliver your changes to a stream, we suggest that you have two different instances of Rational Application Developer open:
one workspace will have your development workspace which contains the complete changes,
and the other will have the integration workspace open.
If you invoke the Deliver Stream option from the integration workspace, your changes automatically appear in the workspace.
If you deliver from your development workspace, you will have modified the file system outside of Rational Application Developer.
Related
In eclipse we have possibility to create psf file using Export --> Team Project set and use that psf to create new workspace code.
Is there a similar possbility in ALM to get the information out of snapshot and use it as psf?
This is not exactly like a project set file (psf), but in RTC, you can memorize the exact state of multiple repos (here in RTC "components") with a stream.
By communicating the stream name, any collaborator can create a repo workspace on that stream and checkout (in his/her own sandbox) the components.
That is what you find in this thread for instance::
Instead of a .psf file, you would use an RTC stream.
When someone has changes that they want to make visible to the rest of
the team, instead of updating the .psf file, they would deliver their
changes to the RTC stream.
Conversely, when you want to catch up to
the changes being made by other team members, you would accept changes
from stream (rather than pulling a set of tags).
See also this thread:
A team project-set (Eclipse) can be exported to a .psf file while working-sets are part of your preferences.
The team project-set was added to eclipse to augment SCM systems which didn't make it easy to bootstrap and get the right line-up of projects.
In Jazz we recommend you setup a stream with the component/projects your team members need to work on and they can simply create their own repo workspace and load it.
When a repo workspace is loaded, we automatically create a working-set for each component that is loaded, as the documentation quote above mentions.
I have a snapshot view of a project of tens of thousands of files. I work remotely and a live view wouldn't be practical. I am only testing with these files, so I never have to put something back, but I do want to be able to get any files that have changed.
The way it has been explained to me is that there is no mechanism in ClearCase to identify my out-of-date files or to automatically update them when I would request an update of just those files.
The only option I have is to replace the entire snapshot, which could mean waiting a very long time for it to download (even when I am on the local network and not working remotely). Even then, I wouldn't know which files were updated since my existing snapshot was made.
I'm new to ClearCase, but have used SVN. SVN has this capability to see which files are out of date and to request an update of just those files.
Is there a way, with ClearCase, to get what I want? I feel (or want to think) that I may be misinformed about how it works.
The cleartool update command using -print option:
-print Produces a preview of the update operation: instead of copying or removing files, update prints a report to standard output the actions it would take for each specified element.
That should suffice to know what's changed and if you need to update.
btw: the update may analyze the entire view, but only actually downloads files that have changed.
update
Updates elements in a snapshot view
[...]
Updating Loaded Elements
For one or more loaded elements, the update command does the following:
* Reevaluates the config spec to select versions of loaded elements in
the VOB and loads them if they differ from the currently loaded
versions
You could also work more effectively by using labels or baselines. If you only update after a particular baseline, you could run cleartool diffbl to find the differences between the current and latest. You could then just monitor for a new baseline. Or you can use cleartool lsact -l to examine the element versions on the new activity.
Do you have the option of using the ClearCase Remote Client (CCRC)? It is designed to efficiently support high-latency (i.e. WAN) connections to the ClearCase servers. See the ClearCase Knowledge Center:
Developing software with Rational ClearTeam Explorer
CCRC supports both Web views (similar to snapshot views) and automatic views (similar to dynamic views) and provides much better performance than CCLC (the "ClearCase Local Client" that supports snapshot and dynamic views) over a high-latency network.
The command line interface for CCRC (rcleartool) supports the 'update' operation as does the ClearTeam Explorer GUI. The update operation evaluates which versioned files have changed and only updates that subset.
When I go to rebase my development stream with the latest baseline, the current integration stream does not automatically show up. Instead I get a list of all the available streams. When I select the integration stream from the list, I get the following error:
Because this stream has no default stream from which to retrieve
recommended baselines, the baseline list has been seeded with
the stream's current foundation baselines.
To proceed, you'll need to edit the baseline list directly.
(Click 'Advanced' to view/edit the baseline list.)
When I go to Project Explorer, and look at recommended baselines, everything shows up correctly.
This had been working correctly historically. What can I do to set the default stream back to the integration stream?
I didn't saw that error message before, but a workaround would be to:
rename the current child stream (which no longer has the right default parent),
make an new child stream from the integration stream, and rebasing it with the right baseline from its default parent (the integration stream),
make the first child stream (the one with the issue) obsolete,
go on from there.
I can't offer much by way of explanation, but something did magically fix it.
Normally I rebase by right clicking on the development stream and selecting "Rebase Stream...". This was not working. However, Going to Toolbox > UCM > Rebase Stream seemed to kick it into gear.
Not Working
Working
Hopefully that fixes it for some other person. If not, you can go with VonC's answer.
In Eclipse PDE, when looking for resource changes (using IResourceChangeEvent), how do I find out exactly when a project is created? Do I have access to the project (as an IProject) in this context?
Several parts to this answer:
When resources change, your listener gets an event. From that event you can get a delta describing the resources that were changes. You implement a visitor (passed to the delta with the accept() method) that actually implements your response to the change and controls how far down the delta you want to traverse by answering a boolean from its visit() method. You probably won't traverse too much since any new projects will be at the top of the delta. Once you've recognized that you're visiting a delta node representing a new project (you use flags() and getKind() to see whether or not it's a new project) you can take whatever action you'd like.
The other part of this answer is to warn you that often resource changes are batched, usually for performance reasons, so you might get notified of a new project being created after many files have been created into that project.
To augment the other answer that referenced resource change listeners...
Reliably detecting project creation is actually rather difficult. The issue is what you define as project creation. To the Eclipse resources layer, project creation is when a blank project is created (no metadata or files of any sort), but in a typical scenario you want to know when a particular kind of project is created.
This means that you cannot assume that when your code receives a project creation event, that you will be able to ask questions about that project. Project creation event may be delivered together with subsequent file events in a single batch or the events may trickle in separately.
Another consideration is that to Eclipse project creation is a number of different scenarios. It could be user running a project creation wizard, or importing existing project from disk, or importing from Git, or any number of other ways that a third party plugin may cause a project to be added to the workspace. Each of those scenarios will have slightly different way in which events are batched or trickle in.
The only solution is to look at file events as opposed to project events. Figure out what questions your listener needs to ask of the project, then figure out what files contain the answers and track those files. For instance, if you need to check for a nature and a classpath entry, monitor .project and .classpath files. Don't assume that the project is always in consistent state. It may not be if you are looking at it part way through a Git import.
Is there any way using Subclipse or Subversive to apply some kind of filter on Package Explorer that will hide all files that weren't modified locally?
It would be sometimes very useful when I just want focus on my local changes (for example to revise them). I know that files that were modified locally are marked in Package Explorer (in Subclipse by "star" symbol) but in big projects with hundred of files it doesn't help that much (it would be much easier and clearer if only modified files would be visible).
Of course packages containing modified files should be visible as well.
Have you tried the Synchronize view? This shows all your changes in a view which makes it easy to work with the items. You can also create and group items by changeset when using this view.
Using Subclipse, I set the Synchronize view so that all SVN projects in my workspace are synchronized. I then pin it and set a schedule to refresh every hour. Local changes refresh immediately, the hourly schedule is for how often to check the repository for incoming changes.
You can out the view in Outgoing mode if you only want to look at your local changes.