Changeset View
Changeset View
Standalone View
Standalone View
swh/web/ui/views/browse.py
Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | Args: | ||||
prev_sha1s: optionally, the path through which we want log information | prev_sha1s: optionally, the path through which we want log information | ||||
""" | """ | ||||
env = {'sha1_git': sha1_git, | env = {'sha1_git': sha1_git, | ||||
'sha1_url': '/browse/revision/%s/' % sha1_git, | 'sha1_url': '/browse/revision/%s/' % sha1_git, | ||||
'message': None, | 'message': None, | ||||
'revisions': []} | 'revisions': []} | ||||
try: | try: | ||||
revisions = api.api_revision_log(sha1_git, prev_sha1s) | revision_data = api.api_revision_log(sha1_git, prev_sha1s) | ||||
revisions = revision_data['revisions'] | |||||
next_revs_url = revision_data['next_revs_url'] | |||||
env['revisions'] = map(utils.prepare_data_for_view, revisions) | env['revisions'] = map(utils.prepare_data_for_view, revisions) | ||||
env['next_revs_url'] = utils.prepare_data_for_view(next_revs_url) | |||||
except (NotFoundExc, BadInputExc) as e: | except (NotFoundExc, BadInputExc) as e: | ||||
env['message'] = str(e) | env['message'] = str(e) | ||||
return render_template('revision-log.html', **env) | return render_template('revision-log.html', **env) | ||||
@app.route('/browse/revision' | @app.route('/browse/revision' | ||||
'/origin/log/') | '/origin/log/') | ||||
▲ Show 20 Lines • Show All 477 Lines • Show Last 20 Lines |