def testSinglePatchCommitMsg(): patchInfo = PatchInfo() patchInfo.installName = "LR*5.2*334" patchInfo.kidsFilePath = "C:/users/jason.li/git/VistA/Packages/"\ "Lab Service/Patches/LR_5.2_334/LR_52_334.KIDs.json" commitMsgFile = getDefaultCommitMsgFileByPatchInfo(patchInfo) print commitMsgFile generateCommitMsgFileByPatchInfo(patchInfo, commitMsgFile, "origin/master", SCRIPTS_DIR)
def __addMissKIDSInfoPatch__(self): for kidsInstallName in self._missKidsInfoSet: logger.debug("Installation Name: %s, does not have info file, %s" % (kidsInstallName, self._kidsInstallNameDict[kidsInstallName])) patchInfo = PatchInfo() patchInfo.installName = kidsInstallName setPatchInfoFromInstallName(kidsInstallName, patchInfo) if kidsInstallName in self._installNameSeqMap: patchInfo.seqNo = self._installNameSeqMap[kidsInstallName] patchInfo.kidsFilePath = self._kidsInstallNameDict[kidsInstallName] if kidsInstallName in self._kidsDepBuildDict: logger.info("update the Missing Info KIDS depencency %s" % kidsInstallName) patchInfo.depKIDSBuild = self._kidsDepBuildDict[kidsInstallName] self._patchInfoDict[kidsInstallName] = patchInfo
def testMultiBuildPatchCommitMsg(): patchInfo = PatchInfo() patchInfo.installName = "HDI*1.0*7" patchInfo.kidsFilePath = "C:/users/jason.li/git/VistA/Packages/"\ "MultiBuilds/LAB_LEDI_IV.KIDs.json" patchInfo.kidsInfoPath = \ "C:/users/jason.li/git/VistA/Packages/Health Data and Informatics/"\ "Patches/HDI_1.0_7/HDI-1_SEQ-8_PAT-7.TXT" patchInfo.kidsInfoSha1 = None patchInfo.isMultiBuilds = True patchInfo.multiBuildsList = ["HDI*1.0*7", "LR*5.2*350", "LA*5.2*74"] patchInfo.otherKidsInfoList = [ ["C:/users/jason.li/git/VistA/Packages/Lab Service/"\ "Patches/LR_5.2_350/LR-5P2_SEQ-332_PAT-350.TXT" , None], ["C:/users/jason.li/git/VistA/Packages/Automated Lab Instruments/"\ "Patches/LA_5.2_74/LA-5P2_SEQ-57_PAT-74.TXT", None], ] commitMsgFile = getDefaultCommitMsgFileByPatchInfo(patchInfo) generateCommitMsgFileByPatchInfo(patchInfo, commitMsgFile, "origin/master", SCRIPTS_DIR)
def __addMissKIDSInfoPatch__(self): for kidsInstallName in self._missKidsInfoSet: logger.debug("Installation Name: %s, does not have info file, %s" % (kidsInstallName, self._kidsInstallNameDict[kidsInstallName])) patchInfo = PatchInfo() patchInfo.installName = kidsInstallName setPatchInfoFromInstallName(kidsInstallName, patchInfo) if kidsInstallName in self._kidsInstallNameSha1Dict: sha1Path = self._kidsInstallNameSha1Dict[kidsInstallName] patchInfo.kidsSha1Path = sha1Path patchInfo.kidsSha1 = readSha1SumFromSha1File(sha1Path) if kidsInstallName in self._installNameSeqMap: patchInfo.seqNo = self._installNameSeqMap[kidsInstallName] patchInfo.kidsFilePath = self._kidsInstallNameDict[kidsInstallName] if kidsInstallName in self._kidsDepBuildDict: logger.info("update the Missing Info KIDS depencency %s" % kidsInstallName) patchInfo.depKIDSBuild = self._kidsDepBuildDict[kidsInstallName] self._patchInfoDict[kidsInstallName] = patchInfo