Integrating Kallithea with TortoiseHg (plus some other comments/suggestions from my team)

Angel Ezquerra angel.ezquerra at gmail.com
Sun Feb 14 18:38:07 UTC 2016


Hi,

on Friday I showed Kallithea to the people on my team and most really
liked. However some said that they'd prefer to be able to do some (if
not all) of the code reviews directly in their TortoiseHg client,
which is what we use as our mercurial client.

In particular, these were some of the things they requested:

1. To be able to open the Kallithea review page for a given revision
from TortoiseHg

This should be pretty straightforward to do. I just need to add a
Custom Tool that opens the corresponding URL in Kallithea.

Ideally it should be possible to jump straight to the bottom of the
code review page, where the Approve form is found. Looking at the
current code I could just use the main_form id as the anchor for the
html, that is:

http://kallithea-server:port/REPOSITORY_PATH/CHANGESET#main_form

Can we expect the main form id to remain unchanged in the foreseeable future?
In fact, it would be nice to be able to quickly access the approve
form from the top of the page. Perhaps the "[Not approved]" text that
appears at the top of the review page could be a link to the approve
form?

2. To be able to jump straight to the review section corresponding to
a particular file from TortoiseHg

This does not seem possible at the moment. It seems that the anchors
corresponding to changeset files on the changeset review page are not
easy to generate. Ideally they should have a format of the sort
CHANGESETID-URL_ENCODED_FILEPATH but they do not seem to follow that
sort of convention :-(

3. To be able to mark a revision as "Approved" (or Rejected, etc) from
TortoiseHg

Step #1 above already kind of solves this request, but if we wanted to
go for a more integrated solution it would be nice if we could do one
of two things:

- Open a page that only had the approve form for the selected
changeset, and nothing else. We could then open it from TortoiseHg.
- Use the JSON API to directly approve or reject a changeset. I
checked the current JSON API but I did not see anything in there that
would allow to do this. Ideally there should be an API call that let
you set the revision state. We could then call it from TortoiseHg
(using a custom tool or with a more integrated solution).

BTW, is is possible to download the stand-alone kallithea-api command
line tool from somewhere?

4. To be able to approve/reject revisions from the changeset list
page, withing having to open each changeset.

5. To view who last changed the state of a changeset on the changeset list.

Finally, I got another question:

Is it possible to make file-wide comments? It seems it isn't. Is there
a recommended workflow for this? Perhaps commenting on the first line
of the file? This is a bit annoying when diffs are very big (and
Kallithea hides some of the files on the diff initially) or when the
files are binary.

Cheers,

Angel


More information about the kallithea-general mailing list