def _fetch(self):
        origin = self.repo.remotes[0]
        try:
            fetch_results = origin.fetch()
        except AssertionError:
            fetch_results = origin.fetch()

        new_objs = False
        for fetchinfo in fetch_results:
            if fetchinfo.old_commit is not None:
                log.debug(
                    '{0} has updated \'{1}\' for remote \'{2}\' '
                    'from {3} to {4}'.format(
                        self.role,
                        fetchinfo.name,
                        self.id,
                        fetchinfo.old_commit.hexsha[:7],
                        fetchinfo.commit.hexsha[:7]
                    )
                )
                new_objs = True
            elif fetchinfo.flags in (fetchinfo.NEW_TAG,
                                     fetchinfo.NEW_HEAD):
                log.debug(
                    '{0} has fetched new {1} \'{2}\' for remote \'{3}\' '
                    .format(
                        self.role,
                        'tag' if fetchinfo.flags == fetchinfo.NEW_TAG
                            else 'head',
                        fetchinfo.name,
                        self.id
                    )
                )
                new_objs = True

        cleaned = self.clean_stale_refs()
        return bool(new_objs or cleaned)
Execute a data collection iteration.
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitPython._fetch--crossover with--dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/collector.py/execute