Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / method

_repoint_unchanged

codeintel.indexer.CodeIndexer._repoint_unchanged

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Calls (1)
SymbolFileResolved by
_utcnowindexer.pysame file
Called by (1)
SymbolFileResolved by
_syncindexer.pysame file
Inside (1)
SymbolFileResolved by
CodeIndexerindexer.pysame file
codeintel.indexer.CodeIndexer._repoint_unchangedbackend/app/codeintel/indexer.py, lines 314–333Open source
    def _repoint_unchanged(self, repo_id, unchanged: list[tuple[str, str]], commit: str) -> None:        by_old: dict[str, list] = defaultdict(list)        for rid, old in unchanged:            if old != commit:                by_old[old or ""].append(rid)        now = _utcnow()        for old, rids in by_old.items():            for i in range(0, len(rids), 500):                ids = rids[i : i + 500]                self.db.execute(                    update(Resource)                    .where(Resource.id.in_(ids))                    .values(coverage=commit, last_indexed_sha=commit, last_indexed_at=now)                )                values = {"branch_reference": commit}                if old:                    values["github_uri"] = func.replace(DocumentChunk.github_uri, f"/{old}/", f"/{commit}/")                self.db.execute(                    update(DocumentChunk).where(DocumentChunk.resource_id.in_(ids)).values(**values)                )

What the index recorded

Signature
def _repoint_unchanged(self, repo_id, unchanged: list[tuple[str, str]], commit: str) -> None:
File
backend/app/codeintel/indexer.py
Lines
314–333
Parser
python-ast
Git blob
e8fdfa7b5545e821f7649d68cfadd2aae85b89d0
Call sites
12 named, 2 resolved, 10 left unlinked
Outside this subset
1 more edges reach code outside the graph shown here

Read it on GitHub at this commit