mercurial/posix.py
changeset 10757 ab3782458827
parent 10264 d6512b3e9ac0
child 11011 648130161e4d
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