コード例 #1
0
ファイル: gcl.py プロジェクト: miaosf/depot_tools
 def UpdateRietveldDescription(self):
   """Sets the description for an issue on Rietveld."""
   data = [("description", self.description),]
   ctype, body = upload.EncodeMultipartFormData(data, [])
   self.SendToRietveld('/%d/description' % self.issue, payload=body,
       content_type=ctype)
   self.needs_upload = False
コード例 #2
0
ファイル: gcl.py プロジェクト: miaosf/depot_tools
  def CloseIssue(self):
    """Closes the Rietveld issue for this changelist."""
    # Newer versions of Rietveld require us to pass an XSRF token to POST, so
    # we fetch it from the server.
    xsrf_token = self.SendToRietveld(
        '/xsrf_token',
        extra_headers={'X-Requesting-XSRF-Token': '1'})

    # You cannot close an issue with a GET.
    # We pass an empty string for the data so it is a POST rather than a GET.
    data = [("description", self.description),
            ("xsrf_token", xsrf_token)]
    ctype, body = upload.EncodeMultipartFormData(data, [])
    self.SendToRietveld('/%d/close' % self.issue, payload=body,
        content_type=ctype)
コード例 #3
0
ファイル: rietveld.py プロジェクト: quartexNOR/webkit.js
 def post(self, request_path, data, **kwargs):
   ctype, body = upload.EncodeMultipartFormData(data, [])
   return self._send(request_path, payload=body, content_type=ctype, **kwargs)
コード例 #4
0
ファイル: gcl.py プロジェクト: BGCX067/fajr-git
 def UpdateRietveldDescription(self):
   """Sets the description for an issue on Rietveld."""
   data = [("description", self.description),]
   ctype, body = upload.EncodeMultipartFormData(data, [])
   SendToRietveld("/%d/description" % self.issue, body, ctype)
コード例 #5
0
ファイル: gcl.py プロジェクト: BGCX067/fajr-git
 def CloseIssue(self):
   """Closes the Rietveld issue for this changelist."""
   data = [("description", self.description),
           ("xsrf_token", GetXsrfToken())]
   ctype, body = upload.EncodeMultipartFormData(data, [])
   SendToRietveld("/%d/close" % self.issue, body, ctype)