Sudhakar.N Sabari
Sudhakar.N Sabari

Reputation: 53

How to find/list the checked-in files in current view?

I have:

  1. a view created as dynamic view
  2. Files which are checkout or checked-in.

Now I want know the list of files checked-in in view.
What command should I use?

Upvotes: 1

Views: 999

Answers (1)

VonC
VonC

Reputation: 1324397

One way would be to use cleartool ls, and grep for /main/LATEST (or just LATEST if you don't care of the branch selected, depending on your config spec)

cleartool ls -r -view|grep LATEST

Only versioned checked-in file would be listed that way.


Using cleartool find is also a possibility, but would list versions even for files which are checked out, which is not what you want.
See those examples to illustrate the difference.

to list element versions on a branch but exclude checkedout versions

  • The first example lists all element versions including any CHECKEDOUT versions.
  • The second example shows how to list all element versions, but excluding any CHECKEDOUT versions.
EXAMPLE 1:
> cleartool find . -version "brtype(bugfix)" -print
./a.c@@/main/bugfix/0
./a.c@@/main/bugfix/1
./a.c@@/main/bugfix/2
./a.c@@/main/bugfix/CHECKEDOUT
./golf.c@@/main/bugfix/0
./golf.c@@/main/bugfix/1

EXAMPLE 2
> cleartool find . -version "brtype(bugfix)" -print | grep -v CHECKEDOUT
./a.c@@/main/bugfix/0
./a.c@@/main/bugfix/1
./a.c@@/main/bugfix/2
./golf.c@@/main/bugfix/0
./golf.c@@/main/bugfix/1

Upvotes: 0

Related Questions