Update repository name and settings
512889
def git_update(repo, options = {})
      ensure_ready!(:authorization)
      response = connection.patch(git_repo_path(repo), options)
      checked_response_body(response)
    end
386745
public void updateUserRepositories(List<RepositoryDTO> repositoryDTOs) {
        for (RepositoryDTO repositoryDTO : repositoryDTOs) {
            String fullName = repositoryDTO.getFullName();
            userCache.put(fullName, repositoryDTO);
        }
    }
647133
def _move_update(sourcepath, destname):
    """"""
    if sys.platform.startswith('linux'):
        return os.system("/bin/mv -fu '%s' '%s'" % (sourcepath, destname))
    else:
        return os.system("rsync -ua --remove-source-files '%s' '%s'" % (sourcepath, destname))
434467
def update(preset, clean):
    

    if self.isactive():
        lib.echo("ERROR: Exit current project first")
        sys.exit(lib.USER_ERROR)

    presets = _extern.github_presets()

    if preset not in presets:
        sys.stdout.write("\"%s\" not found" % preset)
        sys.exit(lib.USER_ERROR)

    lib.echo("Are you sure you want to update \"%s\", "
             "any changes will be lost?: [y/N]: ", newline=False)
    if raw_input().lower() in ("y", "yes"):
        presets_dir = _extern.presets_dir()
        preset_dir = os.path.join(presets_dir, preset)

        repository = presets[preset]

        if clean:
            try:
                _extern.remove_preset(preset)
            except:
                lib.echo("ERROR: Could not clean existing preset")
                sys.exit(lib.USER_ERROR)

        lib.echo("Updating %s.. " % repository)

        try:
            _extern.pull_preset(repository, preset_dir)
        except IOError as e:
            lib.echo(e)
            sys.exit(lib.USER_ERROR)

    else:
        lib.echo("Cancelled")
455059
static function systemRepositoryInformation()
    {
        $ini = eZINI::instance( 'package.ini' );
        $vendor = $ini->variable( 'RepositorySettings', 'Vendor' );
        return eZPackage::repositoryInformation( $vendor );
    }
1324876
def update_source_list(self):
        
        with cd('/etc/apt'):
            sudo('mv sources.list sources.list.bak')
            put(StringIO(bigdata_conf.ubuntu_source_list_16),
                'sources.list', use_sudo=True)
            sudo('apt-get update -y --fix-missing')
512854
private void loadInfosFromSettings( ScmProviderRepositoryWithHost repo )
    {
        if ( username == null || password == null )
        {
            String host = repo.getHost();

            int port = repo.getPort();

            if ( port > 0 )
            {
                host += ":" + port;
            }

            Server server = this.settings.getServer( host );

            if ( server != null )
            {
                setPasswordIfNotEmpty( repo, decrypt( server.getPassword(), host ) );

                setUserIfNotEmpty( repo, server.getUsername() );
            }
        }
    }
1053537
def _patch_distribution_metadata():
    """"""
    for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'):
        new_val = getattr(setuptools.dist, attr)
        setattr(distutils.dist.DistributionMetadata, attr, new_val)
505063
def update(ctx, no_restart, no_rebuild):
    """"""

    # 0. (NOT YET! MAKE A BACKUP OF EVERYTHING)
    # 1. update repository
    # 2. update frontend repository
    # 3. (Not yet: update venv)
    # 4. rebuild frontend
    # 5. restart service

    instance = ctx.obj['instance']

    log('Pulling github updates')
    run_process('.', ['git', 'pull', 'origin', 'master'])
    run_process('./frontend', ['git', 'pull', 'origin', 'master'])

    if not no_rebuild:
        log('Rebuilding frontend')
        install_frontend(instance, forcerebuild=True, install=False, development=True)

    if not no_restart:
        log('Restaring service')
        if instance != 'hfos':
            instance = 'hfos-' + instance

        run_process('.', ['sudo', 'systemctl', 'restart', instance])

    log('Done')
832243
def update(self, quiet=False, prefix='[polyglot_data] '):
    
    self.clear_status_cache()
    for pkg in self.packages():
      if self.status(pkg) == self.STALE:
        self.download(pkg, quiet=quiet, prefix=prefix)
303710
def repository_name(doc):
    """"""
    for repository_id, repo in doc.get('repositories', {}).items():
        repo['id'] = repository_id
        repo['organisation_id'] = doc['_id']

        name = repo.get('name', None)
        if name:
            yield name, repository_id
