l.c.m.g.GitRepository(StormBase, WebhookTargetMixin, GitIdentityMixin) : class documentation

Part of lp.code.model.gitrepository View In Hierarchy

See IGitRepository.
Method __init__ Undocumented
Method valid_webhook_event_types Undocumented
Method default_webhook_event_types Undocumented
Method unique_name Undocumented
Method __repr__ Undocumented
Method target See IGitRepository.
Method setTarget See IGitRepository.
Method namespace See IGitRepository.
Method setOwnerDefault See IGitRepository.
Method setTargetDefault See IGitRepository.
Method display_name Undocumented
Method code_reviewer See IGitRepository.
Method isPersonTrustedReviewer See IGitRepository.
Method getInternalPath See IGitRepository.
Method getCodebrowseUrl See IGitRepository.
Method getCodebrowseUrlForRevision Undocumented
Method git_https_url See IGitRepository.
Method git_ssh_url See IGitRepository.
Method private Undocumented
Method refs See IGitRepository.
Method branches See IGitRepository.
Method branches_by_date See IGitRepository.
Method default_branch 0 See IGitRepository.
Method default_branch See IGitRepository.
Method getRefByPath Undocumented
Method createOrUpdateRefs See IGitRepository.
Method removeRefs See IGitRepository.
Method planRefChanges See IGitRepository.
Static Method fetchRefCommits See IGitRepository.
Method synchroniseRefs See IGitRepository.
Method rescan See IGitRepository.
Method getLatestScanJob See IGitRepository.
Method visibleByUser See IGitRepository.
Method getAllowedInformationTypes See IGitRepository.
Method transitionToInformationType See IGitRepository.
Method setName See IGitRepository.
Method setOwner See IGitRepository.
Method subscriptions Undocumented
Method subscribers Undocumented
Method userCanBeSubscribed See IGitRepository.
Method subscribe See IGitRepository.
Method getSubscription See IGitRepository.
Method getSubscriptionsByLevel See IGitRepository.
Method hasSubscription See IGitRepository.
Method unsubscribe See IGitRepository.
Method getNotificationRecipients See IGitRepository.
Method landing_targets See IGitRepository.
Method getPrecachedLandingTargets See IGitRepository.
Method getActiveLandingTargets Merge proposals not in final states where these refs are source.
Method landing_candidates See IGitRepository.
Method getPrecachedLandingCandidates See IGitRepository.
Method getActiveLandingCandidates Merge proposals not in final states where these refs are target.
Method dependent_landings See IGitRepository.
Method getMergeProposals See IGitRepository.
Method getMergeProposalByID See IGitRepository.
Method isRepositoryMergeable See IGitRepository.
Method pending_updates See IGitRepository.
Method updateMergeCommitIDs See IGitRepository.
Method updateLandingTargets See IGitRepository.
Method recipes See IHasRecipes.
Method markRecipesStale See IGitRepository.
Method markSnapsStale See IGitRepository.
Method detectMerges See IGitRepository.
Method getBlob See IGitRepository.
Method getDiff See IGitRepository.
Method code_import Undocumented
Method rules See IGitRepository.
Method getRule See IGitRepository.
Method addRule See IGitRepository.
Method moveRule See IGitRepository.
Method grants See IGitRepository.
Method findRuleGrantsByGrantee See IGitRepository.
Method getRules See IGitRepository.
Method setRules See IGitRepository.
Method checkRefPermissions See IGitRepository.
Method api_checkRefPermissions See IGitRepository.
Method getActivity See IGitRepository.
Method getPrecachedActivity Undocumented
Method issueAccessToken See IGitRepository.
Method canBeDeleted See IGitRepository.
Method getDeletionRequirements See IGitRepository.
Method destroySelf See IGitRepository.
Method _checkPersonalPrivateOwnership Undocumented
Method _reconcileAccess Reconcile the repository's sharing information.
Static Method _convertRefInfo Validate and canonicalise ref info from the hosting service.
Method _known_viewers A set of known persons able to view this repository.
Method _api_landing_targets Undocumented
Method _api_landing_candidates Undocumented
Method _getRecipes Undecorated version of recipes for use by markRecipesStale.
Method _markProposalMerged Undocumented
Method _canonicaliseRuleOrdering Canonicalise rule ordering.
Method _syncRulePositions Synchronise rule positions with their order in a provided list.
Static Method _validateRules Validate a new iterable of access rules.
Method _getDeletionRequirements Determine what operations must be performed to delete this branch.
Method _breakReferences Break all external references to this repository.
Method _deleteRepositoryAccessGrants Delete access grants for this repository prior to deleting it.
Method _deleteRepositorySubscriptions Delete subscriptions for this repository prior to deleting it.
Method _deleteJobs Delete jobs for this repository prior to deleting it.

