mercurial/util.py
changeset 52644 e627cc25b6f3
parent 52643 5cc8deb96b48
child 52679 30510238284e
equal deleted inserted replaced
52643:5cc8deb96b48 52644:e627cc25b6f3
  3022     return fp
  3022     return fp
  3023 
  3023 
  3024 
  3024 
  3025 def iterlines(iterator: Iterable[bytes]) -> Iterator[bytes]:
  3025 def iterlines(iterator: Iterable[bytes]) -> Iterator[bytes]:
  3026     for chunk in iterator:
  3026     for chunk in iterator:
  3027         for line in chunk.splitlines():
  3027         yield from chunk.splitlines()
  3028             yield line
       
  3029 
  3028 
  3030 
  3029 
  3031 def expandpath(path: bytes) -> bytes:
  3030 def expandpath(path: bytes) -> bytes:
  3032     return os.path.expanduser(os.path.expandvars(path))
  3031     return os.path.expanduser(os.path.expandvars(path))
  3033 
  3032