# HG changeset patch # User Gregory Szorc # Date 1572731745 25200 # Node ID 09ab61c0ab4b7bcbece4ead40b32dcae33499964 # Parent 2b5aab5e9e36a342991ba98f94bd6820d61b561e fsmonitor: normalize clock value to bytes We normalize the value returned by watchman because we perform a number of compares with this value in code. So the easiest path forward is to normalize to bytes so we don't have to update many call sites. With this commit, the fsmonitor extension appears to be working with Python 3! Although there are still some failures in edge cases... Differential Revision: https://phab.mercurial-scm.org/D7213 diff -r 2b5aab5e9e36 -r 09ab61c0ab4b hgext/fsmonitor/__init__.py --- a/hgext/fsmonitor/__init__.py Sat Nov 02 14:27:55 2019 -0700 +++ b/hgext/fsmonitor/__init__.py Sat Nov 02 14:55:45 2019 -0700 @@ -383,7 +383,7 @@ else: # We need to propagate the last observed clock up so that we # can use it for our next query - state.setlastclock(result[b'clock']) + state.setlastclock(pycompat.sysbytes(result[b'clock'])) if result[b'is_fresh_instance']: if state.walk_on_invalidate: state.invalidate()