Mercurial > hg
changeset 50799:02eae2df911a
wrapfunction: use sysstr instead of bytes as argument in various tests
This is as valid and simpler, it will help us to eventually get ride of
`safehasattr`.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 10 Jul 2023 19:34:04 +0200 |
parents | d9e22b39041a |
children | 94506fc107b7 |
files | tests/test-bundle2-exchange.t tests/test-commandserver.t tests/test-fncache.t tests/test-hgweb.t tests/test-lfs.t tests/test-narrow-expanddirstate.t tests/test-push-race.t tests/test-ssh-bundle1.t tests/test-ssh.t tests/test-strip.t |
diffstat | 10 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bundle2-exchange.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-bundle2-exchange.t Mon Jul 10 19:34:04 2023 +0200 @@ -917,7 +917,7 @@ > raise error.Abort(b"Lock should not be taken") > return orig(repo, *args, **kwargs) > def extsetup(ui): - > extensions.wrapfunction(bundle2, b'processbundle', checklock) + > extensions.wrapfunction(bundle2, 'processbundle', checklock) > EOF $ hg init lazylock
--- a/tests/test-commandserver.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-commandserver.t Mon Jul 10 19:34:04 2023 +0200 @@ -923,7 +923,7 @@ > raise Exception('crash') > return orig(ui, repo, conn, createcmdserver, prereposetups) > def extsetup(ui): - > extensions.wrapfunction(commandserver, b'_serverequest', _serverequest) + > extensions.wrapfunction(commandserver, '_serverequest', _serverequest) > EOF $ cat <<EOF >> .hg/hgrc > [extensions]
--- a/tests/test-fncache.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-fncache.t Mon Jul 10 19:34:04 2023 +0200 @@ -275,7 +275,7 @@ > > def uisetup(ui): > extensions.wrapfunction( - > localrepo.localrepository, b'transaction', wrapper) + > localrepo.localrepository, 'transaction', wrapper) > > cmdtable = {} >
--- a/tests/test-hgweb.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-hgweb.t Mon Jul 10 19:34:04 2023 +0200 @@ -876,7 +876,7 @@ > except ValueError: > raise error.Abort(b'signal.signal() called in thread?') > def uisetup(ui): - > extensions.wrapfunction(signal, b'signal', disabledsig) + > extensions.wrapfunction(signal, 'signal', disabledsig) > EOF by default, signal interrupt should be disabled while making a lock file
--- a/tests/test-lfs.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-lfs.t Mon Jul 10 19:34:04 2023 +0200 @@ -829,7 +829,7 @@ > eh = exthelper.exthelper() > uisetup = eh.finaluisetup > - > @eh.wrapfunction(wrapper, b'filelogrenamed') + > @eh.wrapfunction(wrapper, 'filelogrenamed') > def filelogrenamed(orig, orig1, self, node): > ret = orig(orig1, self, node) > if wrapper._islfs(self._revlog, node) and ret:
--- a/tests/test-narrow-expanddirstate.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-narrow-expanddirstate.t Mon Jul 10 19:34:04 2023 +0200 @@ -99,7 +99,7 @@ > expandnarrowspec(ui, repo, encoding.environ.get(b'PATCHINCLUDES')) > return orig(ui, repo, *args, **kwargs) > - > extensions.wrapfunction(patch, b'patch', overridepatch) + > extensions.wrapfunction(patch, 'patch', overridepatch) > EOF $ cat >> ".hg/hgrc" <<EOF > [extensions]
--- a/tests/test-push-race.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-push-race.t Mon Jul 10 19:34:04 2023 +0200 @@ -76,7 +76,7 @@ > return orig(pushop) > > def uisetup(ui): - > extensions.wrapfunction(exchange, b'_pushbundle2', delaypush) + > extensions.wrapfunction(exchange, '_pushbundle2', delaypush) > EOF $ waiton () {
--- a/tests/test-ssh-bundle1.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-ssh-bundle1.t Mon Jul 10 19:34:04 2023 +0200 @@ -427,7 +427,7 @@ > return res > > def extsetup(ui): - > extensions.wrapfunction(exchange, b'push', wrappedpush) + > extensions.wrapfunction(exchange, 'push', wrappedpush) > EOF $ cat >> .hg/hgrc << EOF
--- a/tests/test-ssh.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-ssh.t Mon Jul 10 19:34:04 2023 +0200 @@ -479,7 +479,7 @@ > return res > > def extsetup(ui): - > extensions.wrapfunction(exchange, b'push', wrappedpush) + > extensions.wrapfunction(exchange, 'push', wrappedpush) > EOF $ cat >> .hg/hgrc << EOF
--- a/tests/test-strip.t Mon Jul 10 19:33:14 2023 +0200 +++ b/tests/test-strip.t Mon Jul 10 19:34:04 2023 +0200 @@ -970,7 +970,7 @@ > transaction.addpostclose(b"phase invalidation test", test) > return transaction > def extsetup(ui): - > extensions.wrapfunction(localrepo.localrepository, b"transaction", + > extensions.wrapfunction(localrepo.localrepository, "transaction", > transactioncallback) > EOF $ hg up -C 2