Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find all checkedout files with ClearCase cleartool?

I'm trying to setup our ClearCase with Hudson for a continuous integration (and deployment later).

I finally got a UCM view for the build, but unfortunatly our build process checks out files to store the build number. Now the build broke and the file is still checked out, preventing the next build.

I already now about cleartool find . -type f, but I can't figure out how to find checked out files. I know the syntax of UNIX' find, so that isn't a problem.

Can someone point me to a documentation of the query language or maybe give an example to find checked out or hijacked files?

like image 994
cringe Avatar asked Jun 22 '10 11:06

cringe


People also ask

How do I see all checked out files in ClearCase?

In Rational ClearCase Explorer in the Folder pane, right-click an entry for a versioned folder. Then click Find Checkouts. In the Find Criteria window, in the Include additional folders? area, select Include subfolders.

How do I view-private files in ClearCase?

Answer. To find view-private files within a snapshot view, use cleartool ls -recurse -view_only .

How do I undo checkout all files from ClearCase?

From Rational ClearCase Explorer or Windows Explorer, right-click the file or directory. On the Rational ClearCase shortcut menu, click Undo Checkout.

How do I find my branch in ClearCase?

Branch, version, and label information for resources under ClearCase source control is available through the ClearTeam Navigator View. and ClearCase properties view. You can also use the ClearCase Version Tree view to find branch, version, and label information for ClearCase resources.


1 Answers

You can start by this SO question on how to list private files.

Then it depends on the nature of your ClearCase view.
On a dynamic view for instance, a simple ct lsprivate list private files (including hijacked ones) and checkout files.

The official command is cleartool lscheckout (or 'lsco').
If you are within the right vob within your view:

$/path/to/view/vobs/aVob
cleartool lsco -rec -cview

,should list all checked out files from any user in any sub-directories of said vob.

But if your build is broken because of files checked out in several vobs, then you need to widen the scope:

$/path/to/view/
cleartool lsco -avobs -cview

(you don't need to be in a specific vob in this case)


As Manjunath K Mayya points out in the comments:

To list only the file names, without the version details, we can use "short":

cleartool lsco -short -avobs -cview
like image 143
VonC Avatar answered Oct 03 '22 17:10

VonC