Code review comment for lp:~cjwatson/launchpad/relax-personal-git-mp-restrictions

Revision history for this message
Colin Watson (cjwatson) wrote :

> Why is the suggestion widget now sometimes called on a GitRef rather than a
> GitRepository?

It was in fact always that way: it's essentially just because this widget is used on GitRef:+register-merge. It happened to work by chance because GitRef has lots of properties that pass through to the repository. I only noticed when I tried to set `target_repositories = [repository]` in the personal namespace case and found that the UI rendered it as something like "~owner/+git/repo:branch" rather than just "~owner/+git/repo".

I think it's reasonably worth handling both even though we only use the GitRef case today, since we often want to expose similar operations on GitRef and GitRepository: for example, once we have a better ref picker I can well imagine wanting to add GitRepository:+register-merge.

« Back to merge proposal