def _repo(request, name):
    try:
        repository = Repository.objects.get(name=name)
    except:
        raise Http404
    repo = vcs.create(repository.type, repository.path)
    ref = request.GET['c'] if 'c' in request.GET else repo.ref()
    return repo, ref
Example #2
0
def _repo(request, name):
    try:
        repository = Repository.objects.get(name=name)
    except:
        raise Http404
    repo = vcs.create(repository.type, repository.path)
    ref = request.GET['c'] if 'c' in request.GET else repo.ref()
    return repo, ref
Example #3
0
def commit(request, repository, ref):
    try:
        repository = Repository.objects.get(name=repository)
    except:
        raise Http404
    repo = vcs.create(repository.type, repository.path)
    commit = repo.commit(ref)
    diffs = repo.diff(ref)

    data = RequestContext(request, {
        'repository': repository,
        'repo': repo,
        'ref': ref,
        'commit': commit,
        'diffs': diffs,
    })
    return render_to_response('browser/view.html', data)
def commit(request, repository, ref):
    try:
        repository = Repository.objects.get(name=repository)
    except:
        raise Http404
    repo = vcs.create(repository.type, repository.path)
    commit = repo.commit(ref)
    diffs = repo.diff(ref)

    data = RequestContext(
        request, {
            'repository': repository,
            'repo': repo,
            'ref': ref,
            'commit': commit,
            'diffs': diffs,
        })
    return render_to_response('browser/view.html', data)