Patchwork D7209: fsmonitor: make _hashignore compatible with Python 3

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 4:27 p.m.
Message ID <98b34909f03bc6a980cfe5891801a492@localhost.localdomain>
Download mbox | patch
Permalink /patch/42719/
State Not Applicable
Headers show

Comments

phabricator - Nov. 4, 2019, 4:27 p.m.
Closed by commit rHGbdebc7b54dca: fsmonitor: make _hashignore compatible with Python 3 (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7209?vs=17507&id=17525

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7209/new/

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -236,8 +236,8 @@ 
 
     """
     sha1 = hashlib.sha1()
-    sha1.update(repr(ignore))
-    return sha1.hexdigest()
+    sha1.update(pycompat.byterepr(ignore))
+    return pycompat.sysbytes(sha1.hexdigest())
 
 
 _watchmanencoding = pywatchman.encoding.get_local_encoding()