811609
def update(self):
        
        for node in self.get_all_nodes():
            try:
                node.update_ips()

                # If we previously did not have a preferred_ip or the
                # preferred_ip is not in the current list, then try to connect
                # to one of the node ips and update the preferred_ip.
                if node.ips and \
                        not (node.preferred_ip and \
                                         node.preferred_ip in node.ips):
                    node.connect()
            except InstanceError as ex:
                log.warning("Ignoring error updating information on node %s: %s",
                            node, ex)
        self.repository.save_or_update(self)
289684
def _set_name(self, version=AUTO):
        """"""

        name = 'python'

        if version:
            if version is AUTO:
                version = sys.version_info[0]

                if version == 2:
                    version = ''

            name = '%s%s' % (name, version)

        self.name = name
215760
public void updateExtensions()
    {
        // Start a background thread to get more details about the found extensions
        Thread thread = new Thread(new Runnable()
        {
            @Override
            public void run()
            {
                DefaultCoreExtensionRepository.this.scanner
                    .updateExtensions(DefaultCoreExtensionRepository.this.extensions.values());
            }
        });

        thread.setPriority(Thread.MIN_PRIORITY);
        thread.setDaemon(true);
        thread.setName("Core extension repository updater");
        thread.start();
    }
476999
def _update_repo(ret, name, target, clean, user, identity, rev, opts, update_head):
    '''
    
    '''
    log.debug('target %s is found, "hg pull && hg up is probably required"', target)

    current_rev = __salt__['hg.revision'](target, user=user, rev='.')
    if not current_rev:
        return _fail(
                ret,
                'Seems that {0} is not a valid hg repo'.format(target))

    if __opts__['test']:
        test_result = (
                'Repository {0} update is probably required (current '
                'revision is {1})').format(target, current_rev)
        return _neutral_test(
                ret,
                test_result)

    try:
        pull_out = __salt__['hg.pull'](target, user=user, identity=identity, opts=opts, repository=name)
    except CommandExecutionError as err:
        ret['result'] = False
        ret['comment'] = err
        return ret

    if update_head is False:
        changes = 'no changes found' not in pull_out
        if changes:
            ret['comment'] = 'Update is probably required but update_head=False so we will skip updating.'
        else:
            ret['comment'] = 'No changes found and update_head=False so will skip updating.'
        return ret

    if rev:
        try:
            __salt__['hg.update'](target, rev, force=clean, user=user)
        except CommandExecutionError as err:
            ret['result'] = False
            ret['comment'] = err
            return ret
    else:
        try:
            __salt__['hg.update'](target, 'tip', force=clean, user=user)
        except CommandExecutionError as err:
            ret['result'] = False
            ret['comment'] = err
            return ret

    new_rev = __salt__['hg.revision'](cwd=target, user=user, rev='.')

    if current_rev != new_rev:
        revision_text = '{0} => {1}'.format(current_rev, new_rev)
        log.info('Repository %s updated: %s', target, revision_text)
        ret['comment'] = 'Repository {0} updated.'.format(target)
        ret['changes']['revision'] = revision_text
    elif 'error:' in pull_out:
        return _fail(
            ret,
            'An error was thrown by hg:\n{0}'.format(pull_out)
        )
    return ret
33855
def update(self):
        """"""
        if not os.path.isdir(os.path.join(self.path)):
            os.makedirs(self.path)
        if not os.path.isdir(os.path.join(self.path, 'refs')):
            subprocess.check_output([
                'git', 'clone', '--bare', self.repo_git, self.path
            ])
        self.run(['gc', '--auto', '--prune=all'])
        self.run(['fetch', '-p', 'origin', '+refs/heads/*:refs/heads/*'])
        # github support
        self.run(['fetch', 'origin', '+refs/pull/*/head:refs/pull/*'])
        # gitlab support
        self.run([
            'fetch', 'origin', '+refs/merge-requests/*/head:refs/pull/*'])
309460
def update():
    """"""
    repo_directory = get_config()['repo_directory']
    os.chdir(repo_directory)
    click.echo("Check for updates...")

    local = subprocess.check_output('git rev-parse master'.split()).strip()
    remote = subprocess.check_output(
        'git ls-remote https://github.com/tldr-pages/tldr/ HEAD'.split()
    ).split()[0]
    if local != remote:
        click.echo("Updating...")
        subprocess.check_call('git checkout master'.split())
        subprocess.check_call('git pull --rebase'.split())
        build_index()
        click.echo("Update to the latest and rebuild the index.")
    else:
        click.echo("No need for updates.")