1

I am facing a problem in getting list of checkouts in IBM Clearcase:

Getting list of checkouts for task branch is so easy: we can get by:

ct lsco branch brtype:<br.name> \vob

with this command we can take list, but integration branch, I am clueless.

If anybody working on IBM CC, please help me to sort out the problem.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

2 Answers2

0

As I mention in "How to find Branch name of ClearCase view", if you have an UCM view based on the UCM Integration stream, you can get the stream name with:

cleartool lsstream -cview

While a stream is not a branch, you can, if you don't have a view, create a view from that stream.

From there, you can use the same ct lsco branch command you were using, with the name of the integration stream.

If you follow "Using ClearCase dynamic views", joining an UCM project would create a task view.

But you can create a dynamic UCM view by using the name of the integration stream.

cleartool  mkview -tag yourName_streamName_Int_dyn -stream stream:streamName@\aPvob -stg views

Replace:

  • yourName by your login (naming convention for your views)
  • streamName by the integration stream name
  • aPVob by the PVob name of the stream
  • views by the view storage name you are using for your ClearCase views
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Am using clear case snapshot view, so that is it possible to take no.of ie list of filed in integration branch ? – Arockia Jegan Aug 24 '21 at 11:55
  • @ArockiaJegan You can start testing the answer with a dynamic view first. – VonC Aug 24 '21 at 12:03
  • The scenario is , I will be trying to merge my code from task branch to integration branch ,. That time I may get some conflicts , so conflicts will give us Error, to fix that problem I will be checking out all the files from integration branch and after fixing this issue I will be performing the operation again, this is the ideology , now in my case there is no problem in dynamic view but in snapshot view even after checking out the eye is pointing to integration branch itself , but it should point to task branch – Arockia Jegan Aug 24 '21 at 12:07
  • So if I take the list of checkouts in integration branch I can easily undo checkout the files and parelelly I will be updating the old config spec , so that problem will be fixed , this is the idea, so I have to work on snapshot – Arockia Jegan Aug 24 '21 at 12:09
  • @ArockiaJegan Why not have two different views, one referencing the old config spec? – VonC Aug 24 '21 at 12:12
  • We can optimise all the operations in a single view , why do we require two views to take list of checkouts and to set the configspec , so this is the ideology, there where I’m working – Arockia Jegan Aug 24 '21 at 20:26
  • @ArockiaJegan OK. Then testing that optimized apporach in one view would be in a dynamic view: easier to change the config spec and see immediately the updates. – VonC Aug 24 '21 at 20:55
  • Hi gentle man , I found a answer see the next comment, but another interesting problem was there , try if you can help me , it’s much better – Arockia Jegan Aug 27 '21 at 12:06
0
ct Isco -cview -brtype:main -r -fmt “%n\n”

This comment will give the result… but the interesting problem is we will not get exact path instead we will be get .\foldername\filename

mechnicov
  • 12,025
  • 4
  • 33
  • 56
  • Is this for a dynamic view? – VonC Aug 27 '21 at 12:16
  • No In snapshot view, actually my job is to test and make it work on snapshot view , so I am using snapshot view – Arockia Jegan Aug 27 '21 at 12:20
  • But... for a ct lsco -cview to work, it needs to be executed in a folder inside the snapshot view. So the script itself can determine from where it is being run. And knowing the name of the VOB, you can extract the root folder of the snapshot view itself. – VonC Aug 27 '21 at 12:24
  • @VonC yeah , I have ran it inside the VOB only, you are right, it is giving that particular result , is there any way to get complete path with drive letter and VOB name and then file name ? – Arockia Jegan Aug 27 '21 at 12:38
  • What are you using as OS version and script language? – VonC Aug 27 '21 at 14:14
  • Windows 10 & I am using XML scripting language – Arockia Jegan Aug 27 '21 at 14:15
  • XML scripting language? I am not familiar with that. Can you edit your answer with an extract of the current script? – VonC Aug 27 '21 at 14:16
  • @VonC can you please elaborate more !? Extract means with -x ? – Arockia Jegan Aug 27 '21 at 14:17
  • I meant: "can you copy-paste your script in your answer"? (for me to have a look and understand what a "XML scripting language" looks like) – VonC Aug 27 '21 at 14:34
  • At final I will be scripting in XML, as of now I am testing in command prompt , in command prompt only I’m executing the commands the command i have ran is … after entering into VOB by cd VOB name, then >>> ct lsco-cview-brtype brtype:main -r -fmt “%n\n” this command will give us checkouts of main branch, now I need to get full complete path , the result I got is .\foldername\filename – Arockia Jegan Aug 27 '21 at 14:46
  • So... no chance for me to understand what "XML scripting language" means or looks like? – VonC Aug 27 '21 at 15:19
  • It’s not like that , it will make our discussion complex , more complex , I already made a script for run clear tool command , with that script I can easily run any kind of clear tool commands, and here you may not understand if I post also because it have more depended script behind it – Arockia Jegan Aug 27 '21 at 15:22
  • OK. In bat script, I would use https://stackoverflow.com/a/3827582/6309 to get the execution path, and get the substring up to the vob name, in order to extract the view root folder. (But in "XML script language", whatever that is, ... no idea) – VonC Aug 27 '21 at 15:40