An example of a visual diff program for Mercurial
Benoit Boissinot
bboissin at gmail.com
Sat Nov 4 19:50:20 UTC 2006
switching to mercurial-devel
On 11/4/06, Talin <talin at acm.org> wrote:
>
> The problem is that the way that I am calling the Mercurial functions
> now is a complete hack, arrived at mainly by guesswork -- I'm not
> calling the top-level classes, because I don't know how to make them do
> what I want - instead, I'm calling low-level subroutines directly. I'm
> bypassing a whole lot of Mercurial setup code, for example, because I
> have no idea how to make it work. I wasn't able to find any
> documentation for calling Mercurial functions, other than the source
> code comments.
>
Ok, i think the way to go for you is to build your app as a hg plugin
(like 'hg view' or extdiff). That way all the setup will be
automatically done for you.
You really should look at hgext/extdiff.py and if you feel there is a
lot of duplication we should add some helpers in mercurial/patch.py
Basically you almost only need to use the functions from patch.py
>
> It really "feels" to me like the code that I've written to talk to hg is
> completely wrong, and I have no idea how to make it right.
>
The part I looked at was ok for me.
regards,
Benoit
More information about the Mercurial-devel
mailing list