+class SymlinkSearchPath(NamedTuple):
+ path: str
+
+ # pylint: disable=no-self-use
+ def pin(self, _: Verification, __: Optional[Pin]) -> SymlinkPin:
+ return SymlinkPin()
+
+ def fetch(self, v: Verification, _: Pin) -> str:
+ return symlink_archive(v, self.path)
+
+
+class GitSearchPath(NamedTuple):
+ git_ref: str
+ git_repo: str
+
+ def pin(self, v: Verification, old_pin: Optional[Pin]) -> GitPin:
+ _, new_revision = git_cache.fetch(self.git_repo, self.git_ref)
+ if old_pin is not None:
+ assert isinstance(old_pin, GitPin)
+ verify_git_ancestry(v, self, old_pin.git_revision, new_revision)
+ return GitPin(release_name=git_revision_name(v, self, new_revision),
+ git_revision=new_revision)
+
+ def fetch(self, v: Verification, pin: Pin) -> str:
+ assert isinstance(pin, GitPin)
+ git_cache.ensure_rev_available(
+ self.git_repo, self.git_ref, pin.git_revision)
+ return git_get_tarball(v, self, pin)
+
+
+class ChannelSearchPath(NamedTuple):