Use SCMTool IDs to look up repositories when possible.

Review Request #13973 — Created June 11, 2024 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

Many versions of Review Board currently have a bug where sending an
unknown value in the tool= parameter to the repository list API would
cause a crash. We'll be shipping a fix for that, but unfortunately there
are a variety of released versions where the Git and ClearCase clients
can trigger this crash on servers that do not have Power Pack installed.

This change fixes the RBTools side to not include the Power Pack SCMTool
names, which will avoid the problem for existing servers. For new
servers, we'll be shipping a server-side fix that fixes the crash, adds
the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs
rather than names to the repository list API. If we see the IDs in the
capability blob, we can assume that we can pass the IDs, including
potentially unknown IDs.

This also fixes a problem where we were sometimes accessing the
repository list API twice with exactly the same parameters.

  • Ran unit tests.
  • Verified that the repository list API was accessed using SCMTool names
    that did not include potentially missing ones when running against an
    older server.
  • Verified that the repository list API was accessed with SCMTool IDs
    when running against a server with the new API fixes.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.

orig
1
2
3
4
5

Commits

First Last Summary ID Author
Use SCMTool IDs to look up repositories when possible.
Many versions of Review Board currently have a bug where sending an unknown value in the tool= parameter to the repository list API would cause a crash. We'll be shipping a fix for that, but unfortunately there are a variety of released versions where the Git and Clearcase clients can trigger this crash on servers that do not have Power Pack installed. This change fixes the RBTools side to not include the Power Pack SCMTool names, which will avoid the problem for existing servers. For new servers, we'll be shipping a server-side fix that fixes the crash, adds the SCMTool IDs to the capabilities, and allows us to pass SCMTool IDs rather than names to the repository list API. If we see the IDs in the capability blob, we can assume that we can pass the IDs, including potentially unknown IDs. This also fixes a problem where we were sometimes accessing the repository list API twice with exactly the same parameters. Testing Done: - Ran unit tests. - Verified that the repository list API was accessed using SCMTool names that did not include potentially missing ones when running against an older server. - Verified that the repository list API was accessed with SCMTool IDs when running against a server with the new API fixes.
0c315187bed7d11eb3072a00087bfc10f8104be5 David Trowbridge
rbtools/clients/bazaar.py
rbtools/clients/clearcase.py
rbtools/clients/cvs.py
rbtools/clients/git.py
rbtools/clients/mercurial.py
rbtools/clients/perforce.py
rbtools/clients/plastic.py
rbtools/clients/svn.py
rbtools/clients/tfs.py
rbtools/clients/base/scmclient.py
rbtools/commands/setup_repo.py
rbtools/commands/base/commands.py
rbtools/utils/repository.py
Loading...