14

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?

cringe
  • 13,401
  • 15
  • 69
  • 102

1 Answers1

28

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
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 3
    Good answer. If you want to select only your checkouts, you can execute the following command: `cleartool lsco -me -cview -avobs` – Dominique Terrs Oct 16 '13 at 16:36
  • @DominiqueTerrs Indeed, as I already documented and illustrated in http://stackoverflow.com/a/1410536/6309 and http://stackoverflow.com/a/12186459/6309 – VonC Oct 16 '13 at 17:47
  • @yellowantphil Thank you. I have updated the link accordingly. – VonC Jan 17 '17 at 20:51
  • 1
    To list only the file names, without the version details, we can use "short" `cleartool lsco -short -avobs -cview` – Manjunath K Mayya Jul 07 '20 at 15:12
  • @ManjunathKMayya Thank you for this feedback. I have included your comment in the answer, for more visibility. – VonC Jul 07 '20 at 15:27