How to get the baselines from UCM stream in python

This simple python script will detect the baselines configured on a given UCM Clearcase stream.

At the end it will print the latest baseline found.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
import os stream = "myStream@/myVobs" latest_bl=os.popen("for a in `cleartool lsstream -fmt \"%[latest_bls]p\" " + stream + "`; do echo $a; done").readlines() print "Latest baseline found = " + str(latest_bl)
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus