def createproj(self, name, team): """Creates new project directory""" r = open_repo(int(team)) if name.find(".") != -1: """No ../../ nastyness""" return nil url = srusers.get_svnrepo(team) + "/" + name r.bzrdir.create_branch_convenience(base=url, force_new_tree=False) return dict()
def projlist(self, team): """Returns a list of projects""" try: r = open_repo(int(team)) except: #No repository present return dict(projects=[]) self.user.set_setting('team.last', team) projects = [] branches = r.find_branches() for branch in branches: projects.append(branch.nick) return dict(projects=projects)