lscheckout

Lists checkouts of an element

Applicability

Product

Command type

ClearCase®

cleartool subcommand

ClearCase Remote Client

rcleartool subcommand

Platform

UNIX

Linux

Windows

Synopsis

  • ClearCase—List checkouts:
    lsc/heckout | lsco [ –l/ong | –s/hort | –fmt format-string ]
    [ –cvi/ew ]

    [ –brt/ype branch-type-selector ]

    [ –me | –use/r login-name ]

    [ -r/ecurse | -d/irectory | -a/ll | -avo/bs ] [ -are/plicas ]

    [ pname ... ]

  • ClearCase—On Windows, list checkouts graphically:
    lsc/heckout –g/raphical pname
  • ClearCase Remote Client—List checkouts:
    lsc/heckout | lsco [ –l/ong | –s/hort ] [ –brt/ype branch-type-selector ]

    [ –cview ] [ –me | –use/r login-name ]

    [ -r/ecurse | -d/irectory ] [ pname ... ]

Description

The lscheckout command lists the checkout records (the checkouts) for one or more elements. There are many controls for specifying the scope: which elements, directories, or VOBs; which user; which view; and so on.

Restrictions

None.

Options and arguments

Listing checkouts graphically

Default
Lists checkouts in the command window.
–g/raphical
Displays checkouts in a GUI.

Report format

Default
The listing of a checkout event record looks like this:

2007-08-31T20:19 drp checkout version "ct_lscheckout.1" from /main/4
(reserved)   “delete extra spaces�?

–l/ong
Expands the listing to include the view to which the element is checked out.
–s/hort
Restricts the listing to the pathnames of checked-out elements.
–fmt format-string
Lists information using the specified format string. For details about using this report-writing facility, see the fmt_ccase reference page.

Selecting checkout records to list

Default
The listing includes all checkouts for the specified elements, including checkouts made in any view by any user.
–me
Restricts the listing to your own checkouts.
–use/r login-name
Restricts the listing to checkouts made by the specified user.
–cvi/ew
Restricts the listing to checkouts made in the current view. On UNIX and Linux systems, if there is a working directory view, lscheckout lists its checkouts; otherwise, it lists the checkouts in the set view.
–brt/ype branch-type-selector
Restricts the listing to checkouts on branches of the specified type. Specify branch-type-selector in the form [brtype:]type-name[@vob-selector]

–brt/ype branch-type-selector

type-name

Name of the branch type

vob-selector

VOB specifier.

Specify vob-selector in the form [vob:]pname-in-vob

pname-in-vob

Pathname of the VOB tag (whether or not the VOB is mounted) or of any file system object within the VOB (if the VOB is mounted)

Specifying the elements

Default
If you do not specify any options, lscheckout lists all checkouts of elements in the current working directory, to any view. If the current directory is itself checked out, this is also indicated.
pname ...
One or more path names, specifying file elements and/or versions of directory elements. (A Windows path name or a standard or view-extended path name to a directory on UNIX or Linux specifies the version in the view.)
  • For each pname that specifies a file element, the listing includes that element's checkout event records.
  • For each pname that specifies a version of a directory element, the listing includes checkout event records of elements cataloged in that directory version, but not checkout records for the pname directory itself.

The following options modify the processing of the pname arguments.

–r/ecurse
Lists the checkouts of elements in the entire subtree below any directory encountered in the current view. VOB symbolic links are not traversed during the recursive descent.
–d/irectory
Lists the checkouts (if any) of a directory itself, rather than the checkouts of elements cataloged in it.
–a/ll
Lists all the checkouts in the VOB containing pname. If you do not specify any pname arguments, lists all checkouts in the VOB that contains the current working directory.
Note: A file element can have several names, by virtue of one or more VOB hard links. Checking out such an element under one name causes all the names to be listed as checked out. However, the –all option lists the checked-out element only once.
–are/plicas
Lists checkouts of the element specified by pname in all replicas of the VOB that contains pname. If you do not specify any pname arguments, lists all checkouts in all replicas of the VOB that contains the current working directory.

