[RFC] Branch Viewer
Alexander Schremmer
2005a at usenet.alexanderweb.de
Thu Apr 6 22:40:12 UTC 2006
Hi,
in the last few weeks, I have tried to come up with a gitk/hgk/bzrk-like
branch viewer which can be used in an ordinary browser. I think that such a
viewer can help a lot in case of complex branch scenarios and simplify the
learning curve for new users of DVCS.
I have thought about a few implementation strategies, like providing static
images on the server-side and blitting them in JS, using PIL on the server
side or doing the rendering on the client-side using JS only.
In the end, I came up with a JS-only-solution because I didn't find a
compatible way to blit images and PIL seemed to be an unnessary server-side
dependency.
So I searched for a way to render simple line graphics in a browser in a
compatible way. I found a JS lib that does the job quite well.
So I have taken some code from bzrk, rewritten it in JavaScript and wrapped
some Mercurial-internals in order to get this stuff working.
It is running here: http://moin.pocoo.org:8000/?cmd=branchview
and can be pulled from there.
If you do not have JS currently available, you can find a screenshot here:
http://moin.pocoo.org/FrontPage?action=AttachFile&do=get&target=branchview.png
Note that I also rewrote some lines related to `hg serve` in order to make
it multi-threaded - I am too lazy to setup an CGI-HTTP-Server on that
server :-)
Kind regards,
Alexander
More information about the Mercurial
mailing list