# HG changeset patch # User Ronny Pfannschmidt # Date 2010-03-23 10:37:01 # Node ID ab3782458827c9f6ba99f32f2f07be7e0529b2b1 # Parent cb681cc59a8da282f305457db2bd474e5daf256e posix: move a global fcntl import to keep it from breaking jython Only needed 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