Project

General

Profile

Feature #605

integration with web interface

Added by Thomas Capricelli almost 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
11/05/2009
Due date:
% Done:

0%

Estimated time:

Description

would be great to have the graphics in the web interface


Related issues

Related to Mercurial activity extension - Patch submission #625: Allowing extension to work without needing displayClosed11/29/2009

Actions

History

#1

Updated by Thomas Capricelli over 10 years ago

  • Target version changed from 1.2 to 1.3
#2

Updated by Thomas Capricelli over 10 years ago

  • Target version changed from 1.3 to 1.4
#3

Updated by ton plomp over 10 years ago

I am using the following setup to integrate with the hgweb/hgwebdir interface.

Configuration
Apache running hgwebdir.cgi
hgwebdir references hgweb.config.

hgweb.config

I added the following to the hgweb.config:

[hooks]
changegroup.activity = hg activity --filename /usr/share/mercurial/templates/static/activity/${PWD##*/}.png

This means that whenever one or more changesets are pushed to my repository the activity hook is triggered.
This hook creates an activity graph at /usr/share/mercurial/templates/static/activity/{reponame}.png

Template adjusting

Inside the template/static directory I added a folder 'activity' and gave www-data read/write acces to that folder.
I choose to add the graph to the 'graph' page of my favourite hgweb style (monoblue) by adding the following lines to monoblue/graph.tmpl

<h2 class="no-link no-border">activity</h2>
<img src="{staticurl}activity/{repo}.png"/>

before the <h2 class="no-link no-border">graph</h2> line

What happens is that upon a push an activity graph is created that is displayed in the graph page of my hgweb repository.

Hope this helps someone.

Ton

#4

Updated by Thomas Capricelli over 10 years ago

Very interesting, thanks for sharing!
I might end up just providing this 'howto' on the wiki/documentation.

#5

Updated by Thomas Capricelli over 9 years ago

  • Status changed from New to Closed

added to wiki page documentation, thanks again.

Also available in: Atom PDF