Inherited from StormBase:

Method __storm_invalidated__ Flush cached properties.

Inherited from WebhookTargetMixin:

Method webhooks Undocumented
Method newWebhook Undocumented

Inherited from GitIdentityMixin:

Method shortened_path See IGitRepository.
Method git_identity See IGitRepository.
Method getRepositoryDefaults See IGitRepository.
Method getRepositoryIdentities See IGitRepository.
def __init__(self, repository_type, registrant, owner, target, name, information_type, date_created, reviewer=None, description=None):
Undocumented
@property
def valid_webhook_event_types(self):
Undocumented
@property
def default_webhook_event_types(self):
Undocumented
@property
def unique_name(self):
Undocumented
def __repr__(self):
Undocumented
@cachedproperty
def target(self):
See IGitRepository.
def _checkPersonalPrivateOwnership(self, new_owner):
Undocumented
def setTarget(self, target, user):
See IGitRepository.
@property
def namespace(self):
See IGitRepository.
def setOwnerDefault(self, value):
See IGitRepository.
def setTargetDefault(self, value):
See IGitRepository.
@property
def display_name(self):
Undocumented
@property
def code_reviewer(self):
See IGitRepository.
def isPersonTrustedReviewer(self, reviewer):
See IGitRepository.
def getInternalPath(self):
See IGitRepository.
def getCodebrowseUrl(self):
See IGitRepository.
def getCodebrowseUrlForRevision(self, commit):
Undocumented
@property
def git_https_url(self):
See IGitRepository.
@property
def git_ssh_url(self):
See IGitRepository.
@property
def private(self):
Undocumented
def _reconcileAccess(self):
Reconcile the repository's sharing information.

Takes the information_type and target and makes the related AccessArtifact and AccessPolicyArtifacts match.

@property
def refs(self):
See IGitRepository.
@property
def branches(self):
See IGitRepository.
@property
def branches_by_date(self):
See IGitRepository.
@property
def default_branch 0(self):
See IGitRepository.
@default_branch.setter
def default_branch(self, value):
See IGitRepository.
def getRefByPath(self, path):
Undocumented
@staticmethod
def _convertRefInfo(info):
Validate and canonicalise ref info from the hosting service.
ParametersinfoA dict of {"object": {"sha1": sha1, "type": "commit"/"tree"/"blob"/"tag"}}.
ReturnsA dict of {"sha1": sha1, "type": GitObjectType}.
RaisesValueErrorif the dict is malformed.
def createOrUpdateRefs(self, refs_info, get_objects=False, logger=None):
See IGitRepository.
def removeRefs(self, paths):
See IGitRepository.
def planRefChanges(self, hosting_path, logger=None):
See IGitRepository.
@staticmethod
def fetchRefCommits(hosting_path, refs, logger=None):
See IGitRepository.
def synchroniseRefs(self, refs_to_upsert, refs_to_remove, logger=None):
See IGitRepository.
def rescan(self):
See IGitRepository.
@cachedproperty
def _known_viewers(self):
A set of known persons able to view this repository.

This method must return an empty set or repository searches will trigger late evaluation. Any 'should be set on load' properties must be done by the repository search.

If you are tempted to change this method, don't. Instead see visibleByUser which defines the just-in-time policy for repository visibility, and IGitCollection which honours visibility rules.

