git: ensure all dirstate state values are bytes stable
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 28 Apr 2021 17:05:32 -0400
branchstable
changeset 47054 9cea55ca1175
parent 47053 4c7bc42a509e
child 47055 553451522113
git: ensure all dirstate state values are bytes I'm not sure how this particular git status occurs, but after the fallout of issue 6510 and getting into the issue 6511 state where `git status` shows the files as modified in both the "to be committed" and "not staged" lists, `hg diff` was crashing in `workingctx.__contains__()`. Differential Revision: https://phab.mercurial-scm.org/D10532
hgext/git/dirstate.py
--- a/hgext/git/dirstate.py	Wed Apr 28 10:29:45 2021 -0400
+++ b/hgext/git/dirstate.py	Wed Apr 28 17:05:32 2021 -0400
@@ -63,7 +63,7 @@
         pygit2.GIT_STATUS_WT_RENAMED: b'a',
         pygit2.GIT_STATUS_WT_TYPECHANGE: b'n',
         pygit2.GIT_STATUS_WT_UNREADABLE: b'?',
-        pygit2.GIT_STATUS_INDEX_MODIFIED | pygit2.GIT_STATUS_WT_MODIFIED: 'm',
+        pygit2.GIT_STATUS_INDEX_MODIFIED | pygit2.GIT_STATUS_WT_MODIFIED: b'm',
     }