|
|
@ -577,13 +577,12 @@ def GetFilesNotInCL():
|
|
|
|
def SendToRietveld(request_path, payload=None,
|
|
|
|
def SendToRietveld(request_path, payload=None,
|
|
|
|
content_type="application/octet-stream", timeout=None):
|
|
|
|
content_type="application/octet-stream", timeout=None):
|
|
|
|
"""Send a POST/GET to Rietveld. Returns the response body."""
|
|
|
|
"""Send a POST/GET to Rietveld. Returns the response body."""
|
|
|
|
|
|
|
|
server = GetCodeReviewSetting("CODE_REVIEW_SERVER")
|
|
|
|
def GetUserCredentials():
|
|
|
|
def GetUserCredentials():
|
|
|
|
"""Prompts the user for a username and password."""
|
|
|
|
"""Prompts the user for a username and password."""
|
|
|
|
email = upload.GetEmail()
|
|
|
|
email = upload.GetEmail("Email (login for uploading to %s)" % server)
|
|
|
|
password = getpass.getpass("Password for %s: " % email)
|
|
|
|
password = getpass.getpass("Password for %s: " % email)
|
|
|
|
return email, password
|
|
|
|
return email, password
|
|
|
|
|
|
|
|
|
|
|
|
server = GetCodeReviewSetting("CODE_REVIEW_SERVER")
|
|
|
|
|
|
|
|
rpc_server = upload.HttpRpcServer(server,
|
|
|
|
rpc_server = upload.HttpRpcServer(server,
|
|
|
|
GetUserCredentials,
|
|
|
|
GetUserCredentials,
|
|
|
|
host_override=server,
|
|
|
|
host_override=server,
|
|
|
|