[PATCH 1 of 1] sshserver: add varargs capability

Sune Foldager cryo at cyanite.org
Thu Feb 11 02:34:40 CST 2010


On 11-02-2010 08:49, Dirkjan Ochtman wrote:
> I think it'd be useful to distinguish between commands with binary
> payloads (that is, bundles) and the other commands (discovery). In
> particular, I think we probably don't want to do chunked transfer for
> the latter, because it isn't worth the complexity and it doesn't
> particularly help (you have all the information before you start
> sending the response).

Yes, we'll only "packetize" the bundles, and leave the rest alone.

> Where does this fit in with our capabilities structure? We generally
> want to do semantic versioning, not just wholesale revisions. Even if
> it doesn't work that way here, we should detail in a spec (something
> like your email) why that might be.

Well, we need _some_ capability to support these new formats, and
instead of calling it wire-ng we may as well say protocol=2 so we don't
need to invent a new name the next time we need to make tweaks at the
protocol level. I'm not sure what semantic versioning would mean in this
context... I mean, the total changes _are_ quite small.

The current HTTP protocol response (application/mercurial-0.1) is rather
useless, though, since it arrives too late and can't be negotiated etc.
Besides, there is nothing similar for ssh.

> Request, response, or both? What will do for the first request? We
> have opposing goals here: on the one hand, we want to minimize round
> trips for HTTP, on the other hand we'd like to find out server caps
> before we start exchanging data.

Yes... we do need capabilities as the first command to do this, or at
least to send off a capabilities command before bundle data transfer. In
my patch so far I just always send it at the start, right after the
dummy between-command (what do we need that for anyway?)

> This approach sounds good, though I don't think we should complicate
> the non-bundle commands this way.

Agreed :-)

> Are you trying to put this in 1.5?

Well, the ssh parts are primarily meant to support upcoming features
like light-weight copy which won't, I think, make it into 1.5; but the
http error stream could be useful. I think it may be too rushed, but
we'll see.

:) Sune


More information about the Mercurial-devel mailing list