Unconditionally try to load the SCM client when TREES is defined.

Review Request #14345 — Created Feb. 13, 2025 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

When someone is using the TREES setting for RBTools, it's common that
they'll be using repository paths as the keys to that. In this case, a
command like rbt patch --print would fail because it was trying to
avoid initializing the scmtool, and then we never got the correct server
URL.

This makes it so if TREES is present in the configuration (and now
also actually populated with data, since the default value will be {}),
and we otherwise did not need the scmtool, we'll still attempt to
initialize it. If we get it, then great, we can use it for TREES. If we
don't, we ignore that and proceed as previous.

  • Ran unit tests.
  • Verified that when TREES was defined, we now were initializing the
    scmtool when running rbt patch --print.

Diff Revision 1

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

orig
1
2

Commits

First Last Summary ID Author
Unconditionally try to load the SCM client when TREES is defined.
When someone is using the `TREES` setting for RBTools, it's common that they'll be using repository paths as the keys to that. In this case, a command like `rbt patch --print` would fail because it was trying to avoid initializing the scmtool, and then we never got the correct server URL. This makes it so if `TREES` is present in the configuration (and now also actually populated with data, since the default value will be {}), and we otherwise did not need the scmtool, we'll still attempt to initialize it. If we get it, then great, we can use it for TREES. If we don't, we ignore that and proceed as previous. Testing Done: - Ran unit tests. - Verified that when TREES was defined, we now were initializing the scmtool when running `rbt patch --print`.
63ef0ef07378cbb21f99aecc1eaf44fbb7655a77 David Trowbridge
rbtools/clients/__init__.py
rbtools/commands/base/commands.py
Loading...