'Completes update command.
Helper to Update.
Args:
appyaml: AppInfoExternal for the app.
basepath: Path where application\'s files can be found.'

def _UpdateWithParsedAppYaml(self, appyaml, basepath):

    self.runtime = appyaml.runtime
    rpcserver = self._GetRpcServer()
    if self.options.skip_sdk_update_check:
        logging.info('Skipping    update    check')
    else:
        updatecheck = self.update_check_class(rpcserver, appyaml)
        updatecheck.CheckForUpdates()
    def _AbortAppMismatch(yaml_name):
        StatusUpdate(('Error:    Aborting    upload    because    application    in    %s    does    not    match    application    in    app.yaml' % yaml_name), self.error_fh)
    dos_yaml = self._ParseDosYaml(basepath, appyaml)
    if (dos_yaml and (dos_yaml.application != appyaml.application)):
        _AbortAppMismatch('dos.yaml')
        return
    queue_yaml = self._ParseQueueYaml(basepath, appyaml)
    if (queue_yaml and (queue_yaml.application != appyaml.application)):
        _AbortAppMismatch('queue.yaml')
        return
    cron_yaml = self._ParseCronYaml(basepath, appyaml)
    if (cron_yaml and (cron_yaml.application != appyaml.application)):
        _AbortAppMismatch('cron.yaml')
        return
    index_defs = self._ParseIndexYaml(basepath, appyaml)
    if (index_defs and (index_defs.application != appyaml.application)):
        _AbortAppMismatch('index.yaml')
        return
    dispatch_yaml = self._ParseDispatchYaml(basepath, appyaml)
    if (dispatch_yaml and (dispatch_yaml.application != appyaml.application)):
        _AbortAppMismatch('dispatch.yaml')
        return
    self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
    if (appyaml.runtime == 'python'):
        MigratePython27Notice()
    if self.options.backends:
        self.BackendsUpdate()
    if index_defs:
        index_upload = IndexDefinitionUpload(rpcserver, index_defs, self.error_fh)
        try:
            index_upload.DoUpload()
        except urllib2.HTTPError as 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.'
    if cron_yaml:
        cron_upload = CronEntryUpload(rpcserver, cron_yaml, self.error_fh)
        try:
            cron_upload.DoUpload()
        except urllib2.HTTPError as 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    cron    tasks.    Please    retry    later    with    appcfg.py    update_cron.'
    if queue_yaml:
        queue_upload = QueueEntryUpload(rpcserver, queue_yaml, self.error_fh)
        try:
            queue_upload.DoUpload()
        except urllib2.HTTPError as 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    queues.    Please    retry    later    with    appcfg.py    update_queues.'
    if dos_yaml:
        dos_upload = DosEntryUpload(rpcserver, dos_yaml, self.error_fh)
        dos_upload.DoUpload()
    if dispatch_yaml:
        dispatch_upload = DispatchEntryUpload(rpcserver, dispatch_yaml, self.error_fh)
        dispatch_upload.DoUpload()
