[PATCH STABLE] ssh: capture output with bundle2 again (issue4642)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue May 19 04:04:25 UTC 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1432006527 18000
#      Mon May 18 22:35:27 2015 -0500
# Branch stable
# Node ID 379a269162b572fadfb240d3e60129bec8e9e6e7
# Parent  91c2278c68a387903c00a7170509c9dd343a7e55
ssh: capture output with bundle2 again (issue4642)

I just discovered that we are not displaying ssh server output in real time
anymore. So we can just fall back to the bundle2 output capture for now. This
fix the race condition issue we where seeing in tests. Re-instating real time
output for ssh would fix the issue too but lets get the test to pass first.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1286,11 +1286,11 @@ def unbundle(repo, cg, heads, source, ur
     wlock = lock = tr = None
     recordout = None
     # quick fix for output mismatch with bundle2 in 3.4
     captureoutput = repo.ui.configbool('experimental', 'bundle2-output-capture',
                                        False)
-    if url.startswith('remote:http:') or url.startswith('remote:https:'):
+    if url.startswith('remote:'):
         captureoutput = True
     try:
         check_heads(repo, heads, 'uploading changes')
         # push can proceed
         if util.safehasattr(cg, 'params'):
diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -692,19 +692,19 @@ Check output capture control.
   abort: pretxnchangegroup hook exited with status 1
   [255]
   $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
   pushing to ssh://user@dummy/other
   searching for changes
-  abort: pretxnchangegroup hook exited with status 1
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files
   remote: Fail early!
   remote: transaction abort!
   remote: Cleaning up the mess...
   remote: rollback completed
+  abort: pretxnchangegroup hook exited with status 1
   [255]
   $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
   pushing to http://localhost:$HGPORT2/
   searching for changes
   remote: adding changesets


More information about the Mercurial-devel mailing list