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
1=== modified file 'lib/lp/codehosting/branchdistro.py'
2--- lib/lp/codehosting/branchdistro.py 2010-09-21 05:14:18 +0000
3+++ lib/lp/codehosting/branchdistro.py 2010-09-29 02:26:44 +0000
4@@ -371,5 +371,6 @@
5 old_db_branch.control_format,
6 old_db_branch.branch_format,
7 old_db_branch.repository_format)
8+ old_db_branch.stacked_on = new_db_branch
9 transaction.commit()
10 return new_db_branch
11
12=== modified file 'lib/lp/codehosting/tests/test_branchdistro.py'
13--- lib/lp/codehosting/tests/test_branchdistro.py 2010-09-24 03:46:04 +0000
14+++ lib/lp/codehosting/tests/test_branchdistro.py 2010-09-29 02:26:44 +0000
15@@ -274,6 +274,8 @@
16 self.assertEqual(old_ancestry, new_ancestry)
17 self.assertEqual(old_history, new_history)
18 self.assertFalse(new_branch.pending_writes)
19+ self.assertIs(None, new_branch.stacked_on)
20+ self.assertEqual(new_branch, db_branch.stacked_on)
21 # The script doesn't have permission to create branch jobs, but just
22 # to be insanely paradoid.
23 transaction.commit()