posix: move a global fcntl import to keep it from breaking jython
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
Tue, 23 Mar 2010 11:37:01 +0100
changeset 10757 ab3782458827
parent 10756 cb681cc59a8d
child 10758 2ed667a9dfcb
posix: move a global fcntl import to keep it from breaking jython Only needed on darwin, anyway.
mercurial/posix.py
--- a/mercurial/posix.py	Tue Mar 23 11:36:19 2010 +0100
+++ b/mercurial/posix.py	Tue Mar 23 11:37:01 2010 +0100
@@ -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 @@
     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