Merge lp:~thumper/launchpad/stop-factory-mirroring 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: 11242
Proposed branch: lp:~thumper/launchpad/stop-factory-mirroring
Merge into: lp:launchpad
Prerequisite: lp:~thumper/launchpad/fix-mirror-failure-story
Diff against target: 13 lines (+2/-1)
1 file modified
lib/lp/testing/factory.py (+2/-1)
To merge this branch: bzr merge lp:~thumper/launchpad/stop-factory-mirroring
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+31011@code.launchpad.net

Commit message

The LaunchpadObjectFactory shouldn't call startMirroring on a hosted branch.

Description of the change

Part of my pre-work for making startMirror, requestMirror and mirrorComplete blow up with hosted branches.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/testing/factory.py'
2--- lib/lp/testing/factory.py 2010-07-26 06:21:45 +0000
3+++ lib/lp/testing/factory.py 2010-07-27 03:27:49 +0000
4@@ -1121,7 +1121,8 @@
5 branch.createBranchRevision(sequence, revision)
6 parent = revision
7 parent_ids = [parent.revision_id]
8- branch.startMirroring()
9+ if branch.branch_type not in (BranchType.REMOTE, BranchType.HOSTED):
10+ branch.startMirroring()
11 removeSecurityProxy(branch).branchChanged(
12 '', parent.revision_id, None, None, None)
13 branch.updateScannedDetails(parent, sequence)