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

Proposed by Tim Penhey
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: 11654
Proposed branch: lp:~thumper/launchpad/branch-distro-avoid-scan
Merge into: lp:launchpad
Diff against target: 23 lines (+3/-0)
2 files modified
lib/lp/codehosting/branchdistro.py (+1/-0)
lib/lp/codehosting/tests/test_branchdistro.py (+2/-0)
To merge this branch: bzr merge lp:~thumper/launchpad/branch-distro-avoid-scan
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+36945@code.launchpad.net

Commit message

Update the stacked_on location of the older package branch when branching the distro.

Description of the change

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

Found during QA of the other branch-distro tweaks.

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Bah, now with vote.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
371 old_db_branch.control_format,371 old_db_branch.control_format,
372 old_db_branch.branch_format,372 old_db_branch.branch_format,
373 old_db_branch.repository_format)373 old_db_branch.repository_format)
374 old_db_branch.stacked_on = new_db_branch
374 transaction.commit()375 transaction.commit()
375 return new_db_branch376 return new_db_branch
376377
=== 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 @@
274 self.assertEqual(old_ancestry, new_ancestry)274 self.assertEqual(old_ancestry, new_ancestry)
275 self.assertEqual(old_history, new_history)275 self.assertEqual(old_history, new_history)
276 self.assertFalse(new_branch.pending_writes)276 self.assertFalse(new_branch.pending_writes)
277 self.assertIs(None, new_branch.stacked_on)
278 self.assertEqual(new_branch, db_branch.stacked_on)
277 # The script doesn't have permission to create branch jobs, but just279 # The script doesn't have permission to create branch jobs, but just
278 # to be insanely paradoid.280 # to be insanely paradoid.
279 transaction.commit()281 transaction.commit()