<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_ok(self):
 """ Take the branch, commit, and build selection and add them as plugins """

        self.parentApp.repo_value['versions'] = {}
        self.parentApp.repo_value['build'] = {}
        for branch in self.branch_cb:
            if self.branch_cb[branch].value:
                # process checkboxes
                self.parentApp.repo_value['versions'][branch] = self.commit_tc[branch].values[self.commit_tc[branch].value]
                self.parentApp.repo_value['build'][branch] = True
        if self.error:
            self.quit()
        self.parentApp.addForm('CHOOSETOOLS',
                               ChooseToolsForm,
                               name='Choose tools to add for new plugin'
                               '\t\t\t\t\t\t^Q to quit',
                               color='CONTROL')
        self.parentApp.change_form('CHOOSETOOLS')