Move SCM-provided repository name out of RepositoryInfo structure.

Review Request #11504 — Created March 8, 2021 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Perforce allows administrators to configure the repository name into the
p4 counters. This was then used in the case where the name was not
already provided from the config or command line options. Unfortunately,
this was stuck into the RepositoryInfo structure, which wasn't the best
place for it. This also meant that even when the repository name was
configured in .reviewboardrc, we'd query the p4 counters looking for it.

This change moves the repository name out of the RepositoryInfo
structure and into a method which is only called if the repository name
is not provided in another way. It also actually uses that name when
querying the repositories inside the get_repository_id method (as
opposed to fetching all repositories and then comparing against the
name).

  • Ran unit tests.
  • Verified that get_repository_id was now only fetching a single
    repository from the API during commands such as rbt status and
    rbt post -u.

Commits

Files