diff --git a/hgext/convert/cvsps.py b/hgext/convert/cvsps.py --- a/hgext/convert/cvsps.py +++ b/hgext/convert/cvsps.py @@ -138,7 +138,8 @@ # Get the real directory in the repository try: - prefix = open(os.path.join('CVS','Repository'), 'rb').read().strip() + with open(os.path.join(b'CVS', b'Repository'), 'rb') as f: + prefix = f.read().strip() directory = prefix if prefix == ".": prefix = ""