The following option is mutually exclusive with pname arguments:

–avo/bs
Similar to –all, but includes checkouts in all VOBs active (mounted) on the local host. (If environment variable CLEARCASE_AVOBS is set to a list of VOB-tags, this set of VOBs is used instead.) This option depends on the MVFS, and so has no meaning for snapshot-view-only hosts.
Note: A view context is required when using this option.

Examples

The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you might need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you might need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • List the checkouts in the current working directory.

    cmd-context lscheckout
    —12-08T12:17 jackson checkout version "hello.c" from /main/4 (reserved)
    —12-08T12:17 jackson checkout version "hello.h" from /main/1 (unreserved)
    "modify local defines"
    —12-08T12:17 jackson checkout version "msg.c" from /main/rel2_bugfix/0
    (reserved)

  • List only the names of elements checked out to the current view.

    cmd-context  lscheckout –short –cview
    hello.c
    hello.h
    hw.c
    include

  • List the checkouts in all directories at or below the current directory.

    cmd-context lscheckout –recurse
    —12-08T12:17 jackson checkout version "hello.c" from \main\4 (reserved)
    —12-08T12:17 jackson checkout version "hello.h" from \main\1 (unreserved)
        "modify local defines"
    —12-08T12:17 jackson checkout version "msg.c" from \main\rel2_bugfix\0
    (reserved)
    —12-08T12:17 jackson checkout directory version "subd" from \main\1
    (reserved)
    —12-08T12:17 jackson checkout version ".\subd\util.h" from \main\0
    (reserved)

  • List elements checked out by the user in all mounted VOBs.

    cmd-context  lscheckout –avobs –me
    —12-08T12:17 jackson checkout version "/usr/hw/src/hello.c" from /main/4
    (reserved)
    —12-08T12:17 jackson checkout version "/usr/hw/src/hello.h"from /main/1
    (unreserved)
        "modify local defines"
    —12-08T12:17 jackson checkout directory version "/usr/hw/release" from
    /main/0 (reserved)
    —12-08T12:17 jackson checkout version "/usr/hw/src/msg.c" from
    /main/rel2_bugfix/0 (reserved)
    —12-08T12:17 jackson checkout version "/usr/hw/src/util.h" from
    /main/0 (reserved)

  • For all checkouts in the current directory, list the checkout date, user name, element name, predecessor version, host, checkout status, and element type. (The command line, including the quoted format string, constitutes a single input line. The input line below is broken to improve readability. Spaces are significant.)

    cmd-context lsco –fmt "%d\t%Lu\t%En\n\tPredecessor:
    %[version_predecessor]p\n\t
    Host: %h\n\tStatus: %Rf\n\tElement type: %[type]p\n"

    2006-06-16T15:23:15     lee.user        files.txt
    Predecessor: \main\96
    Host: neon
    Status: unreserved
    Element type: text_file
    2006-06-09T15:39:09     susan.user      mkfile.fm
    Predecessor: \main\27
    Host: pluto
    Status: reserved
    Element type: frame_document
    2006-06-16T12:23:11     cheryl.user     mktype.fm
    Predecessor: \main\115
    Host: troy
    Status: reserved
    Element type: frame_document
    2006-06-10T12:29:30     john.user       files.txt
    Predecessor: \main\26
    Host: marcellus
    Status: reserved
    Element type: text_file

  • List the mastership status of checkouts, including the UUIDs of the views and the object IDs of the replicas that hold the checkouts.

    cmd-context cleartool lsco -arep -fmt "%n %f %Rf %Mf %TUf %[checkout_replica]p".

    foodir/bar.c /main/1 unreserved nonmastered ec75f72f.36e811cf.ad5f.08:00:2b:37:87:01 replica2@/tmp/sumu2_rep2
    foodir/bar.c /main/1 reserved mastered bcb3125c.050211d1.be19.00:00:f8:22:fc:89 original@/tmp/sumu2_rep2
    foodir/foo.c /main/1 unreserved mastered bcb3125c.050211d1.be19.00:00:f8:22:fc:89 original@/tmp/sumu2_rep2