Move SCM-provided repository name out of RepositoryInfo structure.
Review Request #11504 — Created March 8, 2021 and submitted
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 theget_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 asrbt status
and
rbt post -u
.
Summary | ID |
---|---|
2e875f79db0ab4faf073fba973c3cc78c2b66189 |
Description | From | Last Updated |
---|---|---|
E501 line too long (81 > 79 characters) |
reviewbot | |
Let's use :py:meth: to reference get_repository_name. |
chipx86 | |
Can this be one statement? |
chipx86 | |
Can you add Version Added here, before Returns? |
chipx86 | |
This needs to go right after the description text, before Args. |
chipx86 |
- Commits:
-
Summary ID 05939566a81bf59ca12dbc3dcf37bc835b5ff08d 329aaf827433af5e054c3ea0dfba5457f623d35d
Checks run (2 succeeded)
- Commits:
-
Summary ID 329aaf827433af5e054c3ea0dfba5457f623d35d 2e875f79db0ab4faf073fba973c3cc78c2b66189