Pymacs : A better way to implement bzr and hg support in Xtla ?

Matthieu Moy Matthieu.Moy at imag.fr
Mon Oct 3 22:44:16 BST 2005


Hi all, (Xtla, and bzr mailing list in Cc -- for those who didn't
follow, Xtla is the Emacs interface to Baz 1.x, and we started
extending it to support mercurial and bzr in a more general framework
that we currently call DVC)

I've just discovered Pymacs (thank you Lalo). It's a way to make
python and Emacs communicate together.

  http://pymacs.progiciels-bpi.ca/

This would in particular allow using bzr (and probably mercurial) as a
Python library instead of a standalone process.

This means: No need to parse the output, we can get the data-structure
directly. If something is not right in the bzr interface, we can use
lower-level functions in the API, without modifying bzr (to make M-x
baz-revisions RET efficient, I had to modify baz itself -- that's why
baz 1.5 makes Xtla faster).

That's also interesting for the bzr team, since that would provide a
use-case of bzr as a library (I suppose bzr is currently more tested
as a standalone executable than as a library).

The drawback is, it adds one dependancy to DVC: pymacs. Pymacs made of
some .el files, and needs a python interpreter (off course), but bzr
needs one anyway. This is a problem for people installing DVC
manually, and for a future integration of DVC in GNU Emacs, unless
pymacs is planned to be integrated in mainline.

Perhaps some code could be factored between mercurial and bzr support,
so we'd have:

+-------------+                      +--------+
| bzr support |                      | pymacs |
+-------------+`-,+------------+  ,-'+--------+
                  | DVC-python |-<
+-------------+,-'+------------+  `-,+----------+
| hg support  |                      | DVC core |
+-------------+                      +----------+

Lalo's advice is to use Pymacs. I think I'd also like to at least try
it. What do other people think?

-- 
Matthieu




More information about the bazaar mailing list