mercurial/util.py
changeset 51796 62806be5cbda
parent 51738 b619ba39d10a
child 51846 f5c46c3518a5
equal deleted inserted replaced
51795:1888846a1ee2 51796:62806be5cbda
  2430     It is recommended to use os.path.normpath() before using this
  2430     It is recommended to use os.path.normpath() before using this
  2431     function if need."""
  2431     function if need."""
  2432     return path.split(pycompat.ossep)
  2432     return path.split(pycompat.ossep)
  2433 
  2433 
  2434 
  2434 
  2435 def mktempcopy(name, emptyok=False, createmode=None, enforcewritable=False):
  2435 def mktempcopy(
       
  2436     name: bytes,
       
  2437     emptyok: bool = False,
       
  2438     createmode: Optional[int] = None,
       
  2439     enforcewritable: bool = False,
       
  2440 ) -> bytes:
  2436     """Create a temporary file with the same contents from name
  2441     """Create a temporary file with the same contents from name
  2437 
  2442 
  2438     The permission bits are copied from the original file.
  2443     The permission bits are copied from the original file.
  2439 
  2444 
  2440     If the temporary file is going to be truncated immediately, you
  2445     If the temporary file is going to be truncated immediately, you