1

I know how to list all the checkouts in a single view with:

cleartool lscheckout -recurse

I want to be able to crossreference the checkouts against the views that made the checkout.

Is there a way to list which view an element was checked-out by?

RichTBreak
  • 559
  • 6
  • 11

2 Answers2

2

The output of lsco -long, when there is a lot of output, is not necessary human-friendly and depends on your location within the VOB in question.

To get a more friendly view, that will include files perhaps not visible in your current view, try this:

cleartool lscheckout -all -fmt "%Tf\t%n\n" | sort

This will print all checked out versions, sorted by and leading with the view tag that checked out the version. This may be blank or have a UUID if the view is not tagged in the current registry region. You could also use %TUf to get the UUID (which is always present) and post process the UUID to get the view tag if available.

Brian Cowan
  • 1,048
  • 6
  • 7
  • Thank you for this, it addresses my needs pretty much exactly. A departing team member has left many checkouts in multiple views and your solution addresses the need to sort by view tag. – RichTBreak Aug 25 '18 at 22:12
1

The cleartool lscheckout (lsco) man page includes:

-l/ong

Expands the listing to include the view to which the element is checked out.

So you should see the views having checked out those elements with:

ct lsco -r -l

Example:

M:\SC-II-def\aug2007\dira>cleartool lsco -l
2008-07-14T16:42:39-04:00 Denise Smith (user1.user@sc-II)
 checkout version "c.txt" from \main\1 (reserved)
 by view: SCII-snap
"sc-II:C:\clearcase_storage\viewstore\SCII-snap.vws")

(See in "Uncheckout an element from a snapshot view when the view root directory is not accessible")

Brian suggests below to use fmt_ccase, which I did in the past.

The exact format is -fmt "%TUf\t%n\n", with

  • %TUf the UUID of the view that holds the checkout
  • %Tf the tag (if present in the current region)
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250