Nicely print the web login URL when authenticating rbt post.
Review Request #14600 — Created Sept. 8, 2025 and submitted — Latest diff uploaded
In rbt post, a progress bar for commit validation starts up before we
know whether the client is authenticated or not. While the progress bar
is active, we'll prompt for auth credentials. When we prompt for web
login authentication, the "Please log in to the Review Board ..." line
gets printed onto the same line as the progress bar, since the cursor is
set by the bar who is not expected to deal with any external input/output.
When we prompt for username/password authentication, the line
gets printed onto the next line because we write a new line to STDOUT
before prompting for the credentials.This change makes the web login logs prettier by checking if a progress
bar is active and then logging a new line if so for the web-login flow.
We are using an internal attribute to check if a bar is active, since I
couldn't find any public API for this. This should be fine for our
purposes, if anything changes with that attribute then we'll just get the
ugly printing again.
Made sure things looked nice when using
rbt postand other commands
(rbt login,rbt status) when passing--web-loginand when using
username and password prompting.