l.c.s.m.ModifiedBranchesScript(LaunchpadScript) : class documentation

Part of lp.codehosting.scripts.modifiedbranches View In Hierarchy

List branches modified since the specified time.

Only branches that have been modified since the specified time will be returned. It is possible that the branch will have been modified only in the web UI and not actually received any more revisions, and will be a false positive.

Method __init__ Construct new LaunchpadScript.
Method add_my_options Optionally customize this hook to define your own options.
Method get_last_modified_epoch Return the timezone aware datetime for the last modified epoch.
Method branch_location Return the branch path for the given branch.
Method process_location Strip the defined prefix, and append the suffix as configured.
Method update_locations Add the location, and all the possible parent directories.
Method main Define the meat of your script here. Must be defined.

Inherited from LaunchpadScript:

Method handle_options Undocumented
Method name Enable subclasses to override with command-line arguments.
Method dbuser Enable subclasses to override with command-line arguments.
Method login Super-convenience method that avoids the import.
Method lockfilename Return lockfilename.
Method lockfilepath Undocumented
Method setup_lock Create lockfile.
Method lock_or_die Attempt to lock, and sys.exit(1) if the lock's already taken.
Method unlock Release the lock. Do this before going home.
Method run Actually run the script, executing zcml and initZopeless.
Method record_activity Hook to record script activity.
Method lock_and_run Call lock_or_die(), and then run() the script.
Method _init_zca Initialize the ZCA, this can be overridden for testing purposes.
Method _init_db Initialize the database transaction.
def __init__(self, name, dbuser=None, test_args=None):
Construct new LaunchpadScript.

Name is a short name for this script; it will be used to assemble a lock filename and to identify the logger object.

Use dbuser to specify the user to connect to the database; if not supplied a default will be used.

Specify test_args when you want to override sys.argv. This is useful in test scripts.

ParametersloggerUse this logger, instead of initializing global logging.
def add_my_options(self):

Optionally customize this hook to define your own options.

This method should contain only a set of lines that follow the template:

self.parser.add_option("-f", "--foo", dest="foo",
default="foobar-makes-the-world-go-round", help="You are joking, right?")
def get_last_modified_epoch(self):
Return the timezone aware datetime for the last modified epoch.
def branch_location(self, branch):
Return the branch path for the given branch.
def process_location(self, location):
Strip the defined prefix, and append the suffix as configured.
def update_locations(self, location):
Add the location, and all the possible parent directories.
def main(self):
Define the meat of your script here. Must be defined.

Raise LaunchpadScriptFailure if you encounter an error condition that makes it impossible for you to proceed; sys.exit(1) will be invoked in that situation.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.