From patchwork Thu May 20 19:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10759: tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows From: phabricator X-Patchwork-Id: 49079 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 20 May 2021 19:41:48 +0000 mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This should have been part of 5b3513177f2b . REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D10759 AFFECTED FILES tests/test-http-bundle1.t tests/test-http.t tests/test-largefiles-wireproto.t CHANGE DETAILS To: mharbison72, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-largefiles-wireproto.t b/tests/test-largefiles-wireproto.t --- a/tests/test-largefiles-wireproto.t +++ b/tests/test-largefiles-wireproto.t @@ -425,10 +425,10 @@ > -d -p $HGPORT --pid-file hg.pid -A access.log $ cat hg.pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ > http://user@localhost:$HGPORT credentialclone diff --git a/tests/test-http.t b/tests/test-http.t --- a/tests/test-http.t +++ b/tests/test-http.t @@ -181,10 +181,10 @@ $ cat pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg id http://localhost:$HGPORT2/ diff --git a/tests/test-http-bundle1.t b/tests/test-http-bundle1.t --- a/tests/test-http-bundle1.t +++ b/tests/test-http-bundle1.t @@ -192,10 +192,10 @@ $ cat pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg id http://localhost:$HGPORT2/