How to search a file in eclipse clearcase? - clearcase-remote-client

I am using eclipse clearcase remote client. Everytime i wish to check out the file, i am going into the long branch.
Is there any way to find a file directly in the root like searching?

If you are using CCRC, you are using a snapshot view, which have an config spec specifying:
what you are selecting (this is the part you need to adjust to check out the right version in the right branch)
what you are loading on your disk.
As mentioned in this comparison matrix between CCRC and other ClearCase instances,
CCRC can only search the local copy area’s database for checkouts, hijacks, view privates.
I would recommend making a second CCRC web view, and make some tests on that view (with a small set of files loaded).

Related

Clearcase - Not able to search files and texts in Component VOB

I have clearcase Rational Clearcase Remote Client Version: 7.1.0.0 installed on my machine. I have created my view by creating workspace and using CVOB for repository. I am not able search from search menu like file, text within the file as its always returning 0 matches. Do i need to configure or install additionally to enable search? My organization is using clear case a strategic solution for documentation repository and as search is not working at whole rollout will go for toss. Appreciate if anyone has solution on this issue.
You do not search in a pvob: it should be for UCM metadata only (poject, activities, ...)
You should use a Vob (an UCM one probably, where an UCM component root has been defined)
In that vob, you will find elements (directories and files) to search for.
See more at "What is the Difference between VOB and PVOB?".

Browsing projects without creating views in ClearTeam Explorer for Rational ClearCase

My company has recently switched from using Perforce to Rational ClearCase for version control.
In the P4Win client it was possible to select View -> Entire Depot and browse depot files that were outside my client spec and this was useful for figuring out exactly what I needed to add to my client spec.
Significantly this avoided the need to synch the files from the depot before viewing them, and was therefore quicker.
I'm now using ClearTeam Explorer and can't seem to find an equivalent. I'd like to have this for a similar purpose, to figure out exactly what I need in the load rules for my snapshot view and also to decide what views I need to create.
Does anyone know if it is possible to view what files exist under a project in ClearTeam Explorer without first creating a view on the project / joining it?
ClearTeam Explorer is basically a trimmed down Eclipse with ClearCase specific plugins.
thanks.
The easiest way would be to create a dynamic view (you need to add -stream yourStream#\yourPvob to the mkview command, I know it looks like you "joining a project", but still, dynamic view are quick to setup).
The idea is to configure your config spec with the right selection rules (a dynamic view will display the files instantly), and then make your snapshot view with those same selection rules (and the appropriate load rules, specific to a snapshot view)
Note that, according to the CCRC wiki:
With the Release of v8.0, the ClearTeam Explorer is the common Eclipse UI client that supports MVFS on native clients, as well as webviews.
CM Server in 7.1.x was renamed to CCRC Wan Server in v8.
If you don't have cleartool installed, that means you are using webviews (which are snapshot views with web access to the CCRC Wan server).
In that case, there is no easy way to browse any code from any Baseline (other than joining a project)
FWIW now, wanted to suggest a different solution here.
I would create a web view on the stream with empty load rule.
This will ensure a faster view creation.
Then from ClearTeam Navigator menu, I will enable the options to show
Unloaded VOBs
Unloaded Elements
This will ensure that the unloaded elements chosen from my element rules are displayed in ClearTeam Details and ClearTeam Navigator.
Note: You need to be connected to the CCRC server to view the unloaded elements.
Then I can browse the file structure and decide which files needs to be added to my view's load rule.
Or I can just right click on any unloaded/partially loaded resource and select "Load Resource..." which will load the item to my view.

CCRC ClearCase Remote Client - Examining view configuration details

I'm using only CCRC - I don't have ClearCase locally installed.
I use CCRC Version: 7.1.1 Build id: 7.1.1.03.00_2010C.D100803
I'm working with a mature user of ClearCase - they have hundreds of work streams in a complex child parent relationship tree. When I create a view or stream CCRC offers me a picture of this complex tree and the location of my view (or stream if I'm creating a stream).
However, once my local view is set up there appears to be no mechanism for checking the location of any views. CCRC menus which 'show ClearCase view configuration' only show the load rules (i.e. which VOB's I'm currently selecting).
Another post to Stack Overflow tells me that '.ccase_wvreg' lists the local file paths where local copies of the files are stored. But '.ccase_wvreg' doesn't show the logical name of the views.
So how does CCRC find a map the logical view names and their configuration?
Is there another file I can examine (or other work around?) which would show me the complete view configuration.
The only workaround I have today (other than being incredibly careful and keeping png images of the stream as I set it up) is to commence the process of creating a new view or stream and retrace my steps.
Its surprising that being able to confirm the location of a view is so difficult - given what happens if one mistakenly checks in or deliver to the wrong stream!!
The CLI (Command Line Interface) for CCRC might be able to provide more information, espcially regarding the config spec of your view, in which there should be mentioned the name of the associated Stream.
catcs [-username user-name][-ser/ver server-url][-pas/sword user-password]\
[-tag view-tag]
But check first in the properties of the view. It can also include that information.

ClearCase "locking" files -- How to refactor?

While at home for personal projects i use Mercurial, at work we're using ClearCase.
I am attempting to run a few horizontal (touching lots of source files) refactorings in Visual Studio for the code base, however, for since each file is locked by ClearCase, it has to be unlocked and prompts for the actual activity that the check out is for.
In Mercurial, there's no such concept as far as i'm aware of: files are not being locked at all at any point of time!
Is there a way of doing such a refactoring, or any other operation that acts on multiple files, without having to check out each and every one manually?
In a DVCS (distributed VCS like Git or Mercurial), you simply cannot "lock" a file, since all the other repos wouldn't be aware of such a "status".
But with ClearCase and its locking mechanism (optimist with "unreserved checkout" or pessimist with "reserved checkout"), you need to make a checkout to tell ClearCase you will modify some files.
However, you could also, for large refactoring:
make and update a snapshot view
set all the files as writable (through an OS-based command, not through ClearCase "checkout")
perform your changes
search for all hijacked files and checkout/checkin those files then

ClearCase: Working offline hijacking files, then checking out / merging

I'm looking at a scenario where I have an offline clear case view and I modify files in this view clearing the read-only attribute (hijacking) on the files I modify then several days later I take the view online and need to get my offline changes into the stream.
What I would do is check out the hijacked files and check them back in (merging when necessary).
Is it always safe to work this way?
Is it possible that while adding my changes I would accidentally overwrite other people's changes done while I was working offline?
Any recommendations on how to use ClearCase offline?
Thanks!
(I'm asking because a college says that this offline way of working can lead to overwriting other's changes, specifically in cases when one updates ones view after working offline for a while before converting the hijacked files into checkouts. He says it won't event propose to do a merge in some cases, just completely overwrite the contents of the element being converted with the contents of the hijacked file)
No you won't override anything while working offline.
ClearCase has a reconcliation mechanism for a snapshot view, which, when you get back online, will allow you to:
search for all hijacked files
checkout those files
then checkin them, which is when ClearCase will prompt you for a merge, if any new version has been done on that file during your time offline.
That merge will be a three-way merge with:
root version: the version before any modification by you or other
source version: the matest checkin version (done while you were offline)
destination version: your current file
What about setuping a private branch, working on it, hijacking there files and then merging your private branch on the main branch?

Resources