← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~blr/launchpad/ui-project-setbranch into lp:launchpad

 

Bayard 'kit' Randel has proposed merging lp:~blr/launchpad/ui-project-setbranch into lp:launchpad.

Commit message:
Add Product.ProductSetBranchView and UI support for setting product.vcs.

Requested reviews:
  William Grant (wgrant): code

For more details, see:
https://code.launchpad.net/~blr/launchpad/ui-project-setbranch/+merge/262947

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.

Additional Testfix.
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/browser/tests/test_product.py'
--- lib/lp/registry/browser/tests/test_product.py	2015-05-18 23:23:57 +0000
+++ lib/lp/registry/browser/tests/test_product.py	2015-06-25 09:07:46 +0000
@@ -310,11 +310,11 @@
         view = create_initialized_view(self.product, '+index')
         self.assertTrue(view.show_programming_languages)
 
-    def test_show_default_vcs(self):
+    def test_show_inferred_vcs(self):
         with person_logged_in(self.product.owner):
             self.product.vcs = VCSType.GIT
-        view = create_initialized_view(self.product, '+index')
-        self.assertTrue(view.show_vcs)
+        browser = self.getViewBrowser(self.product, '+index')
+        self.assertIn(VCSType.GIT.title, browser.contents)
 
     def test_show_license_info_without_other_license(self):
         # show_license_info is false when one of the "other" licences is


Follow ups