Merge lp:~abentley/launchpad/partial-ancestry-scanner into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Paul Hummer |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11757 |
Proposed branch: | lp:~abentley/launchpad/partial-ancestry-scanner |
Merge into: | lp:launchpad |
Diff against target: |
553 lines (+193/-117) 7 files modified
lib/lp/codehosting/bzrutils.py (+12/-0) lib/lp/codehosting/scanner/bzrsync.py (+84/-57) lib/lp/codehosting/scanner/events.py (+3/-2) lib/lp/codehosting/scanner/mergedetection.py (+4/-4) lib/lp/codehosting/scanner/tests/test_bzrsync.py (+83/-33) lib/lp/codehosting/scanner/tests/test_mergedetection.py (+3/-3) lib/lp/testing/factory.py (+4/-18) |
To merge this branch: | bzr merge lp:~abentley/launchpad/partial-ancestry-scanner |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Review via email: mp+38582@code.launchpad.net |
Commit message
Stop loading the entire ancestry of a branch during the scan
Description of the change
= Summary =
Fix bug #638637: Stop loading the entire ancestry of a branch during the scan
== Proposed fix ==
Use the set of revisions added to the ancestry, in most cases.
== Pre-implementation notes ==
Pre- and mid- implementation with thumper.
== Implementation details ==
I took the opportunity to refactor how things work a lot. Removing
whole-ancestry traversal made retrieveBranchD
with Branch.
I also replaced BzrSync.
can use a partial ancestry and last-revno to generate the required info.
I also factored code out, e.g. getHistoryDelta.
Along the way, I added a write_locked Context Manager and added parent_ids to
makeBranchRevision so I could test getAncestryDelta.
_getRevisionGraph is designed to handle the case where not only has the tip
changed, but the old tip isn't present in the new repository. This requires
generating a Graph using the Revisions associated with the branch. However,
it's an extremely rare case, so I didn't optimize it.
== Tests ==
bin/test -vv scanner
== Demo and Q/A ==
None.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
374: E231 missing whitespace after ','
121: Line exceeds 78 characters.