git: un-byteify the `mode` argument for the builtin `open()`
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 18 Apr 2022 14:20:58 -0400
changeset 49078 020328be00cb
parent 49077 20d151e43429
child 49079 f40fb4c52594
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
hgext/git/dirstate.py
--- a/hgext/git/dirstate.py	Mon Apr 18 11:21:09 2022 -0400
+++ b/hgext/git/dirstate.py	Mon Apr 18 14:20:58 2022 -0400
@@ -33,7 +33,7 @@
         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'#'):