← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:oci-project-of-project-git-namespace into launchpad:master

 


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)

Oops. Copy + paste mistake. Fixing it.

> +            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