Pacopenguin
Pacopenguin

Reputation: 384

Clearcase: See result of checkout, without actually checking out

Imagine a scenario where your config spec looks something like the following:

element * CHECKEDOUT
element * .../branch_two/LATEST
element * .../branch_one/LATEST -mkbranch branch_two
element * BASE_LABEL -mkbranch branch_one

I'd like to see what a co command would actually do, i.e. see all the branches it would create when checking out a file, without actually checking out the file (for one reason or another, we don't have a trigger set up to automatically delete lone version 0s of files on a branch, so manually cleaning them up is a hassle & very stressful). This is a relatively simple example, but your config spec can grow to be quite large & mistakes can certainly happen while writing it. Given that I'm no expert in Clearcase, I'd really benefit from a way to verify that my config spec is written correctly.

ct ls helps, but it only lets you see "one level down," so to speak. I think maybe ct co -query is supposed to perform this role, but when I tried it on my machine, I just got the standard ct co behavior, as if the flag wasn't there, so I'm not sure if there's another way to go about this.

Upvotes: 1

Views: 73

Answers (1)

VonC
VonC

Reputation: 1329102

I don't see that feature native in ClearCase.

Which mean you would to:

  • either make a script able to undo a checkout and, by anylising the output of an ct unco, removing any 0 placeholder version
  • or make cleartool find query which would try and find version following your config spec order: that would give an indication regarding the branch about to be created when doing an actual checkout.

But in general when it comes to checkout, I don't know of a "preview" option.

Upvotes: 1

Related Questions