Return a list of all the currently loaded repo HEAD objects.
540864
def HeadList(self):
        """"""
        return [(rname, repo.currenthead) for rname, repo in self.repos.items()
                ]
1119207
def repo_dirlist():
    

    for d in os.listdir(settings.upkg_destdir):
        dp = os.path.join(settings.upkg_destdir, d)
        # logger.debug("%s", dp)
        if os.path.isdir(dp) and d[0] != '.':
            # logger.debug("adding %s", dp)
            yield {'base': d, 'root': settings.upkg_destdir,
                   'path': dp}
1083327
def get_unique_repositories(repo_list):
        
        unique_list = list()
        included = defaultdict(lambda: False)
        for repo in repo_list:
            if not included[repo.full_name]:
                unique_list.append(repo)
                included[repo.full_name] = True
        return unique_list
1051155
def gather_repositories():
    

    for (root, dirs, files) in os.walk('.', topdown=True):
        if '.git' not in dirs:
            continue

        for dir in list(dirs):
            dirs.remove(dir)

        path = os.path.split(root)[1]
        repo = os.path.basename(path)
        yield (repo, root)
1309736
def get_all(self, name, default=None):
        """"""
        if default is None:
            default = []
        return self._headers.get_list(name) or default
113706
def get_env_dirs(self):
        """"""
        repo_dirs = next(os.walk(self.env_root))[1]
        if '.git' in repo_dirs:
            repo_dirs.remove('.git')  # not relevant for any repo operations
        return repo_dirs
1120105
@SuppressWarnings("unchecked")
    public <REPO extends I_CmsRepository> List<REPO> getRepositories(Class<REPO> cls) {

        List<REPO> result = new ArrayList<REPO>();
        for (I_CmsRepository repo : m_repositoryMap.values()) {
            if (cls.isInstance(repo)) {
                result.add((REPO)repo);
            }
        }
        return result;
    }
249789
def _get_repo_metadata(self):
        '''
        
        '''
        cache = salt.cache.Cache(self.opts, self.opts['spm_cache_dir'])
        metadata = {}

        def _read_metadata(repo, repo_info):
            if cache.updated('.', repo) is None:
                log.warning('Updating repo metadata')
                self._download_repo_metadata({})

            metadata[repo] = {
                'info': repo_info,
                'packages': cache.fetch('.', repo),
            }

        self._traverse_repos(_read_metadata)
        return metadata
192892
def getStatuses(self, repo_user, repo_name, sha):
        
        return self.api.makeRequest(
            ['repos', repo_user, repo_name, 'statuses', sha],
            method='GET')
381353
def all(self):
        
        url = self.bitbucket.url('GET_USER', username=self.bitbucket.username)
        response = self.bitbucket.dispatch('GET', url, auth=self.bitbucket.auth)
        try:
            return (response[0], response[1]['repositories'])
        except TypeError:
            pass
        return response
342095
def repo_all_list(self, project_key):
        
        url = 'rest/api/1.0/projects/{projectKey}/repos'.format(projectKey=project_key)
        params = {}
        start = 0
        params['start'] = start
        response = self.get(url, params=params)
        if 'values' not in response:
            return []
        repo_list = (response or {}).get('values')
        while not response.get('isLastPage'):
            start = response.get('nextPageStart')
            params['start'] = start
            response = self.get(url, params=params)
            repo_list += (response or {}).get('values')
        return repo_list
1308708
def package_repositories(self):
        
        if self._package_repository_manager is None:
            self._package_repository_manager = PackageRepositoryManager(session=self._session)
        return self._package_repository_manager
298628
def refs(self):
        
        out_refs = IterableList(RemoteReference._id_attribute_, "%s/" % self.name)
        out_refs.extend(RemoteReference.list_items(self.repo, remote=self.name))
        return out_refs
867300
def _get_branches(self, closed=False):
        

        if self._empty:
            return {}

        def _branchtags(localrepo):
            """
            Patched version of mercurial branchtags to not return the closed
            branches

            :param localrepo: locarepository instance
            """

            bt = {}
            bt_closed = {}
            for bn, heads in localrepo.branchmap().iteritems():
                tip = heads[-1]
                if 'close' in localrepo.changelog.read(tip)[5]:
                    bt_closed[bn] = tip
                else:
                    bt[bn] = tip

            if closed:
                bt.update(bt_closed)
            return bt

        sortkey = lambda ctx: ctx[0]  # sort by name
        _branches = [(safe_unicode(n), hex(h),) for n, h in
                     _branchtags(self._repo).items()]

        return OrderedDict(sorted(_branches, key=sortkey, reverse=False))
247448
def list_plugins(directory=None):
    """"""
    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    if not plugins or not isinstance(plugins, dict):
        return None
    return plugins.keys()
419108
def list(self, path=None, with_metadata=False, include_partitions=False):
        ''''''
        from os import walk
        import json

        l = {}

        if not path:
            start_path = self.cache_dir
        else:
            start_path = os.path.join(self.cache_dir, path)

        for root, dirs, files in os.walk(start_path):

            root = root.replace(self.cache_dir, '', 1).strip('/')

            if root.startswith('meta') or root.startswith('_'):
                continue

            if not include_partitions and root.count('/') > 0:
                continue  # partition files

            for f in files:
                rel_path = os.path.join(root, f)
                d = self.metadata(rel_path) if with_metadata else {}

                if d and 'identity' in d:
                    d['identity'] = json.loads(d['identity'])

                d['caches'] = [self.repo_id]

                l[rel_path] = d

        if self.upstream:
            for k, v in self.upstream.list(path, with_metadata, include_partitions).items():
                upstreams = (l[k]['caches'] if k in l else []) + \
                    v.get('caches', self.upstream.repo_id)

                l[k] = v
                l[k]['caches'] = upstreams

        return l
1249534
def _repo_list(self, args):
        '''
        
        '''
        repo_metadata = self._get_repo_metadata()
        for repo in repo_metadata:
            self.ui.status(repo)