Mercurial > public > mercurial-scm > hg-stable
diff tests/fsmonitor-run-tests.py @ 44729:26ce8e751503 stable 5.4rc0
merge default into stable for 5.4 release
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 16 Apr 2020 22:51:09 +0530 |
parents | 55c443fcb4fc |
children | c102b704edb5 |
line wrap: on
line diff
--- a/tests/fsmonitor-run-tests.py Mon Apr 13 16:30:13 2020 +0300 +++ b/tests/fsmonitor-run-tests.py Thu Apr 16 22:51:09 2020 +0530 @@ -30,7 +30,7 @@ PYTHON3 = True xrange = range # we use xrange in one place, and we'd rather not use range - def _bytespath(p): + def _sys2bytes(p): return p.encode('utf-8') @@ -47,7 +47,7 @@ # bytestrings by default, so we don't have to do any extra # fiddling there. We define the wrapper functions anyway just to # help keep code consistent between platforms. - def _bytespath(p): + def _sys2bytes(p): return p @@ -107,7 +107,7 @@ ] envb = osenvironb.copy() - envb[b'WATCHMAN_CONFIG_FILE'] = _bytespath(cfgfile) + envb[b'WATCHMAN_CONFIG_FILE'] = _sys2bytes(cfgfile) with open(clilogfile, 'wb') as f: proc = subprocess.Popen( argv, env=envb, stdin=None, stdout=f, stderr=f @@ -129,7 +129,7 @@ args, runtestsargv = parser.parse_known_args() with watchman(args) as sockfile: - osenvironb[b'WATCHMAN_SOCK'] = _bytespath(sockfile) + osenvironb[b'WATCHMAN_SOCK'] = _sys2bytes(sockfile) # Indicate to hghave that we're running with fsmonitor enabled. osenvironb[b'HGFSMONITOR_TESTS'] = b'1'