def Update(self):
    appyaml = None
    rpcserver = self._GetRpcServer()
    if not os.path.isdir(self.basepath):

      self.UpdateUsingSpecificFiles()
      return


    yaml_file_basename = 'app.yaml'
    appyaml = self._ParseAppInfoFromYaml(
        self.basepath,
        basename=os.path.splitext(yaml_file_basename)[0])




    if self.options.skip_sdk_update_check:
      logging.info('Skipping update check')
    else:
      updatecheck = self.update_check_class(rpcserver, appyaml)
      updatecheck.CheckForUpdates()
    self.UpdateVersion(rpcserver, self.basepath, appyaml, yaml_file_basename)

    if appyaml.runtime == 'python':
      MigratePython27Notice()


    if self.options.backends:
      self.BackendsUpdate()






    index_defs = self._ParseIndexYaml(self.basepath)
    if index_defs:
      index_upload = IndexDefinitionUpload(rpcserver, appyaml, index_defs)
      try:
        index_upload.DoUpload()
      except urllib2.HTTPError, e:
        ErrorUpdate('Error %d: --- begin server output ---\n'
                    '%s\n--- end server output ---' %
                    (e.code, e.read().rstrip('\n')))
        print >> self.error_fh, (
            'Your app was updated, but there was an error updating your '
            'indexes. Please retry later with appcfg.py update_indexes.')


    cron_yaml = self._ParseCronYaml(self.basepath)
    if cron_yaml:
      cron_upload = CronEntryUpload(rpcserver, appyaml, cron_yaml)
      cron_upload.DoUpload()


    queue_yaml = self._ParseQueueYaml(self.basepath)
    if queue_yaml:
      queue_upload = QueueEntryUpload(rpcserver, appyaml, queue_yaml)
      queue_upload.DoUpload()


    dos_yaml = self._ParseDosYaml(self.basepath)
    if dos_yaml:
      dos_upload = DosEntryUpload(rpcserver, appyaml, dos_yaml)
      dos_upload.DoUpload()


    if appyaml:
      pagespeed_upload = PagespeedEntryUpload(
          rpcserver, appyaml, appyaml.pagespeed)
      try:
        pagespeed_upload.DoUpload()
      except urllib2.HTTPError, e:
        ErrorUpdate('Error %d: --- begin server output ---\n'
                    '%s\n--- end server output ---' %
                    (e.code, e.read().rstrip('\n')))
        print >> self.error_fh, (
            'Your app was updated, but there was an error updating PageSpeed. '
            'Please try the update again later.')
Updates and deploys a new appversion and global app configs.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppCfgApp.Update