Dowload repodata.
435275
def _download_repodata(self, checked_repos):
        """"""
        self._files_downloaded = []
        self._repodata_files = []
        self.__counter = -1

        if checked_repos:
            for repo in checked_repos:
                path = self._repo_url_to_path(repo)
                self._files_downloaded.append(path)
                self._repodata_files.append(path)
                worker = self.download_async(repo, path)
                worker.url = repo
                worker.path = path
                worker.sig_finished.connect(self._repodata_downloaded)
        else:
            # Empty, maybe there is no internet connection
            # Load information from conda-meta and save that file
            path = self._get_repodata_from_meta()
            self._repodata_files = [path]
            self._repodata_downloaded()
1314505
def update_repodata(self, channels=None):
        """"""
        norm_channels = self.conda_get_condarc_channels(channels=channels,
                                                        normalize=True)
        repodata_urls = self._set_repo_urls_from_channels(norm_channels)
        self._check_repos(repodata_urls)
1107333
function downloadUpdateRepo(config, callback) {

  console.log('Downloading repo...'.magenta);

  // Keep track if the request fails to prevent the continuation of the install
  var requestFailed = false;

  // TODO: have this hit different templating repos
  var repoRequest = request(config.baseGit + '/generate-repo.zip');

  repoRequest
    .on('response', function (response) {
      // If we fail, set it as failing and remove zip file
      if (response.statusCode !== 200) {
        requestFailed = true;
        fs.unlinkSync('.generate-repo.zip');
        callback(true);
      }
    })
    .pipe(fs.createWriteStream('.generate-repo.zip'))
    .on('close', function () {
      if (requestFailed) return;

      callback(null, '.generate-repo.zip');
    });
}
1255116
def release():
    """"""
    if check_staged():
        raise EnvironmentError('There are staged changes, abort.')
    if check_unstaged():
        raise EnvironmentError('There are unstaged changes, abort.')
    bump()
    tag()
    build()
    doc_gen()
    puts(colored.yellow("Remember to upload documentation and package:"))
    with indent(2):
        puts(colored.cyan("shovel doc.upload"))
        puts(colored.cyan("shovel version.upload"))
1301357
def up(context):
    """"""
    context.obj.find_repo_type()
    if context.obj.vc_name == 'git':
        context.obj.call(['git', 'push'])
        context.obj.call(['git', 'push', '--tags'])
    elif context.obj.vc_name == 'hg':
        context.obj.call(['hg', 'push'])
1123802
def upload_file(ctx, opts, owner, repo, filepath, skip_errors, md5_checksum):
    """"""
    filename = click.format_filename(filepath)
    basename = os.path.basename(filename)

    click.echo(
        "Requesting file upload for %(filename)s ... "
        % {"filename": click.style(basename, bold=True)},
        nl=False,
    )

    context_msg = "Failed to request file upload!"
    with handle_api_exceptions(
        ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors
    ):
        with maybe_spinner(opts):
            identifier, upload_url, upload_fields = request_file_upload(
                owner=owner, repo=repo, filepath=filename, md5_checksum=md5_checksum
            )

    click.secho("OK", fg="green")

    context_msg = "Failed to upload file!"
    with handle_api_exceptions(ctx, opts=opts, context_msg=context_msg):
        filesize = utils.get_file_size(filepath=filename)

        label = "Uploading %(filename)s:" % {
            "filename": click.style(basename, bold=True)
        }

        with click.progressbar(
            length=filesize,
            label=label,
            fill_char=click.style("#", fg="green"),
            empty_char=click.style("-", fg="red"),
        ) as pb:

            def progress_callback(monitor):
                pb.update(monitor.bytes_read)

            api_upload_file(
                upload_url=upload_url,
                upload_fields=upload_fields,
                filepath=filename,
                callback=progress_callback,
            )

    return identifier
