← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~thumper/launchpad/branch-distro-avoid-scan into lp:launchpad/devel

 

Tim Penhey has proposed merging lp:~thumper/launchpad/branch-distro-avoid-scan into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #574083 branch-distro doesn't trigger a scanner run
  https://bugs.launchpad.net/bugs/574083


Trivial update to update the stacked_on location of the older package branch.

Found during QA of the other branch-distro tweaks.
-- 
https://code.launchpad.net/~thumper/launchpad/branch-distro-avoid-scan/+merge/36945
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thumper/launchpad/branch-distro-avoid-scan into lp:launchpad/devel.
=== modified file 'lib/lp/codehosting/branchdistro.py'
--- lib/lp/codehosting/branchdistro.py	2010-09-21 05:14:18 +0000
+++ lib/lp/codehosting/branchdistro.py	2010-09-29 02:26:44 +0000
@@ -371,5 +371,6 @@
             old_db_branch.control_format,
             old_db_branch.branch_format,
             old_db_branch.repository_format)
+        old_db_branch.stacked_on = new_db_branch
         transaction.commit()
         return new_db_branch

=== modified file 'lib/lp/codehosting/tests/test_branchdistro.py'
--- lib/lp/codehosting/tests/test_branchdistro.py	2010-09-24 03:46:04 +0000
+++ lib/lp/codehosting/tests/test_branchdistro.py	2010-09-29 02:26:44 +0000
@@ -274,6 +274,8 @@
         self.assertEqual(old_ancestry, new_ancestry)
         self.assertEqual(old_history, new_history)
         self.assertFalse(new_branch.pending_writes)
+        self.assertIs(None, new_branch.stacked_on)
+        self.assertEqual(new_branch, db_branch.stacked_on)
         # The script doesn't have permission to create branch jobs, but just
         # to be insanely paradoid.
         transaction.commit()