Allow the open browser and web login options to be used on all commands.

Review Request #14573 — Created Sept. 8, 2025 and updated — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

We received a bug report that the web login option was not working for
the rbt post command. Upon investigation, it was found that web login only
actually worked correctly for rbt login. It also worked for commands that
call get_authenticated_session before doing any requests that require
authentication (such as rbt status), but this only worked when the
WEB_LOGIN option was set in .reviewboardrc, not when the option was
passed through the command line.

This change is the beginning in a series of ones that allow web login to be
used for authentication when using any rbt command. This change only
generalizes command options, it doesn't actually implement web login on the
commands (that happens in /r/14575 and /r/14576).

We make the web login option a general server option, instead of only
applying to the login command. The command's long form has been renamed to
--web-login instead of just --web, but we keep the existing -w/--web
option on the login command for compatibility and since -w is a
convenient short-form of the option.

Similarly, we make the open browser option a general one, instead of only
applying to the login and post commands. In the future, any commands that
navigate to a URL can make use of this option to open URLs automatically in a
browser. It has also been renamed to --open-browser, but keeping the old
-o/--open version like we did for the --web option.

We also deprecate the --enable-logging option for rbt login, instead we'll
just use the --debug option to enable server logs.

These options now get set on RBClient as the web_login_options dict. It
makes sense to centralize these settings onto the client, so that callers can
easily set things in one place instead of having to plumb values through
various functions to reach the web login server. This will make more sense
in the context of the upcoming changes.

  • Used in upcoming changes.
  • Ran unit tests.
  • Tested using all versions of the web login, open browser, and
    debug/logging options and their .reviewboardrc config values
    on rbt login, rbt post and rbt status.

Commits

Files