def main(project_path, callback): # Create staging UI global staging_ui staging_ui = TyrantVCStagingUI(project_name=project_path, file_list=git_access.get_files_changed(), callback=callback, parent=get_main_window()) staging_ui.run() return staging_ui
def test_get_files_changed_single_files(self): # create a repo git_access.create_repo(self.basedir + "/" + self.reponame) # apply a change to a file filesChanged = [self.test_files[0]] os.system("echo \"updated\" > " + filesChanged[0]) self.assertEqual(git_access.get_files_changed(), filesChanged)
def on_commit_btn_click(self): if (self.project_path == None): cmds.warning("No project currently open") elif (git_access.get_files_changed() == []): cmds.warning("No files in '" + self.project_name + "' have been modified") else: if (self.staging_ui != None): # if a staging ui already exits, close it, then make a new one. self.staging_ui.delete_instances() self.staging_ui = None self.staging_ui = staging_UI.main(self.project_path, self.populate_commits_tab)
def test_get_files_changed_no_changes(self): # create a repo git_access.create_repo(self.basedir + "/" + self.reponame) self.assertEqual(git_access.get_files_changed(), [])