comparison mercurial/posix.py @ 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 d6512b3e9ac0
children 648130161e4d
comparison
equal deleted inserted replaced
10756:cb681cc59a8d 10757:ab3782458827
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from i18n import _ 8 from i18n import _
9 import osutil 9 import osutil
10 import os, sys, errno, stat, getpass, pwd, grp, fcntl 10 import os, sys, errno, stat, getpass, pwd, grp
11 11
12 posixfile = open 12 posixfile = open
13 nulldev = '/dev/null' 13 nulldev = '/dev/null'
14 normpath = os.path.normpath 14 normpath = os.path.normpath
15 samestat = os.path.samestat 15 samestat = os.path.samestat
116 st1 = os.lstat(fpath1) 116 st1 = os.lstat(fpath1)
117 st2 = os.lstat(fpath2) 117 st2 = os.lstat(fpath2)
118 return st1.st_dev == st2.st_dev 118 return st1.st_dev == st2.st_dev
119 119
120 if sys.platform == 'darwin': 120 if sys.platform == 'darwin':
121 import fcntl # only needed on darwin, missing on jython
121 def realpath(path): 122 def realpath(path):
122 ''' 123 '''
123 Returns the true, canonical file system path equivalent to the given 124 Returns the true, canonical file system path equivalent to the given
124 path. 125 path.
125 126