Merge lp:~blr/launchpad/ui-project-setbranch into lp:launchpad
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~blr/launchpad/ui-project-setbranch |
| Merge into: | lp:launchpad |
| Diff against target: |
131 lines (+15/-11) 8 files modified
lib/lp/blueprints/browser/tests/test_specification.py (+1/-1) lib/lp/bugs/browser/tests/test_bugtask.py (+2/-2) lib/lp/code/browser/tests/test_branchmergeproposallisting.py (+2/-2) lib/lp/code/browser/tests/test_gitlisting.py (+1/-1) lib/lp/code/javascript/productseries-setbranch.js (+5/-2) lib/lp/registry/browser/tests/pillar-views.txt (+2/-2) lib/lp/registry/stories/webservice/xx-project-registry.txt (+1/-0) lib/lp/registry/tests/test_product.py (+1/-1) |
| To merge this branch: | bzr merge lp:~blr/launchpad/ui-project-setbranch |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2015-06-25 | Approve on 2015-06-25 |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2015-05-14.
This proposal has been superseded by a proposal from 2015-06-25.
Commit Message
Add Product.
Description of the Change
Provides a new SetBranch view for projects, additionally allowing a default version control system to be defined.
A project's vcs will also be displayed on the product index under Project Information. If not default vcs has been provided, the vcs type is inferred from existing bzr or git branches, with git taking precedence.
Fixes bug in setTargetDefault where an exception was thrown when attempting to set the same targetdefault again.
Testfixed.
| William Grant (wgrant) wrote : | # |
Just one last thing: when I suggested that is_series didn't need to be a property, I meant that it could be a plain attribute. Both implements return a constant value.

Various code/style comments inline, UX design comments here:
In almost all cases the user will care about at most one VCS. Everything relating to the other VCS is just noise unless that VCS is selected (or a migration is in progress, or they're doing something weird). So the page should start by asking for the project's VCS (not a "default VCS" in the UI), defaulting to Bazaar until our Git support is more complete.
Once you've selected a VCS (not a "default VCS" in the UI) there are three options: push a new repo, choose an existing repo, or mirror a repo from elsewhere. The other VCS's config has to be available too, but it needn't be visible without an extra click.
The "push a new repo" case is handled by the push instructions. But they can be simpler, because the project owner can always create defaults if they don't exist: the Git URL should be git+ssh: //user@ host/project, and the Bazaar URL lp:project. The initial push instructions will also work fine to write to LP-hosted Bazaar branches or Git repositories, but they shouldn't be shown if the series Bazaar branch is already set and is an import, since those can't be written to directly.
The "choose an existing repo" case requires a selector widget, which can currently just be a textbox to specify a branch or repo path. The Bazaar case should stay as it is now, setting product. development_ focus.branch, and the Git case should use setDefaultRepos itory.
The "mirror a repo from elsewhere" case can currently only exist for Bazaar, as we don't have Git mirroring yet. We can work out how that looks for Git when we get there.