Patch for preliminary Mercurial integration in kdevplatform
Andreas Pakulat
apaku at gmx.de
Sat Mar 14 23:50:30 UTC 2009
On 14.03.09 10:43:25, Fabian Wiesel wrote:
> On Wed, 11 Mar 2009 15:13:47 +0300
> > If you want to rewrite Hg plugin I would suggest to implement it in
> > python calling Hg functions, but not exec- like calls to binaries.
>
> Well, I was planning on trying that, but since there was already a
> git-plugin and mercurial and git are quite similar, it was faster way
> to get some results. Especially since I then have to have a look at
> how to interface to python from C++.
Thats actually already solved. We do have Kross support in KDevelop and
there's even a example plugin for bazaar as it seems. The setup of the
python code will change in the next few days as I'm reworking the kross
support to be integrated into shell (the C++ side of things). The idea is
that you'd be implementing the IVC* interfaces in a python script.
> The second, more critical part is that you probably cannot simply call
> the python functions from a mercurial instance, as it is not
> thread-safe. It will likely require some work on the side of the
> hg-plugin to get it threadsafe.
Well, don't you have that problem right now too? i.e. what happens if two
of the hg-processes run at the same time on the same repository doing
different things? I don't know the python API (or even used mercurial at
all), but python itself can be made "single-threaded" by locking the GIL so
thats not necessarily an issue unless multiple python interpreters are
used.
Andreas
--
Your business will go through a period of considerable expansion.
More information about the KDevelop-devel
mailing list