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

login
register
mail settings
Submitter Pierre-Yves David
Date May 19, 2015, 4:04 a.m.
Message ID <379a269162b572fadfb2.1432008265@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9160/
State Accepted
Headers show

Comments

Pierre-Yves David - May 19, 2015, 4:04 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.
Matt Mackall - May 19, 2015, 11:54 a.m.
On Mon, 2015-05-18 at 23:04 -0500, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@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)

Queued for stable, thanks.

Patch

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