launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25988
Re: [Merge] ~pappacena/launchpad:oci-project-of-project-git-namespace into launchpad:master
Review: Approve
Diff comments:
> diff --git a/lib/lp/code/model/gitlookup.py b/lib/lp/code/model/gitlookup.py
> index a59134d..d4641ca 100644
> --- a/lib/lp/code/model/gitlookup.py
> +++ b/lib/lp/code/model/gitlookup.py
> @@ -142,6 +142,19 @@ class ProjectGitTraversable(_BaseGitTraversable):
> From here, you can traverse to a named project repository.
> """
>
> + def traverse(self, owner, name, segments):
> + if name == "+oci":
> + try:
> + spn_name = next(segments)
"spn" stands for "SourcePackageName", so maybe pick a different abbreviation.
> + except StopIteration:
> + raise InvalidNamespace("/".join(segments.traversed))
> + oci_project = self.context.getOCIProject(spn_name)
> + if oci_project is None:
> + raise NoSuchOCIProjectName(spn_name)
> + return owner, oci_project, None
> + return super(ProjectGitTraversable, self).traverse(
> + owner, name, segments)
> +
> def getNamespace(self, owner):
> return getUtility(IGitNamespaceSet).get(owner, project=self.context)
>
--
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/395110
Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:oci-project-of-project-git-namespace.
References