IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
 
Commands Index:
  intro
  annotate
  apropos
  catcr
  catcs
  cc.icon
  cc.magic
  cd
  chactivity
  chbl
  checkin
  checkout
  checkvob
  chevent
  chflevel
  chfolder
  chmaster
  chpool
  chproject
  chstream
  chtype
  chview
  clearaudit
  clearbug
  cleardescribe
  cleardiffbl
  cleardiff
  clearexport_ccase
  clearexport_cvs
  clearexport_pvcs
  clearexport_rcs
  clearexport_sccs
  clearexport_ssafe
  clearfsimport
  cleargetlog
  clearhistory
  clearimport
  clearjoinproj
  clearlicense
  clearmake
  clearmake.options
  clearmrgman
  clearprojexp
  clearprompt
  cleartool
  clearviewupdate
  clearvobadmin
  comments
  config_ccase
  config_spec
  cptype
  credmap
  creds
  deliver
  describe
  diffbl
  diffcr
  diff
  dospace
  edcs
  endview
  env_ccase
  events_ccase
  export_mvfs
  exports_ccase
  file
  find
  findmerge
  fmt_ccase
  getcache
  get
  getlog
  help
  hostinfo
  init_ccase
  ln
  lock
  lsactivity
  lsbl
  lscheckout
  lsclients
  lscomp
  lsdo
  lsfolder
  lshistory
  ls
  lslock
  lsmaster
  lspool
  lsprivate
  lsproject
  lsregion
  lsreplica
  lssite
  lsstgloc
  lsstream
  lstype
  lsview
  lsvob
  lsvtree
  makefile_aix
  makefile_ccase
  makefile_gnu
  makefile_pmake
  makefile_smake
  makefile_sun
  man
  merge
  mkactivity
  mkattr
  mkattype
  mkbl
  mkbranch
  mkbrtype
  mkcomp
  mkdir
  mkelem
  mkeltype
  mkfolder
  mkhlink
  mkhltype
  mklabel
  mklbtype
  mkpool
  mkproject
  mkregion
  mkstgloc
  mkstream
  mktag
  mktrigger
  mktrtype
  mkview
  mkvob
  mount_ccase
  mount
  msdostext_mode
  mvfslog
  mvfsstorage
  mvfstime
  mvfsversion
  mv
  omake
  pathnames_ccase
  permissions
  profile_ccase
  promote_server
  protect
  protectvob
  pwd
  pwv
  query_language
  quit
  rebase
  recoverview
  reformatview
  reformatvob
  register
  relocate
  rename
  reqmaster
  reserve
  rgy_backup
  rgy_check
  rgy_passwd
  rgy_switchover
  rmactivity
  rmattr
  rmbl
  rmbranch
  rmcomp
  rmdo
  rmelem
  rmfolder
  rmhlink
  rmlabel
  rmmerge
  rmname
  rmpool
  rmproject
  rmregion
  rmstgloc
  rmstream
  rmtag
  rmtrigger
  rmtype
  rmver
  rmview
  rmvob
  schedule
  schemes
  scrubber
  setactivity
  setcache
  setcs
  setplevel
  setsite
  setview
  shell
  snapshot.conf
  softbench_ccase
  space
  startview
  type_manager
  umount
  uncheckout
  unlock
  unregister
  unreserve
  update
  version_selector
  view_scrubber
  vob_restore
  vob_scrubber
  vob_sidwalk
  vob_snapshot
  vob_snapshot_setup
  wildcards_ccase
  winkin
  xclearcase
  xcleardiff
  xmldiffmrg

lslock

Lists locks on objects

APPLICABILITY

ProductCommand type
ClearCasecleartool subcommand
ClearCase LTcleartool subcommand

Platform
UNIX
Windows

SYNOPSIS

lslock [ –local ] [ –l·ong | –s·hort | –fmt format-string ] [ –obs·olete ]
[ [ –a·ll ] [ –pna·me ] pname ...
| object-selector ...
]

DESCRIPTION

The lslock command lists locks that have been placed on one or more VOB-database objects (with the lock command). The listing can include all the locks created within a VOB or a particular set of locks:

  • Locks on elements or branches
  • Locks on type objects
  • Locks on VOB replica objects
  • Locks on VOB storage pools
  • The lock on the VOB object itself

Obsolete Type Objects

Type objects can be rendered obsolete with the lock –obsolete xxtype: command. lslock lists an obsolete type object if you specify its name with a type-name argument or you use the –obsolete option.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

Listing Lock State of Local Copies of Global Types

Default
lslock displays the lock state of the global type for the object selector you specify.

