##// END OF EJS Templates
sshpeer: initial definition and implementation of new SSH protocol...
sshpeer: initial definition and implementation of new SSH protocol The existing SSH protocol has several design flaws. Future commits will elaborate on these flaws as new features are introduced to combat these flaws. For now, hopefully you can take me for my word that a ground up rewrite of the SSH protocol is needed. This commit lays the foundation for a new SSH protocol by defining a mechanism to upgrade the SSH transport channel away from the default (version 1) protocol to something modern (which we'll call "version 2" for now). This upgrade process is detailed in the internals documentation for the wire protocol. The gist of it is the client sends a request line preceding the "hello" command/line which basically says "I'm requesting an upgrade: here's what I support." If the server recognizes that line, it processes the upgrade request and the transport channel is switched to use the new version of the protocol. If not, it sends an empty response, which is how all Mercurial SSH servers from the beginning of time reacted to unknown commands. The upgrade request is effectively ignored and the client continues to use the existing version of the protocol as if nothing happened. The new version of the SSH protocol is completely identical to version 1 aside from the upgrade dance and the bytes that follow. The immediate bytes that follow the protocol switch are defined to be a length framed "capabilities: " line containing the remote's advertised capabilities. In reality, this looks very similar to what the "hello" response would look like. But it will evolve quickly. The methodology by which the protocol will evolve is important. I'm not going to introduce the new protocol all at once. That would likely lead to endless bike shedding and forward progress would stall. Instead, I intend to tricle out new features and diversions from the existing protocol in small, incremental changes. To support the gradual evolution of the protocol, the on-the-wire advertised protocol name contains an "exp" to denote "experimental" and a 4 digit field to capture the sub-version of the protocol. Whenever we make a BC change to the wire protocol, we can increment this version and lock out all older clients because it will appear as a completely different protocol version. This means we can incur as many breaking changes as we want. We don't have to commit to supporting any one feature or idea for a long period of time. We can even evolve the handshake mechanism, because that is defined as being an implementation detail of the negotiated protocol version! Hopefully this lowers the barrier to accepting changes to the protocol and for experimenting with "radical" ideas during its development. In core, sshpeer received most of the attention. We haven't even implemented the server bits for the new protocol in core yet. Instead, we add very primitive support to our test server, mainly just to exercise the added code paths in sshpeer. Differential Revision: https://phab.mercurial-scm.org/D2061 # no-check-commit because of required foo_bar naming

File last commit:

r35677:821d8a5a default
r35994:48a3a928 default
Show More
test-locate.t
168 lines | 1.9 KiB | text/troff | Tads3Lexer
Mads Kiilerich
tests: cleanup of tests that got lost in their own nested directories...
r16912 $ hg init repo
$ cd repo
Adrian Buehlmann
tests: unify test-locate
r12206 $ echo 0 > a
$ echo 0 > b
$ echo 0 > t.h
$ mkdir t
$ echo 0 > t/x
$ echo 0 > t/b
$ echo 0 > t/e.h
$ mkdir dir.h
$ echo 0 > dir.h/foo
$ hg ci -A -m m
adding a
adding b
adding dir.h/foo
adding t.h
adding t/b
adding t/e.h
adding t/x
$ touch nottracked
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg locate a
Adrian Buehlmann
tests: unify test-locate
r12206 a
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg locate NONEXISTENT
[1]
Adrian Buehlmann
tests: unify test-locate
r12206
$ hg locate
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg rm a
$ hg ci -m m
$ hg locate a
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate relpath:NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg locate -r 0 a
a
$ hg locate -r 0 NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 relpath:NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
-I/-X with relative path should work:
$ cd t
$ hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg locate -I ../t
t/b
t/e.h
t/x
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue294: hg remove --after dir fails when dir.* also exists
Adrian Buehlmann
tests: unify test-locate
r12206
$ cd ..
$ rm -r t
Siddharth Agarwal
files: actually filter out removed files...
r22591 $ hg rm t/b
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate 't/**'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 t/b
t/e.h
t/x
Adrian Buehlmann
tests: unify test-locate
r12206
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 $ hg files
b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 dir.h/foo
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 t.h
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 t/e.h
t/x
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 $ hg files b
b
Yuya Nishihara
match: do not weirdly include explicit files excluded by -X option...
r35677 -X with explicit path:
$ hg files b -X b
[1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ mkdir otherdir
$ cd otherdir
Matt Harbison
match: let 'path:.' and 'path:' match everything (issue4687)...
r25636 $ hg files path:
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../b
../dir.h/foo
../t.h
../t/e.h
../t/x
Matt Harbison
match: let 'path:.' and 'path:' match everything (issue4687)...
r25636 $ hg files path:.
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../b
../dir.h/foo
../t.h
../t/e.h
../t/x
Matt Harbison
match: let 'path:.' and 'path:' match everything (issue4687)...
r25636
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../b
../t/b
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate '*.h'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t.h
../t/e.h
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate path:t/x
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t/x
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate 're:.*\.h$'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t.h
../t/e.h
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 b
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../b
../t/b
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 '*.h'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t.h
../t/e.h
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 path:t/x
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t/x
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 're:.*\.h$'
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../t.h
../t/e.h
Adrian Buehlmann
tests: unify test-locate
r12206
Matt Mackall
formatter: add pickle format...
r22430 $ hg files
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 ../b
../dir.h/foo
../t.h
../t/e.h
../t/x
Matt Mackall
formatter: add pickle format...
r22430 $ hg files .
[1]
Yuya Nishihara
templatefilters: add slashpath() to convert path separator to slash...
r35460 Convert native path separator to slash (issue5572)
$ hg files -T '{path|slashpath}\n'
../b
../dir.h/foo
../t.h
../t/e.h
../t/x
Mads Kiilerich
tests: cleanup of tests that got lost in their own nested directories...
r16912 $ cd ../..