[PATCH 2 of 3] move a global fcntl import to keep it from breaking jython
Ronny Pfannschmidt
Ronny.Pfannschmidt at gmx.de
Tue Mar 23 05:01:44 CDT 2010
# HG changeset patch
# User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
# Date 1269338370 -3600
# Node ID 491a4de017e0a698ec33f689a1f0dd9746fe1380
# Parent a6605991f4ffe90c6ed3681f9ee5ef14539da9d4
move a global fcntl import to keep it from breaking jython
its needed only on darwin anyway
diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -7,7 +7,7 @@
from i18n import _
import osutil
-import os, sys, errno, stat, getpass, pwd, grp, fcntl
+import os, sys, errno, stat, getpass, pwd, grp
posixfile = open
nulldev = '/dev/null'
@@ -118,6 +118,7 @@ def samedevice(fpath1, fpath2):
return st1.st_dev == st2.st_dev
if sys.platform == 'darwin':
+ import fcntl # only needed on darwin, missing on jython
def realpath(path):
'''
Returns the true, canonical file system path equivalent to the given
More information about the Mercurial-devel
mailing list