changeset 47054:9cea55ca1175 stable

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
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 28 Apr 2021 17:05:32 -0400
parents 4c7bc42a509e
children 553451522113
files hgext/git/dirstate.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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',
     }