def configure_repo(repo): debug.log("stub!") if(prompt_user("Do you want to change to root path?")): newpath= prompt_user("What should the root path be?",isbool=False) while (not os.path.exists(newpath)): newpath= prompt_user("Invalid path. What should the root path be?",isbool=False) repo.rootpath=newpath for remote in repo.remotes: writeable = prompt_user("Do you have write access to the remote \""+remote.name+"\" ("+remote.url+") for this repository?") repo.gkremotes[remote.name].setWriteable(writeable) repo.cachemeta = prompt_user("Do you want to track metadata (filesystem attributes like date modified, octal permiossions) for this repository?") import gkconfig gkconfig.writeRepoToJson(repo)
def create_repo(rootPath): import gkconfig reponame= prompt_user("What would you like to call this repo?",isbool=False) repo = GKRepo(GKRepoConfig(reponame,rootPath)) gkconfig.writeRepoToJson(repo)