Part of lp.codehosting.safe_open View In Hierarchy
Method | __init__ | Undocumented |
Method | shouldFollowReferences | Whether we traverse references when mirroring. |
Method | transformFallbackLocation | Validate, maybe modify, 'url' to be used as a stacked-on location. |
Method | checkOneURL | Check that url is safe to open. |
Subclasses must override this method.
If we encounter a branch reference and this returns false, an error is raised.
Returns | A boolean to indicate whether to follow a branch reference. |
Parameters | branch | The branch that is being opened. |
url | The URL that the branch provides for its stacked-on location. | |
Returns | (new_url, check) where 'new_url' is the URL of the branch to actually open and 'check' is true if 'new_url' needs to be validated by checkAndFollowBranchReference. |