1

I am writing a windows batch script which has a if condition that checks if a new baseline was created i.e. if any new changes were submitted.

I tried:

SET REBASE_RETURN="No rebase needed"
SET FLAG=true
for /f usebackq %%F in (`cleartool desc -fmt %%[latest_bls]Cp\ stream:%INTSTREAM%@\%PVOB%`) do ( 
cleartool rebase -baseline %%F@\%PVOB% -complete | findstr !REBASE_RETURN!
IF ERRORLEVEL 0 SET FLAG=false)

But this is not working as i expected.

Is there a way i can run a clearcase command, just to get a boolean or some return value. So that i know if a new baseline was created.

jsbisht
  • 9,079
  • 7
  • 50
  • 55

1 Answers1

0

You should:


For the current baseline: list all the baselines of a stream and take the latest.

cleartool lsbl -stream aStream@\aPVob -component aComponent@\aPvob|tail -1

(with tail.exe coming from the Gnu On Windows)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi Von. I used the above command to get the foundation baseline. This command gives useful information about the stream. But this doesn't give me the current baseline of my view. – jsbisht Sep 29 '13 at 17:31
  • I am looking for a way to compare the current baseline of my view with the latest baseline. – jsbisht Sep 29 '13 at 17:32
  • @jaggib by "current baseline", I assume the latest baseline (most recent) that you have set on a stream for a component? If so, I have edited my answer. – VonC Sep 29 '13 at 17:53
  • Thanks for the update. Sorry to say but I am not getting any output after running the command "cleartool lsbl -stream aStream@\aPVob". No error, no info. I tried running it with -component but i dont think thats applicable in my case. – jsbisht Oct 01 '13 at 12:56
  • @jaggib Well, did you ever make a baseline on that Stream? – VonC Oct 01 '13 at 13:11
  • Actually i havent created a baseline on that stream. Its just that i take stream on one of our builder. And if was looking for a way to check if i need to trigger a rebuild on the builder if new baseline was created i.e. baseline newer than the last used baseline. – jsbisht Oct 02 '13 at 16:03
  • @jaggib then my answer stands: if the `lsbl -stream` doesn't return any result, then no baseline newer than the last used baseline has been created. – VonC Oct 02 '13 at 18:21
  • Thanks Von. i will check on that and get back. In coming days or so. :) – jsbisht Oct 04 '13 at 10:58