[Bug 5992] New: push over ssh fails with "abort: not a Mercurial bundle" when remote hg is chg

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon Sep 24 14:23:10 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5992

            Bug ID: 5992
           Summary: push over ssh fails with "abort: not a Mercurial
                    bundle" when remote hg is chg
           Product: Mercurial
           Version: 4.7
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: chg
          Assignee: bugzilla at mercurial-scm.org
          Reporter: vgatien-baron at janestreet.com
                CC: mercurial-devel at mercurial-scm.org

Specifically, this is the behavior I see:

  $ hg init test-remote
  $ hg init test-local
  $ cd test-local
  $ touch a; hg add a; hg commit -m a
  $ hg push --debug -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
ssh://user@dummy/test-remote --remotecmd chg
  pushing to ssh://user@dummy/test-remote
  searching for changes
  abort: not a Mercurial bundle
  [255]

This used to worked until:

$ hg log -vpr .
changeset:   38408:bfe8ef6e370e
user:        Yuya Nishihara <yuya at tcha.org>
date:        Sun Mar 25 16:47:33 2018 +0900
files:       mercurial/wireprotoserver.py
description:
sshserver: redirect stdin/stdout early and use duplicated streams

This is what we achieved with hook.redirect(True) plus ui.fout = ui.ferr.

The hook.redirect() function can't be completely removed yet since hgweb
still depends on it. I'm not sure if it is necessary for WSGI servers. CGI
needs it, but does WSGI communicate over stdin/stdout channels?


All I understand so far is that the server is printing things like "adding
changesets" on on output where the client expects to see a bundle, so instead
of "HG20...", the client sees "addi...".

I didn't specifically intend to use chg in this scenario, only to always run hg
through chg, but this seems like a legitimate use (along with ssh control
master, for instance).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list