Compare against remote_project saving off the matching uuids of of matching content.
        :param remote_project: RemoteProject project to compare against
167892
def update_remote_ids(self, remote_project):
        
        if remote_project:
            self.remote_id = remote_project.id
            _update_remote_children(remote_project, self.children)
580877
def is_cached(self):
        
        from dvc.remote.local import RemoteLOCAL
        from dvc.remote.s3 import RemoteS3

        old = Stage.load(self.repo, self.path)
        if old._changed_outs():
            return False

        # NOTE: need to save checksums for deps in order to compare them
        # with what is written in the old stage.
        for dep in self.deps:
            dep.save()

        old_d = old.dumpd()
        new_d = self.dumpd()

        # NOTE: need to remove checksums from old dict in order to compare
        # it to the new one, since the new one doesn't have checksums yet.
        old_d.pop(self.PARAM_MD5, None)
        new_d.pop(self.PARAM_MD5, None)
        outs = old_d.get(self.PARAM_OUTS, [])
        for out in outs:
            out.pop(RemoteLOCAL.PARAM_CHECKSUM, None)
            out.pop(RemoteS3.PARAM_CHECKSUM, None)

        if old_d != new_d:
            return False

        # NOTE: committing to prevent potential data duplication. For example
        #
        #    $ dvc config cache.type hardlink
        #    $ echo foo > foo
        #    $ dvc add foo
        #    $ rm -f foo
        #    $ echo foo > foo
        #    $ dvc add foo # should replace foo with a link to cache
        #
        old.commit()

        return True
1089487
def relative_to_contrib(diff, project):
    
    path = pathlib.Path(diff.b_path)
    contrib_path = project.contrib_module_path
    return path.relative_to(contrib_path)
1036205
def pagure_specific_project_tag_filter(config, message, tags=None, *args, **kw):
    

    if not pagure_catchall(config, message):
        return False

    tags = tags.split(',') if tags else []
    tags = [tag.strip() for tag in tags if tag and tag.strip()]

    project_tags = set()
    project_tags.update(message.get('project', {}).get('tags', []))
    project_tags.update(
        message.get('pullrequest', {}).get('project', {}).get('tags', []))
    project_tags.update(
        message.get('commit', {}).get('repo', {}).get('tags', []))

    valid = len(project_tags.intersection(set(tags))) > 0

    return valid
1271485
def compare(self, other, components=[]):
        
        lg.debug("Comparing publish %s (%s) and %s (%s)" % (self.name, self.storage or "local", other.name, other.storage or "local"))

        diff, equal = ({}, {})

        for component, snapshots in self.components.items():
            if component not in list(other.components.keys()):
                # Component is missing in other
                diff[component] = snapshots
                continue

            equal_snapshots = list(set(snapshots).intersection(other.components[component]))
            if equal_snapshots:
                lg.debug("Equal snapshots for %s: %s" % (component, equal_snapshots))
                equal[component] = equal_snapshots

            diff_snapshots = list(set(snapshots).difference(other.components[component]))
            if diff_snapshots:
                lg.debug("Different snapshots for %s: %s" % (component, diff_snapshots))
                diff[component] = diff_snapshots

        return (diff, equal)
604779
def get_project(id=None, name=None):
    
    content = get_project_raw(id, name)
    if content:
        return utils.format_json(content)
386067
private void checkUUIDOfSiteRoot(CmsSite site, CmsObject clone, CmsObject cms_offline) {

        CmsUUID id = null;
        try {
            id = clone.readResource(site.getSiteRoot()).getStructureId();
        } catch (CmsException e) {
            //Ok, site root not available for online repository.
        }

        if (id == null) {
            try {
                id = cms_offline.readResource(site.getSiteRoot()).getStructureId();
                m_onlyOfflineSites.add(site);
            } catch (CmsException e) {
                //Siteroot not valid for on- and offline repository.
            }
        }
        if (id != null) {
            site.setSiteRootUUID(id);
            m_siteUUIDs.put(id, site);
        }
    }
905477
def get_upload_report(self):
        
        project = self.remote_store.fetch_remote_project(self.project_name_or_id,
                                                         must_exist=True,
                                                         include_children=False)
        report = UploadReport(project.name)
        report.walk_project(self.local_project)
        return report.get_content()
922783
def _match_by_uuid(self, current_venvs, uuid):
        """"""
        for venv_str in current_venvs:
            venv = json.loads(venv_str)
            env_path = venv.get('metadata', {}).get('env_path')
            _, env_uuid = os.path.split(env_path)
            if env_uuid == uuid:
                return venv
1034260
def _check_projects(self):
        ''''''
        for project in self.projectdb.check_update(self.last_check_projects,
                                                   ['name', 'updatetime']):
            if project['name'] not in self.projects:
                continue
            if project['updatetime'] > self.projects[project['name']]['info'].get('updatetime', 0):
                self._update_project(project['name'])
        self.last_check_projects = time.time()
619601
def project_tags(self):
        
        request_url = "{}git/tags".format(self.create_basic_url())

        return_value = self._call_api(request_url)

        return return_value['tags']
634707
def checkIfRemoteIsNewer(self, localfile):
        
        is_remote_newer = False
        if localfile.exists() and localfile.stat().st_size > 0:
            LOG.info("File exists locally, using cache")
        else:
            is_remote_newer = True
            LOG.info("No cache file, fetching entries")
        return is_remote_newer
658646
def remove(self, uuid, project=None):
        
        uuid = uuid.split('@')[0]
        with self._lock:
            run(['task', 'rc.verbose=nothing', 'rc.data.location={self._data_location}'.format(**locals()), 'rc.confirmation=no', uuid, 'delete'])
702050
def compare_local_remote_bytes(self, remotefile, localfile, remote_headers=None):
        
        is_equal = True
        remote_size = self.get_remote_content_len(remotefile, remote_headers)
        local_size = self.get_local_file_size(localfile)
        if remote_size is not None and local_size != int(remote_size):
            is_equal = False
            LOG.error(
                'local file and remote file different sizes\n'
                '%s has size %s, %s has size %s',
                localfile, local_size, remotefile, remote_size)
        return is_equal
543730
def after_run(self, result_id):
        
        self.local_project.set_remote_id_after_send(result_id)
        self.settings.project_id = result_id
741649
def persist_project(project):
    
    from benchbuild.utils.schema import Project, Session
    session = Session()
    projects = session.query(Project) \
        .filter(Project.name == project.name) \
        .filter(Project.group_name == project.group)

    name = project.name
    desc = project.__doc__
    domain = project.domain
    group_name = project.group
    version = project.version() \
        if callable(project.version) else project.version
    try:
        src_url = project.src_uri
    except AttributeError:
        src_url = 'unknown'

    if projects.count() == 0:
        newp = Project()
        newp.name = name
        newp.description = desc
        newp.src_url = src_url
        newp.domain = domain
        newp.group_name = group_name
        newp.version = version
        session.add(newp)
    else:
        newp_value = {
            "name": name,
            "description": desc,
            "src_url": src_url,
            "domain": domain,
            "group_name": group_name,
            "version": version
        }
        projects.update(newp_value)

    session.commit()
    return (projects, session)
1148115
def license_contents
      matched_files.reject { |f| f == package_file }
                   .group_by(&:content)
                   .map { |content, files| { "sources" => license_content_sources(files), "text" => content } }
    end