"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mercurial/windows.py" between
mercurial-5.8.tar.gz and mercurial-5.8.1.tar.gz

About: Mercurial is a Source (Version) Control Management system designed for efficient handling of very large distributed projects.

windows.py  (mercurial-5.8):windows.py  (mercurial-5.8.1)
skipping to change at line 191 skipping to change at line 191
# may be wrapped by win32mbcs extension # may be wrapped by win32mbcs extension
listdir = osutil.listdir listdir = osutil.listdir
# copied from .utils.procutil, remove after Python 2 support was dropped # copied from .utils.procutil, remove after Python 2 support was dropped
def _isatty(fp): def _isatty(fp):
try: try:
return fp.isatty() return fp.isatty()
except AttributeError: except AttributeError:
return False return False
def get_password():
"""Prompt for password with echo off, using Windows getch().
This shouldn't be called directly- use ``ui.getpass()`` instead, which
checks if the session is interactive first.
"""
pw = ""
while True:
c = msvcrt.getwch()
if c == '\r' or c == '\n':
break
if c == '\003':
raise KeyboardInterrupt
if c == '\b':
pw = pw[:-1]
else:
pw = pw + c
msvcrt.putwch('\r')
msvcrt.putwch('\n')
return encoding.strtolocal(pw)
class winstdout(object): class winstdout(object):
"""Some files on Windows misbehave. """Some files on Windows misbehave.
When writing to a broken pipe, EINVAL instead of EPIPE may be raised. When writing to a broken pipe, EINVAL instead of EPIPE may be raised.
When writing too many bytes to a console at the same, a "Not enough space" When writing too many bytes to a console at the same, a "Not enough space"
error may happen. Python 3 already works around that. error may happen. Python 3 already works around that.
""" """
def __init__(self, fp): def __init__(self, fp):
 End of changes. 1 change blocks. 
0 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)