Mercurial > public > mercurial-scm > hg-stable
diff hgext/convert/cvsps.py @ 52424:4c70a70a9bcd
convert: stop using the `pycompat.open()` shim
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 05 Dec 2024 13:15:44 -0500 |
parents | f4733654f144 |
children | 0e11e532c958 |
line wrap: on
line diff
--- a/hgext/convert/cvsps.py Thu Dec 05 13:11:41 2024 -0500 +++ b/hgext/convert/cvsps.py Thu Dec 05 13:15:44 2024 -0500 @@ -13,7 +13,6 @@ import re from mercurial.i18n import _ -from mercurial.pycompat import open from mercurial import ( encoding, error, @@ -150,7 +149,7 @@ # Get the real directory in the repository try: - with open(os.path.join(b'CVS', b'Repository'), b'rb') as f: + with open(os.path.join(b'CVS', b'Repository'), 'rb') as f: prefix = f.read().strip() directory = prefix if prefix == b".": @@ -197,7 +196,7 @@ if cache == b'update': try: ui.note(_(b'reading cvs log cache %s\n') % cachefile) - with open(cachefile, b'rb') as fp: + with open(cachefile, 'rb') as fp: oldlog = pickle.load(fp) for e in oldlog: if not ( @@ -530,7 +529,7 @@ # write the new cachefile ui.note(_(b'writing cvs log cache %s\n') % cachefile) - with open(cachefile, b'wb') as fp: + with open(cachefile, 'wb') as fp: pickle.dump(log, fp) else: log = oldlog