1

I would like to uncheckout list of elements in hierarchical manner

Ie: Lt say folder1 & folder2, folder3 are framed in hierarchical basis:

  • folder3 is child,
  • folder2 is parent,
  • folder1 is grand parent

I would like to uncheckout child first then parent then garand parent:
how I can become to know which one is parent and which one is grand parent?

Leads are welcomed.

mzjn
  • 48,958
  • 13
  • 128
  • 248

1 Answers1

0

You would need to write a script which walks all elements of each folder, starting with the one having the most depth: "F3".

The script would then go one level up (possibly F2) and repeat the process for all elements, except subfolders.
And then one level up, until you get to F1.

In each folder, you can combine cleartool find -exec with the unco command in order to automate the ct unco step.
See "How do I perform a recursive checkout using ClearCase?" (except in your case, it is unco, with files first, folders second)

Reminder: unco means unco files first, and then only then: unco folders.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have a problem with logic gentle man,. I can’t solve it.. I have tried two logics but can’t fix it off! … hence F3 is last grand Child I have to uncheckout that first then F2 then F1, here by F1,F2,F3 Will be in a tree,, so I can take one element and I can check whether it has any parent node with specific key ., but this logic doesn’t work in expected manner – Arockia Jegan Feb 15 '22 at 09:55
  • @ArockiaJegan That would be best addressed in a separate question where you can illustrate what exact command you have executed, and the `cleartool status` which would show it did not work as intended. – VonC Feb 15 '22 at 13:06
  • https://stackoverflow.com/q/71143019/7567396 … hi @VonC please refer this post and let me know if you can help., I feel you may know, here why do we need to do this means if we uncheckout parent first all other directories will get corrupted., as we don’t have much source for those kind of problems I got struck – Arockia Jegan Feb 16 '22 at 13:52
  • @ArockiaJegan What programming language or scripting language are you using for that? – VonC Feb 16 '22 at 13:56
  • I am using xml scripting which has oops concepts., it’s called Linked modular Object Oriented XML – Arockia Jegan Feb 16 '22 at 13:57
  • @ArockiaJegan Interesting. Do mention that clearly in your question, and someone familiar with Linked modular Object Oriented XML might answer. – VonC Feb 16 '22 at 14:00
  • it’s not possible gentle man,. That term is proprietary to my office,. So no one will know that.. I just want to know the logic on tree based.. more than two weeks I’m struggling here., and it’s still hanging me – Arockia Jegan Feb 16 '22 at 14:03