예제 #1
0
def vcs_clone(request, response):
    user = request.user
    source = request.POST.get("source")
    taskname = "Clone/checkout"
    if source:
         taskname += " from %s" % (source)
    jobid = vcs.clone(user, **dict(request.POST))
    response.content_type = "application/json"
    response.body = simplejson.dumps(dict(jobid=jobid, taskname=taskname))
    return response()
예제 #2
0
파일: controllers.py 프로젝트: iNeft/bespin
def vcs_clone(request, response):
    user = request.user
    source = request.POST.get("source")
    taskname = "Clone/checkout"
    if source:
        taskname += " from %s" % (source)
    jobid = vcs.clone(user, **dict(request.POST))
    response.content_type = "application/json"
    response.body = simplejson.dumps(dict(jobid=jobid, taskname=taskname))
    return response()
예제 #3
0
파일: test_vcs.py 프로젝트: spot/bespin
def test_run_an_hg_clone(run_command_params):
    _init_data()
    output = vcs.clone(macgyver, source="http://hg.mozilla.org/labs/bespin")
    command, context = run_command_params
    
    assert isinstance(command, hg.clone)
    working_dir = context.working_dir
    assert working_dir == macgyver.get_location()
    assert output == clone_output
    assert str(command) == "clone http://hg.mozilla.org/labs/bespin bespin"
    
    bespin = model.get_project(macgyver, macgyver, "bespin")
    metadata = bespin.metadata
    
    assert 'remote_auth' not in metadata
    assert 'push' not in metadata
    assert metadata['remote_url'] == "http://hg.mozilla.org/labs/bespin"
    metadata.close()
예제 #4
0
파일: controllers.py 프로젝트: spot/bespin
def vcs_clone(request, response):
    user = request.user
    output = vcs.clone(user, **dict(request.POST))
    response.content_type = "application/json"
    response.body = simplejson.dumps(dict(output=output))
    return response()