Running Kallithea on Windows

Thomas De Schampheleire patrickdepinguin at gmail.com
Wed Feb 10 13:45:52 UTC 2016


Hi,

Just some additional input from my side.

On Tue, Feb 9, 2016 at 3:58 PM, Angel Ezquerra <ezquerra at gmail.com> wrote:
[..]
>
> So now the questions:
>
> 1. Is it possible to configure Kallithea as a "code review" only tool,
> disabling both push and, above all, pull access?

We are using Kallithea as code-review tool only. Changes added to our
real repositories are sent to Kallithea via a hook, so that Kallithea
is always up-to-date. Users cannot push to these mirror repos.
However, since we want review before commits get into the real repo,
we have set up a parallel 'review repo' hierarchy, where users _are_
allowed to push to (and where multiple heads are allowed too). The
idea is that users send the commits they want to get reviewed to this
review repo, then launch a pullrequest from the review repo to the
mirrored real repo. The 'pullrequest' concept is what is actually
'review request' (and we have added a translation that makes exactly
this terminology change).

[..]
>
> 3. How well would Kallithea coexist with our existing mercurial server
> if they both pointed to the same repositories? That is, if we
> configure Kallithea to look for repositories on the same location that
> the existing mercurial server looks for them, would there be any
> problems? In theory mercurial creates locks to avoid problems with
> concurrent repository access. Should this work?
>     - The reason I wonder this is that, at least for now, I'd rather
> not replace our server with Kallithea, but add it as an alternative
> interface. This would give people some time to tray it and give me
> feedback.

As mentioned, the kallithea repositories are currently separate from
our real repositories and kept in sync via a hook. The hook performs a
pull in the kallithea repo, from the real repo. As it bypasses
Kallithea entirely (we don't push to kallithea http(s) but directly
using mercurial on the filesystem) we need to trigger a kallithea
cache invalidation. This can be done with a JSON api call (we are
using a custom python tool that uses the requests library, but
Kallithea also provides a similar 'api' tool.)

>
> 4. Is there a way to configure the Kallithea interface, other than
> manually modifying the HTML templates? In particular, is there a way
> to add some sort of banner to every page server by Kallithea (to add
> links to our issue tracker, our TortoiseHg installer, and so on)?
>     - Also, is there a way to "brand" our server (e.g. adding our
> company logo, changing the colors to our corporate colors, etc?)

As Mads mentioned there are some branding options but they are not
complete. For example, a 'custom style sheet' feature is currently not
available. A rework of the stylesheets is ongoing (transformation to
Bootstrap) but currently not done. I guess some branding aspects could
be more easily added when that work is done.

Some things, like adding custom banners, may be very specific to a
given use case and hard to upstream. Depending on the type of
customization, a hook could be added upstream which can then be
implemented in a specific instance, or the changes can remain fully
custom.
There is an 'rcextensions' file that you can use for some type of
customization and monkeypatching. In our instance, for example, we
overwrite the PullRequest.make_nice_id method with our custom nice id,
while keeping the base kallithea code untouched.

[..]

>
> 6. How is the code review information stored by Kallithea?
>     - Can be exported somehow? Can it be copied into a new Kallithea server?
>

As Mads said the comments are stored in the database, so can be
extracted with regular SQL queries. There is no ready-made tool, but
it is not that hard. There is a table with pullrequests, and a table
with comments. The comments link either to a changeset id, or to a
pullrequest id.
We are not extracting the actual comments, but have some queries that
pull statistics about the amount of pullrequests per user (externally
accumulated per team) and amount of comments per pullrequest.

Best regards,
Thomas


More information about the kallithea-general mailing list