–local
Displays the lock state of the local copy of the global type. For more information, see the Administrator's Guide.

Report Format

Default
A lock listing looks like this:

01-Sep.08:42 drp lock attribute type "AT2" (locked)
 "Locked for all users."

–l·ong
Expands the listing with more time-specific and user-specific information.

–s·hort
Restricts the listing to names of locked objects only.

–fmt format-string
Lists information using the specified format string. See the fmt_ccase reference page for details about using this report-writing facility.

Listing Obsolete Objects

Default
  An obsolete object is not listed unless you specify it with a command-line argument.

–obs·olete
Includes obsolete objects in the listing. (Has no effect if you specify one or more objects with arguments.)

Specifying the Locked Objects

Default
Lists all the locks created in the VOB containing the current working directory.

[ –pna·me ] pname ...
One or more pathnames, each of which specifies an element or branch:
foo.cElement foo.c
foo.c@@Element foo.c
foo.c@@/main/bugfixBranch of element foo.c

(Versions cannot be locked; a pathname to a version references the element object.) Using pname arguments restricts the listing to locks on those particular objects (but see the –all description below).

If pname has the form of an object selector, you must include the –pname option to indicate that pname is a pathname.

Note: Specifying an element lists only the lock on the element itself, not on any of its branches.

–all
For each pname argument, lists all locks in the VOB containing pname. Has no effect if you don't specify any pname argument (because the default is to list all locks in the current VOB).

object-selector ...
One or more non-file-system VOB objects. The objects must exist in the VOB containing the current working directory, unless you specify another VOB with @vob-specifier. Specify object-selector in one of the following forms:
vob-selector [vob:]pname-in-vob
  pname-in-vob can be the 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). It cannot be the pathname of the VOB storage directory.
attribute-type-selector attype:type-name[@vob-selector]
branch-type-selector brtype:type-name[@vob-selector]
element-type-selector eltype:type-name[@vob-selector]
hyperlink-type-selector hltype:type-name[@vob-selector]
label-type-selector lbtype:type-name[@vob-selector]
trigger-type-selector trtype:type-name[@vob-selector]
pool-selector pool:pool-name[@vob-selector]
oid-obj-selector oid:object-oid[@vob-selector]
   
The following object selector is valid only if you use MultiSite:
replica-selector replica:replica-name[@vob-selector]

EXAMPLES

The UNIX examples in this section are written for use in csh. If you use another shell, you may 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 may 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 shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • List the locks on three label types.

    cmd-context  lslock lbtype:REL1 lbtype:REL1.1 lbtype:REL2 
    08-Dec.12:19 jackson lock label type "REL1" (locked)
     "Locked for all users."
    08-Dec.12:19 jackson lock label type "REL1.1" (locked)
     "Locked for all users."
    08-Dec.12:19 jackson lock label type "REL2" (locked)
     "Locked for all users."

  • List the lock on a particular branch of a particular element.

    cmd-context  lslock util.c@@/main/rel2_bugfix 
    08-Dec.12:19 jackson lock branch "util.c" (locked)
     "Locked for all users."

  • List the entire-VOB lock on the current VOB, in long format.

    cmd-context  lslock –long vob:. 
    08-Dec-98.14:57:58 Chuck Jackson (test user) (jackson.dvt@oxygen)
     lock versioned object base "s:\people\chuck\hw.vbs" (locked)
     "Locked for all users."

  • List all locked objects (including the obsolete ones) in the current VOB.

    cmd-context  lslock –obsolete 
    08-Dec.12:18 jackson lock file element
    "/usr/hw/src/hello.c@@" (locked)
    "Locked for all users."
    08-Dec.12:19 jackson lock label type "REL1" (locked)
     "Locked for all users."
    08-Dec.12:19 jackson lock label type "REL2" (locked)
     "Locked for all users."
    08-Dec.12:18 jackson lock branch type "test" (locked)
     "Locked except for users: gomez jackson"
    08-Dec.12:18 jackson lock branch type "patch3" (obsolete)
     "Locked for all users (obsolete)."
    08-Dec.12:18 jackson lock file element
    "/usr/hw/src/convolution.c@@" (locked)
    "Locked for all users."
    08-Dec.12:19 jackson lock branch
    "/usr/hw/src/util.c@@/main/rel2_bugfix@@" (locked)
    "Locked for all users."

  • List the locks on two of the current VOB's storage pools.

    cmd-context  lslock pool:staged pool:cdft 
    08-Dec.12:19 jackson lock pool "staged" (locked)
     "Locked for all users."
    08-Dec.12:19 jackson lock pool "cdft" (locked)
     "Locked for all users."

SPONSORED LINKS



 

ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News