The proposal to merge lp:~wallyworld/launchpad/branch-transitively_private-attribute into lp:launchpad has been updated.
Description changed to: This branch can only be deployed after the following db-devel branches have been deployed to lp.net: lp:~wallyworld/launchpad/branch-privacy-trigger lp:~wallyworld/launchpad/branch-transitively-private-column A branch to provide a garbo job to populate the transitively_private column for existing branches. Bug 568121 requires that public branches stacked on private branches are shown as private. This mp introduces a new Branch attribute: transitively_private. The attribute is maintained by a db trigger and allows both queries and application code to use a common attribute for determining whether a branch is truly private. This branch allows some previously deployed code to recursively look at stacked on branches to populate the "private" attribute to be replaced with a delegated call to transitively_private. == Implementation == Essentially: simply replace uses of Branch.private with Branch.transitively_private in Storm queries and also hand coded SQL. Also a bit of code to ensure that when branch.setPrivate() is called, branch.transitively_private is invalidated on that instance so that it is reloaded from the db. == Tests == Existing tests using private branches were altered so that some of the private branches were made transitively private. Changed tests in: - test_branchcollection - test_branchlookup - test_revision - test_branchmergeproposal - test_branch Plus added tests: TestUpdateRevisionCacheForBranch - test_revisions_for_transitive_private_branch_marked_private - test_existing_transitive_private_revisions_with_public_branch TestGetByLPPath - test_transitive_private_branch - test_transitive_private_linked_branch == Lint == Linting changed files: lib/lp/code/model/branch.py lib/lp/code/model/branchcollection.py lib/lp/code/model/branchlookup.py lib/lp/code/model/branchmergeproposal.py lib/lp/code/model/revision.py lib/lp/code/model/tests/test_branch.py lib/lp/code/model/tests/test_branchcollection.py lib/lp/code/model/tests/test_branchlookup.py lib/lp/code/model/tests/test_branchmergeproposal.py lib/lp/code/model/tests/test_revision.py lib/lp/registry/model/distribution.py lib/lp/registry/tests/test_person.py lib/lp/testing/factory.py ./lib/lp/code/model/tests/test_branchcollection.py 759: local variable 'mp' is assigned to but never used 770: local variable 'mp' is assigned to but never used ./lib/lp/code/model/tests/test_revision.py 312: local variable 'b1' is assigned to but never used 506: local variable 'rev2' is assigned to but never used 529: local variable 'rev2' is assigned to but never used 537: local variable 'rev3' is assigned to but never used 556: local variable 'rev1' is assigned to but never used 565: local variable 'rev2' is assigned to but never used 635: local variable 'last_scanned_id' is assigned to but never used For more details, see: https://code.launchpad.net/~wallyworld/launchpad/branch-transitively_private-attribute/+merge/75325 -- https://code.launchpad.net/~wallyworld/launchpad/branch-transitively_private-attribute/+merge/75325 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/branch-transitively_private-attribute into lp:launchpad. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

