Part of lp.code.interfaces.revision View In Hierarchy
Method | getByRevisionId | Find a revision by revision_id. |
Method | onlyPresent | Return the revision ids from revids that are present. |
Method | new | Create a new Revision with the given revision ID. |
Method | newFromBazaarRevisions | Create new Revisions from the given Bazaar Revisions. |
Method | acquireRevisionAuthors | Return a dict of RevisionAuthors with the specified names. |
Method | getTipRevisionsForBranches | Get the tip branch revisions for the specified branches. |
Method | getRecentRevisionsForProduct | Get the revisions for product created within so many days. |
Method | getRevisionsNeedingKarmaAllocated | Get the revisions needing karma allocated. |
Method | getPublicRevisionsForPerson | Get the public revisions for the person or team specified. |
Method | getPublicRevisionsForProduct | Get the public revisions for the product specified. |
Method | getPublicRevisionsForProjectGroup | Get the public revisions for the project group specified. |
Method | updateRevisionCacheForBranch | Update the RevisionCache table with the revisions from the branch. |
Method | pruneRevisionCache | Remove old rows from the RevisionCache. |
None if the revision is not known.
This method allows us to insert Revisions in bulk, which is important for larger branches.
If a RevisionAuthor is not present in the database, it is created first.
The revision_authors are prejoined in to reduce the number of database queries issued.
Returns | ResultSet containing Revision or None if no matching
revisions found. |
In order to get the time the revision was actually created, the time extracted from the revision properties is used. While this may not be 100% accurate, it is much more accurate than using date created.
Returns | ResultSet containing tuples of (Revision, RevisionAuthor) |
Get the revisions needing karma allocated.
Under normal circumstances karma is allocated for revisions by the branch scanner as it is scanning the revisions.
Returns | A ResultSet containing revisions where: * karma not allocated * revision author linked to a Launchpad person * revision in a branch associated with a product |
Parameters | person | A person or team. |
day_limit | Defines a time boundary for the revision_date, where (now - day_limit) < revision_date <= now. | |
Returns | ResultSet containing all revisions that are in a public
branch somewhere where the person is the revision author, or
the revision author is in the team, where the revision_date is
within day_limit number of days of now. The results are ordered
with the most recent revision_date first. |
Parameters | product | A valid Product . |
day_limit | Defines a time boundary for the revision_date, where (now - day_limit) < revision_date <= now. | |
Returns | ResultSet containing all revisions that are in a public
branch associated with the product, where the revision_date is
within day_limit number of days of now. The results are ordered
with the most recent revision_date first. |
Parameters | projectgroup | A valid ProjectGroup . |
day_limit | Defines a time boundary for the revision_date, where (now - day_limit) < revision_date <= now. | |
Returns | ResultSet containing all revisions that are in a public
branch associated with a product that is associated with the
project, where the revision_date is within day_limit number
of days of now. The results are ordered with the most recent
revision_date first. |