Mercurial 1.8.3 on Jython 2.5.2

Matt Mackall mpm at selenic.com
Wed May 11 21:05:43 UTC 2011


On Wed, 2011-05-11 at 22:56 +0200, Sébastien Deleuze wrote:
> Hi,
> 
> I try to make Mercurial 1.8.3 working, even partially, with Jython
> 2.5.2. I am working on a Java based forge. We are currently running
> native Mercurial commands and parsing the outpout, but it would be far
> better for us to embed Mercurial in Jython like we have done for
> Docutils recently.
> 
> With Jython 2.5.2, when I run "jython setup.py --pure", I get an error
> during bz2 import. Thats normal since Jython does not support bz2 yet.
> I have read on Jython bugtracker (http://bugs.jython.org/issue1445)
> that bz2 is only used for bundles and archives, 2 functionnalities we
> don't need, so I have commented bz2 check in setup.py.
> 
> Without bz2 check installation and byte compilation is fine, but I get
> the following error when running "jython hg"

...
>   File "C:\mercurial-1.8.3\mercurial\posix.py", line 10, in <module>
>     import os, sys, errno, stat, getpass, pwd, grp

If posix.py is getting imported on Windows, you've got problems.

The odds of the Java environment being sufficiently isolated from
Windows' quirks for our purposes is pretty much nil, I imagine.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list