# HG changeset patch # User Matt Harbison # Date 2022-04-18 18:20:58 # Node ID d35c18ceaf0af137c30fd361544321a003fee923 # Parent aa400bf6688074cebbd6adfb29268e7a49c589c4 git: un-byteify the `mode` argument for the builtin `open()` I guess this was assuming `pycompat.open` was imported, but it's not here or elsewhere in the git extension. Differential Revision: https://phab.mercurial-scm.org/D12568 diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -33,7 +33,7 @@ def readpatternfile(orig, filepath, warn return orig(filepath, warn, sourceinfo=False) result = [] warnings = [] - with open(filepath, b'rb') as fp: + with open(filepath, 'rb') as fp: for l in fp: l = l.strip() if not l or l.startswith(b'#'):