1

In my snapshot view. while working on source code through my IDE, I added lots of files at different sub directories. All those files become view-private files. I wanted to know is there any mechenism to get list of all view private files from parent directory?

I am new to clear case. I have used SVN mostly so my question is related to get all files at once and check, uncheck respective files in one dialog & add to source control, becomes easir for me.

Any command option will also do.

Thanks in advance,

1 Answers1

0

Yes, you can see all files that are private:

See:

The main command is

# Windows
    for /F "usebackq delims=" %i in (`cleartool ls  -rec ^| find /V "Rule:" ^| find /V "hijacked" ^| find /V "eclipsed" ^| find /V "-->"`) do @echo "%i"

# Unix
cleartool ls -rec | grep -v "Rule:" | grep -v "hijacked" | grep -v "eclipsed" | grep -v "-->" | xargs echo

However, you need to know that ClearCase is file centric: it operates file by file.
Contrary to SVN, there is no neat dialog box for committing "all modified files" in one atomic fashion.


When you have a lot of private files to add, and you have them all over your snapshot view, one trick is:

  • create a dynamic view (and mount the Vob in which you are working)
  • set the same config spec than your snapshot view
  • use the snapshot view as a source for a clearfsimport command to import the content of your snapshot view into your dynamic one.
    All identical elements won't be affected.
    Only new elements will be added to source control automatically, meaning the checkout of the parent directory, mkelem of the new element, and checkin of the parent directory will be done for you, automatically, for all new element during the import.
  • cleartol update -overwrite your snapshot view: the -overwrite option is important in order to transform your private file (which would be consider at this point as "hijacked" files) into official versioned elements.

(Note: the process is slightly different for an UCM view, but the idea remains: if you have a lot of new files to ad, clearfsimport is the tool for you).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250