changeset 10757:ab3782458827

posix: move a global fcntl import to keep it from breaking jython Only needed on darwin, anyway.
author Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
date Tue, 23 Mar 2010 11:37:01 +0100
parents cb681cc59a8d
children 2ed667a9dfcb
files mercurial/posix.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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