772702
def start(self):
        """"""
        if is_anaconda():
            self.url = 'https://repo.anaconda.com/pkgs/main'
            if os.name == 'nt':
                self.url += '/win-64/repodata.json'
            elif sys.platform == 'darwin':
                self.url += '/osx-64/repodata.json'
            else:
                self.url += '/linux-64/repodata.json'
        else:
            self.url = ('https://api.github.com/repos/'
                        'spyder-ide/spyder/releases')
        self.update_available = False
        self.latest_release = __version__

        error_msg = None

        try:
            if hasattr(ssl, '_create_unverified_context'):
                # Fix for issue # 2685 [Works only with Python >=2.7.9]
                # More info: https://www.python.org/dev/peps/pep-0476/#opting-out
                context = ssl._create_unverified_context()
                page = urlopen(self.url, context=context)
            else:
                page = urlopen(self.url)
            try:
                data = page.read()

                # Needed step for python3 compatibility
                if not is_text_string(data):
                    data = data.decode()
                data = json.loads(data)

                if is_anaconda():
                    if self.releases is None:
                        self.releases = []
                        for item in data['packages']:
                            if ('spyder' in item and
                                    not re.search(r'spyder-[a-zA-Z]', item)):
                                self.releases.append(item.split('-')[1])
                    result = self.check_update_available()
                else:
                    if self.releases is None:
                        self.releases = [item['tag_name'].replace('v', '')
                                         for item in data]
                        self.releases = list(reversed(self.releases))

                result = self.check_update_available()
                self.update_available, self.latest_release = result
            except Exception:
                error_msg = _('Unable to retrieve information.')
        except HTTPError:
            error_msg = _('Unable to retrieve information.')
        except URLError:
            error_msg = _('Unable to connect to the internet. <br><br>Make '
                          'sure the connection is working properly.')
        except Exception:
            error_msg = _('Unable to check for updates.')

        # Don't show dialog when starting up spyder and an error occur
        if not (self.startup and error_msg is not None):
            self.error = error_msg
            self.sig_ready.emit()
1016206
def reload(self):
        
        realData = self.load()
        self.clear()
        self.update(realData)
1356939
def reload(self):
        """"""
        if time.time() - self.updated > self.ttl:
            self.force_reload()
792555
def run(self):
        ""
        # load files from source directory
        files = self.get_files()

        # loop through each middleware
        for func in self.middleware:

            # call each one, ignoring return value
            func(files, self)

        # store and return the result
        self.files.update(files)
        return files
631704
def handle_upload(repo, **kwargs):
    
    log.info('upload: %s' %(repo))
    name = kwargs.get('filename', 'Untitled')
    data = kwargs.get('filedata')
    repo.addItem(Item.from_string(repo=repo, name=name, string=data))
1043839
public function reload()
    {
        $data = $this->find($this->id)->getData();
        $this->_setData($data);
        $this->_belongs_cache = array();
    }
110430
function(err) {
      if (!err) {
        loadData(app, apimanager, models, true, uid);
      }
      if (!apimanager.host) {
        //monitor the file changes, load data again if any changes
        fs.watch(definitionsDir, function(event, filename) {
          if (filename !== '.datastore') {
            logger.debug('File changed in %s%s, reload data', definitionsDir, filename);
            loadData(app, apimanager, models, false, uid);
          }
        });
      }
    }
757856
public function run()
    {
        if (!class_exists(CustomisationExtension::class)) {
            return;
        }
        $contents = $this->load();

        $this->updateSiteBundleLoader($contents);

        if (!$contents->isEmpty()) {
            $this->save($contents);
        }
    }
1061885
def deploy():
    """"""
    _require_root()

    if not confirm("This will apply any available migrations to the database. Has the database been backed up?"):
        abort("Aborted.")
    if not confirm("Are you sure you want to deploy?"):
        abort("Aborted.")

    with lcd(PRODUCTION_DOCUMENT_ROOT):
        with shell_env(PRODUCTION="TRUE"):
            local("git pull")
            with open("requirements.txt", "r") as req_file:
                requirements = req_file.read().strip().split()
                try:
                    pkg_resources.require(requirements)
                except pkg_resources.DistributionNotFound:
                    local("pip install -r requirements.txt")
                except Exception:
                    traceback.format_exc()
                    local("pip install -r requirements.txt")
                else:
                    puts("Python requirements already satisfied.")
            with prefix("source /usr/local/virtualenvs/ion/bin/activate"):
                local("./manage.py collectstatic --noinput", shell="/bin/bash")
                local("./manage.py migrate", shell="/bin/bash")
            restart_production_gunicorn(skip=True)

    puts("Deploy complete.")
862132
@RequirePOST
    public void doDownload(StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException {
        doGenerateAllBundles(req, rsp);
    }
1077162
public function reload ()
		{
			$class = $this->_modelClass;

			$this->_root = $class::find()->roots()->one();
			$this->_data = $this->_root->children()->all();
			$this->buildPaths();
		}