[Qt-creator] REST support in Gerrit dialog

Orgad Shaneh orgads at gmail.com
Wed Feb 15 11:26:26 CET 2017


Hi,

The Gerrit dialog was improved recently, and it now connects to the
remote[s] according to the origin url of the active repository. This
currently supports SSH remotes only.

I'd like to add support for querying using gerrit's REST API in the Gerrit
dialog.

This has the following advantages:

   - It is typically faster than SSH
   - It is typically *not* blocked by firewalls
   - It is more advanced (we can get more data than by ssh query)
   - Some servers (like gerrit-review.googlesource.com) support *only* HTTP

In order to use REST, the user must generate HTTP password in gerrit's
preferences, and configure it locally.

   - On linux, ~/.netrc should contain a line like:
   machine codereview.qt-project.org login <username> password <password>
   - On Git for Windows it's similar, but the file is named ~/_netrc. In
   addition, if git is configured to use the Git Credentials Manager, then the
   user will be asked for the credentials on first connection to the server
   using Git (usually on git fetch).
   - On macOS I have no idea, but it's likely to be similar to linux (macOS
   users, please approve).

Apart from that, Gerrit uses Digest authentication by default, but can be
configured to use Basic auth (for example, to enable LDAP authentication).

Now, since this is not a trivial task user-wise, I'd like to hear your
opinions.

   1. Should Qt Creator ask for the user's credentials and configure them
   automatically (if they're not present in .netrc)?
   2. Does it make sense to have some kind of a wizard when a new server is
   discovered, to guide the user through generating the password etc.?
   3. When should we test (and configure if needed) the connection to the
   server?
      1. Right when the user chooses the server?
      2. When hitting the "Refresh"  button?
      3. Add a new button for that, next to the remotes list?
   4. Where/how do we store the list of "supported" servers? What I
   currently have in mind is Qtc configuration, in sections like
   GitServers/<host>/GerritRest = 1 etc.
   5. Is it ok to use curl on all platforms, or do we have a reliable Qt
   HTTP transport, which supports Basic/Digest authentications (gerrit uses
   Digest by default, but can be configured for Basic)?

Thanks ahead :)

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20170215/5d3e34d7/attachment.html>


More information about the Qt-creator mailing list