def getLatestScanJob(self):
See IGitRepository.
def visibleByUser(self, user):
See IGitRepository.
def getAllowedInformationTypes(self, user):
See IGitRepository.
def transitionToInformationType(self, information_type, user, verify_policy=True):
See IGitRepository.
def setName(self, new_name, user):
See IGitRepository.
def setOwner(self, new_owner, user):
See IGitRepository.
@property
def subscriptions(self):
Undocumented
@property
def subscribers(self):
Undocumented
def userCanBeSubscribed(self, person):
See IGitRepository.
def subscribe(self, person, notification_level, max_diff_lines, code_review_level, subscribed_by):
See IGitRepository.
def getSubscription(self, person):
See IGitRepository.
def getSubscriptionsByLevel(self, notification_levels):
See IGitRepository.
def hasSubscription(self, person):
See IGitRepository.
def unsubscribe(self, person, unsubscribed_by, ignore_permissions=False):
See IGitRepository.
def getNotificationRecipients(self):
See IGitRepository.
@property
def landing_targets(self):
See IGitRepository.
def getPrecachedLandingTargets(self, user, only_active=False):
See IGitRepository.
@property
def _api_landing_targets(self):
Undocumented
def getActiveLandingTargets(self, paths):
Merge proposals not in final states where these refs are source.
@property
def landing_candidates(self):
See IGitRepository.
def getPrecachedLandingCandidates(self, user):
See IGitRepository.
@property
def _api_landing_candidates(self):
Undocumented
def getActiveLandingCandidates(self, paths):
Merge proposals not in final states where these refs are target.
@property
def dependent_landings(self):
See IGitRepository.
def getMergeProposals(self, status=None, visible_by_user=None, merged_revision_ids=None, eager_load=False):
See IGitRepository.
def getMergeProposalByID(self, id):
See IGitRepository.
def isRepositoryMergeable(self, other):
See IGitRepository.
@property
def pending_updates(self):
See IGitRepository.
def updateMergeCommitIDs(self, paths):
See IGitRepository.
def updateLandingTargets(self, paths):
See IGitRepository.
def _getRecipes(self, paths=None):
Undecorated version of recipes for use by markRecipesStale.
@property
def recipes(self):
See IHasRecipes.
def markRecipesStale(self, paths):
See IGitRepository.
def markSnapsStale(self, paths):
See IGitRepository.
def _markProposalMerged(self, proposal, merged_revision_id, logger=None):
Undocumented
def detectMerges(self, paths, logger=None):
See IGitRepository.
def getBlob(self, filename, rev=None):
See IGitRepository.
def getDiff(self, old, new):
See IGitRepository.
@cachedproperty
def code_import(self):
Undocumented
@property
def rules(self):
See IGitRepository.
def _canonicaliseRuleOrdering(self, rules):
Canonicalise rule ordering.

Exact-match rules come first in lexicographical order, followed by wildcard rules in the requested order. (Note that sorted is guaranteed to be stable.)

def _syncRulePositions(self, rules):
Synchronise rule positions with their order in a provided list.

:param rules: A sequence of `IGitRule`s in the desired order.
def getRule(self, ref_pattern):
See IGitRepository.
def addRule(self, ref_pattern, creator, position=None):
See IGitRepository.
def moveRule(self, rule, position, user):
See IGitRepository.
@property
def grants(self):
See IGitRepository.
def findRuleGrantsByGrantee(self, grantee, include_transitive=True, ref_pattern=None):
See IGitRepository.
def getRules(self):
See IGitRepository.
@staticmethod
def _validateRules(rules):
Validate a new iterable of access rules.
def setRules(self, rules, user):
See IGitRepository.
def checkRefPermissions(self, person, ref_paths):
See IGitRepository.
def api_checkRefPermissions(self, person, paths):
See IGitRepository.
def getActivity(self, changed_after=None):
See IGitRepository.
def getPrecachedActivity(self, **kwargs):
Undocumented
def issueAccessToken(self):
See IGitRepository.
def canBeDeleted(self):
See IGitRepository.
def _getDeletionRequirements(self, eager_load=False):
Determine what operations must be performed to delete this branch.

Two dictionaries are returned, one for items that must be deleted, one for items that must be altered. The item in question is the key, and the value is a user-facing string explaining why the item is affected.

As well as the dictionaries, this method returns two list of callables that may be called to perform the alterations and deletions needed.

def getDeletionRequirements(self, eager_load=False):
See IGitRepository.
def _breakReferences(self):
Break all external references to this repository.

NULLable references will be NULLed. References which are not NULLable will cause the item holding the reference to be deleted.

This function is guaranteed to perform the operations predicted by getDeletionRequirements, because it uses the same backing function.

def _deleteRepositoryAccessGrants(self):
Delete access grants for this repository prior to deleting it.
def _deleteRepositorySubscriptions(self):
Delete subscriptions for this repository prior to deleting it.
def _deleteJobs(self):
Delete jobs for this repository prior to deleting it.

This deletion includes `GitJob`s associated with the branch.
def destroySelf(self, break_references=False):
See IGitRepository.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.