def sMergeIntToRelMain(ins): bl = clearcase.getBaselineLabel(ins.getNBView(), ins.getWuceProduct()) mergelog = ins.getDailyDir() + "/{bl}/{bl}.scBRMerge.{vob}".format(bl=bl,vob=ins.getVobFamily()) relview = ins.getName() + "-bmc-rel" if not clearcase.isViewExist(relview): scmbl = clearcase.getScmBaselineLabel(ins.getNBView(), ins.getWuceProduct()) clearcase.mkview(relview, scmbl) cslist = [] with open(clearcase.getViewConfigSpec(ins.getNBView()), "r") as f: cslist = f.readlines() intBr = clearcase.getIntegrationBranch(ins.getNBView(), ins.getWuceProduct()) [cs.replace(intBr, ins.getTargetRelMain()) for cs in cslist] logdir = os.environ['BMC_HOME'] + "/log/{ins}".format(ins=ins.getName()) with open(logdir + "/{lb}.rel.cs".format(lb=nextBl), "w") as f: f.writelines(cslist) clearcase.merge(intBr, relview, ins.getVobFamily(), mergelog)
def sCreateTargetIntBr(ins): bl = clearcase.getBaselineLabel(ins.getNBView(), ins.getWuceProduct()) nextIntBr = clearcase.getNextIntegrationBranch(ins.getNBView(), ins.getWuceProduct()) clearcase.mkview(nextIntBr, bl)