[Request] [+ ] D10532: git: ensure all dirstate state values are bytes

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Thu Apr 29 00:24:47 UTC 2021


mharbison72 created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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__()`.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D10532

AFFECTED FILES
  hgext/git/dirstate.py

CHANGE DETAILS

diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py
--- a/hgext/git/dirstate.py
+++ b/hgext/git/dirstate.py
@@ -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',
     }
 
 



To: mharbison72, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210429/7270b6ce/attachment-0001.html>


More information about the Mercurial-patches mailing list