Patchwork D10759: tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows

login
register
mail settings
Submitter phabricator
Date May 20, 2021, 7:41 p.m.
Message ID <differential-rev-PHID-DREV-s4bpt35jaznzvvlf2tz6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49079/
State Superseded
Headers show

Comments

phabricator - May 20, 2021, 7:41 p.m.
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 <https://phab.mercurial-scm.org/rHG5b3513177f2b449ff49f0879d5cf9d81e69a43a6>.

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

Patch

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/