Question

Good morning,

is there any way to exclude only one particular directory from a snapshot's load statement, e.g. I want to load a whole vob named 'PM_CT' except the \PM_CT\lost+found directory

... is there an elegant way to do it? And how would I generally exclude all lost+found directories across multiple loaded vobs?

Cheers and Thanks,

-Jörg

Was it helpful?

Solution

element /PM_CT/lost+found -none

The "elegant" way consists of:

  • adding a selection rule (here "-none")
  • loading all PM_CT without aking any question (load /PM_CT), if your view is a snapshot one

Note: in a config spec, always use "/": it is easier, and Windows as well as Unix ClearCase views will be able to interpret it.

Caveats:

  • the previous solution is for one vob, I do not think you could use "wildcard" for multiple vobs
  • the '-none' option can cause a snapshot view to fail during a deliver or rebase (UCM merge): for that kind of operation, a dynamic view would be more suited. That is for CC 2003.06 and early 7.0. I think it works better with the latest CC7.1.0.2

Note: that selection rule can also be used for dynamic views, in order to mask some directory you would not want to see.

OTHER TIPS

I would like to make an addition to the previously posted answer:

The lost+found directories

To exclude the lost+found directories across all VOBs you can modify the previously proposed selection rule to be more generic:

#Skip the lost+found directories
element .../lost+found -none

However, using the '-none' flag causes the Windows ClearCase client to list errors when updating a snapshot view:

Unable to load "lost+found": no version selected in configuration specification.
Unable to load "lost+found".

It also does not properly unload any previously loaded folders or files, so you may need to recreate your snapshot view (or unload/reload the VOB) with the new selection rule if you really want to clean out the lost+found directories...

Elegance

For excluding any normal folder, the "elegant way" would be to specifically load the /main/0 version of the folder:

#Exclude the contents of a directory
element /VOB_name/folder_path /main/0

This will cause the folder to be loaded as empty and will not produce an error. It will also properly unload any loaded files. It unfortunately does not work for the lost+found directory, because it is always listed as version /main/0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top