mercurial/windows.py
changeset 30615 bb77654dc7ae
parent 30612 d623cc6b3742
child 30636 f1c9fafcbf46
equal deleted inserted replaced
30614:cfe66dcf45c0 30615:bb77654dc7ae
   213     fno = getattr(fd, 'fileno', None)
   213     fno = getattr(fd, 'fileno', None)
   214     if fno is not None and fno() >= 0:
   214     if fno is not None and fno() >= 0:
   215         msvcrt.setmode(fno(), os.O_BINARY)
   215         msvcrt.setmode(fno(), os.O_BINARY)
   216 
   216 
   217 def pconvert(path):
   217 def pconvert(path):
   218     return path.replace(os.sep, '/')
   218     return path.replace(pycompat.ossep, '/')
   219 
   219 
   220 def localpath(path):
   220 def localpath(path):
   221     return path.replace('/', '\\')
   221     return path.replace('/', '\\')
   222 
   222 
   223 def normpath(path):
   223 def normpath(path):
   314             executable = pathcommand + ext
   314             executable = pathcommand + ext
   315             if os.path.exists(executable):
   315             if os.path.exists(executable):
   316                 return executable
   316                 return executable
   317         return None
   317         return None
   318 
   318 
   319     if os.sep in command:
   319     if pycompat.ossep in command:
   320         return findexisting(command)
   320         return findexisting(command)
   321 
   321 
   322     for path in os.environ.get('PATH', '').split(pycompat.ospathsep):
   322     for path in os.environ.get('PATH', '').split(pycompat.ospathsep):
   323         executable = findexisting(os.path.join(path, command))
   323         executable = findexisting(os.path.join(path, command))
   324         if executable is not None:
   324         if executable is not None: