def deleteTester(self, number): self.listTesters() removed = self.feedbacks.pop(number) self.testers.remove(removed) print("New list:") self.feedbacks = None self.listTesters() print("Removed: {}".format(removed)) ans = User.request("Save on disk? (s/Q)").lower() if ans in ['s']: self.testers.write()
def switchFeedback(self): self._getTestersByFeedback() msg = "Switch tester: [<number>/s/q]" self.listTesters() number = User.request(msg) while number.lower() not in ['s', 'save', 'q', 'quit']: if number == '': continue try: number = int(number) self.feedbacks[number].switchFeedback() except (ValueError, IndexError) as e: print(e) exit(1) finally: self.listTesters() number = User.request(msg) if number in ['s', 'save']: self.testers.write() self.listTesters()
def requestVersion(self, currentVersion): User.request("going to make a new release after {}".format(currentVersion))
print("Will read headers from {}".format(UPCOMING_HEADER)) Git.chdirToRepositoryTopLevel() oVersion = offlineimapInfo.getVersion() ccList = Testers.listTestersInTeam() authors = Git.getAuthorsList(oVersion) for author in authors: email = author.getEmail() if email not in ccList: ccList.append(email) with open(UPCOMING_FILE, 'w') as upcoming, \ open(UPCOMING_HEADER, 'r') as fd_header: header = {} header['messageId'] = Git.buildMessageId() header['date'] = Git.buildDate() header['name'], header['email'] = Git.getLocalUser() header['mailinglist'] = MAILING_LIST header['expectedVersion'] = User.request("Expected new version?") header['ccList'] = ", ".join(ccList) upcoming.write(fd_header.read().format(**header).lstrip()) upcoming.write(Git.getShortlog(oVersion)) upcoming.write("\n\n# Diffstat\n\n") upcoming.write(Git.getDiffstat(oVersion)) upcoming.write("\n\n\n-- \n{}\n".format(Git.getLocalUser()[0])) system("{} {}".format(EDITOR, UPCOMING_FILE)) print("{} written".format(UPCOMING_FILE))