• 
      

    Allow HostingServices to validate repositories.

    Review Request #4416 — Created Aug. 10, 2013 and submitted — Latest diff uploaded

    Information

    Review Board
    release-1.7.x

    Reviewers

    Allow HostingServices to validate repositories.
    
    A HostingService may know best whether a given repository configuration
    is valid. In the case of HTTPS-backed repositories, it's actually
    preferable that the HostingService does the check, since the Repository
    entry may not have an associated username/password stored.
    
    Now, when validating repositories, we go through the HostingService, if
    one is selected. That will fall back to the SCMTool's validation, unless
    a subclass overrides validate_repository and provides this
    functionality.
    
    The webapi implementation of repository validation does not make use of
    this, since at that level, there's no information on the hosting service
    data. When repository configuration is rewritten, that may change. For
    now, it's assumed that anyone going through the API is just setting up
    standard repositories in-house.
    
    Beanstalk will be making use of this in an upcoming change.
    Tested with the upcoming Beanstalk change. I was able to validate a
    repository using the API. Prior to this change, it would attempt
    default SVN repo checking, which would use the HTTPS URL, without having
    any username/password, and would cause problems.