主要的问题是,当代码获得ModuleVersion(第11行)时,它使用函数的一种形式来获取模块的当前版本。第14行应该调用
isBaseline公司
基线
,使最后两行多余。
请参阅DXL参考手册当前版本(9.6.1)的第310页,以获取有关
模数转换
功能。
Module mp = current
Baseline bp = getMostRecentBaseline(mp)
int majorVersion = major(bp)
int minorVersion = minor(bp)
print "major " majorVersion " minor " minorVersion "\n"
string suff = suffix(bp)
print "suffix " suff "\n"
bool bstat
bstat = isBaseline(mp)
print "bstat " bstat "\n"
ModuleVersion mv = moduleVersion(uniqueID(mp), bp)
string basind = baselineIndex(mp)
print "baseline index " basind "\n"
bool otherbstat = isBaseline(mv)
print "otherstat " otherbstat "\n"
bool basv = isBaseline(mv)
print "version base " basv "\n"
Module modCurrent = current
Baseline blLatest = getMostRecentBaseline(modCurrent)
int iMajorVersion = major(blLatest)
int iMinorVersion = minor(blLatest)
string sBLSuffix = suffix(blLatest)
print "last baseline: major " iMajorVersion " minor " iMinorVersion " suffix " sBLSuffix "\n"
bool bIsBaseline = isBaseline(modCurrent)
print "bIsBaseline = " bIsBaseline "\n"
ModuleVersion mv = moduleVersion(uniqueID(modCurrent), blLatest)
Module modBaselined = load(mv, false)
string basind = baselineIndex(modBaselined)
print "baseline index = " basind "\n"
bIsBaseline = isBaseline(modBaselined)
print "bIsBaseline = " bIsBaseline "\n"
close(modBaselined)