def new_revision(repo_path, rev): repo = Repository(os.path.join(REPO_DIR, repo_path)) message = request.form['message'] filedata = request.form.to_dict() filedata.pop('message') new_rev = repo.commit('DEFAULT USER', message, rev, filedata) print "NEW REVISION: ", new_rev return redirect(url_for('repo', repo_path=repo_path, rev=new_rev))
def new_revision(repo_path, rev): repo=Repository(os.path.join(REPO_DIR, repo_path)) message=request.form['message'] filedata=request.form.to_dict() filedata.pop('message') new_rev=repo.commit('DEFAULT USER', message, rev, filedata) print "NEW REVISION: ",new_rev return redirect(url_for('repo', repo_path=repo_path, rev=new_rev))
def repo(repo_path,rev): repo=Repository(os.path.join(REPO_DIR, repo_path)) file_data=dict((f,repo.file(f,rev)) for f in repo.list_files(rev)) return render_template('repo.html', files=file_data, repo_path=repo_path, rev=rev, message=repo.message(rev), ancestors=reversed(repo.ancestors(rev)), descendants=repo.descendants(rev))
def repo(repo_path, rev): repo = Repository(os.path.join(REPO_DIR, repo_path)) file_data = dict((f, repo.file(f, rev)) for f in repo.list_files(rev)) return render_template('repo.html', files=file_data, repo_path=repo_path, rev=rev, message=repo.message(rev), ancestors=reversed(repo.ancestors(rev)), descendants=repo.descendants(rev))
def create_repo(): repo_path = request.form['repo_path'] Repository.init(os.path.join(REPO_DIR, repo_path)) repo = Repository(os.path.join(REPO_DIR, repo_path)) repo.commit('DEFAULT USER', 'Initial commit', 0, {'snippet': ''}) return redirect(url_for('repo', repo_path=repo_path, rev='tip'))
def create_repo(): repo_path=request.form['repo_path'] Repository.init(os.path.join(REPO_DIR,repo_path)) repo=Repository(os.path.join(REPO_DIR,repo_path)) repo.commit('DEFAULT USER', 'Initial commit', 0, {'snippet':''}) return redirect(url_for('repo', repo_path=repo_path, rev='tip'))