1

With git (and other revision control apps like mercurial), you have a "status" functionality for a repository, which lists the repo files which are Modified, Deleted, Moved, Added or Missing.

How do we achieve the same in ClearCase (relative to the non-checked-out version chosen by the configspec currently in effect)?

The best I have so far is listing the files with modifications using ct diff and grep'ping for ---'s.

einpoklum
  • 118,144
  • 57
  • 340
  • 684

1 Answers1

0

Anything related to file status is usually managed by cleartool ls

cleartool ls -r -l -vis

You can also add --view-only to restricts the listing to objects that belong logically to the view: view-private files, view-private directories, and view-private links; checked-out versions; and all derived objects visible in the view.

But I suspect some kind of post-processing (grep/awk) will be needed to get exactly what you want.

You have an example in bmpenuelas/gfcc

gfcc status

clearcase actions: List all new or modified files.
cleartool ls -rec -view_only to get new files.
cleartool lsco -cview -a -s to get all the checked out files, then find those which have been actually modified with cleartool diff -predecessor.

So a better git status equivalent is, according to this project, a bit more involved.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • gfcc is very interesting, although tricky on machines with no python. Your first command really doesn't do what I want... – einpoklum Nov 19 '20 at 15:47
  • @einpoklumYes, I though a simple `ct ls` might not be enough, which is why I mentioned the `gfcc` project. Even if you don't have python, you can get, from its sources, what is needed to emulate a `git status` (through a combination of `ct ls`, `ct lsco` and `ct diff`) – VonC Nov 19 '20 at 16:06
  • I might write a shell script for this with some text processing like you suggest. If I do, I'll post it here. – einpoklum Nov 19 '20 at 16:19
  • @einpoklum That would be great! – VonC Nov 19 '20 at 16:46