Mercurial 1.8.3 on Jython 2.5.2
Matt Mackall
mpm at selenic.com
Wed May 11 22:11:33 UTC 2011
On Thu, 2011-05-12 at 00:00 +0200, Sébastien Deleuze wrote:
> Thanks Matt, you're right.
> The issue occur during following test in util.py:
>
> if os.name == 'nt':
> from windows import *
> else:
> from posix import *
>
> In Jython, os.name return java, so I have replaced current code by
> "from java import *" for the moment.
..and that's probably not going to work, as I tried to point out before.
You _will_ need to import a lot of the Windows-specific knowledge from
windows.py to have any hope of working. For instance, you'll need some
way of determining if an NTFS hardlink is present and that's almost
certainly not something you can do in native Java.
> It now produces a new error :
> C:\jython2.5.2\bin>jython ./hg
> Traceback (most recent call last):
> File "./hg", line 36, in <module>
> mercurial.util.set_binary(fp)
> AttributeError: 'module' object has no attribute 'set_binary'
Yep, you'll need to make sure you've defined a version of all the
OS-specific things that are in both windows.py or posix.py. The platform
file can't be empty.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list