should pushbuffer capture server messages?

Danek Duvall danek.duvall at
Wed Aug 14 20:33:52 CDT 2013

I'm maintaining an internal mercurial extensions (cadmium, for those who
might remember it from the OpenSolaris days), which wraps
findcommonoutgoing something like this:

        ui = hg.remoteui(self.ui, {})
        pws = hg.peer(ui, {}, parent)
        return discovery.findcommonoutgoing(self.repo, pws).missing

where "parent" is a repo URI string passed in to the method, self.repo is
the local repo, and self.ui is self.repo.ui.

I'm upgrading the extension to support mercurial 2.7, and have come up with
the code above.  Previously, the peer() call was a call to
hg.repository(ui, parent), and that worked just fine.  But now, the peer()
call emits a bunch of lines that the ssh server spits out to stderr.

Everything functions just fine, but I believe that the push/popbuffer calls
were there to sop up that extraneous output, and that's no longer happening
as of changeset 5884812686f7.  (Yes, we're pretty far behind :( )  It
appears that we used to have a consistent ui object throughout, but with
the introduction of peers, that changes around, and the new ui objects
don't copy the buffer or buffering status.

I notice that "hg sum --remote" shows the same garbage, so I'm not sure
whether my expectations are off and the ssh server is being stupid and
needs to be fixed, whether there's a bug in hg (in hg.remoteui()?) or
whether my code is just not doing the right thing here.

Oh, and I realize I probably don't need that first call to remoteui(), but
removing it doesn't help.


More information about the Mercurial-devel mailing list