Part of lp.codehosting.scanner.bzrsync View In Hierarchy
Method | __init__ | Undocumented |
Method | syncBranchAndClose | Synchronize the database with a Bazaar branch, handling locking. |
Method | syncBranch | Synchronize the database view of a branch with Bazaar data. |
Method | retrieveDatabaseAncestry | Efficiently retrieve ancestry from the database. |
Method | getAncestryDelta | Undocumented |
Method | getHistoryDelta | Undocumented |
Method | planDatabaseChanges | Plan database changes to synchronize with bzrlib data. |
Method | getBazaarRevisions | Like get_revisions(revisions) but filter out ghosts first. |
Method | syncRevisions | Import the supplied revisions. |
Static Method | revisionsToInsert | Calculate the revisions to insert and their revnos. |
Method | deleteBranchRevisions | Delete a batch of BranchRevision rows. |
Method | insertBranchRevisions | Insert a batch of BranchRevision rows. |
Method | updateBranchStatus | Update the branch-scanner status in the database Branch table. |
Method | _getRevisionGraph | Undocumented |
Synchronize the database view of a branch with Bazaar data.
bzr_branch
must be read locked.
Several tables must be updated:
Use the data retrieved by retrieveDatabaseAncestry
and
retrieveBranchDetails
to plan the changes to apply to the database.
Parameters | revisions | the set of Bazaar revision IDs to return bzrlib Revision objects for. |
Parameters | bzr_branch | The Bazaar branch that's being scanned. |
bzr_revisions | the revisions to import | |
bzr_revision | (type: bzrlib.revision.Revision) | |
revids_to_insert | a dict of revision ids to integer revno. Non-mainline revisions will be mapped to None. |
Parameters | added_history | A list of revision ids added to the revision history in parent-to-child order. |
last_revno | The revno of the last revision. | |
added_ancestry | A set of revisions that have been added to the ancestry of the branch. May overlap with added_history. |