Update and streamline local repository type detection.

Review Request #11503 — Created March 4, 2021 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

The way that the local repository type was detected overly complicated
and inefficient. We would go through and assemble a complete
RepositoryInfo for each possible repository, potentially doing excess
computation that would just be thrown away. In addition, there were some
situtations where a repository would be operating in a remote-only mode
(for example, using SVN with the --repository-url option) where we
were scanning everything locally before finally using the remote.

This change reworks the local repository detection in RBTools to
work in three phases:

  1. First we ask each tool if it's operating in "remote only" mode. At
    the moment, SVN is the only such tool, but it's easy to imagine other
    server-heavy services gaining this ability.
  2. Second, we scan through each tool to see if it thinks there's an
    active repository. This has been simplified to only fetch the local
    working directory from the tool, rather than the full repository
    info.
  3. Finally, after having chosen a tool, we ask it for the repository
    info structure.
  • Ran unit tests.
  • Smoke tested tools that use the repository.

Commits

Files

    Loading...