我正在编写一个windows批处理脚本,它有一个if条件,用于检查是否创建了新的基线,即是否提交了任何新的更改。
我试过了:
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)但这并没有像我预期的那样工作。
有没有办法运行clearcase命令,只是为了得到一个布尔值或一些返回值。这样我就能知道是否创建了新的基线。
发布于 2013-09-19 01:29:48
您应该:
fmt_ccase)cleartool descr -fmt "%%found_blsCXp\ -cstream
请参阅"Batch file: Find if substring is in string (not in a file)".
对于当前基线:列出流的所有基线并取最新基线。
cleartool lsbl -stream aStream@\aPVob -component aComponent@\aPvob|tail -1https://stackoverflow.com/questions/18878372
复制相似问题