##// END OF EJS Templates
py3: these two casefolding tests pass for me on my Mac...
py3: these two casefolding tests pass for me on my Mac I assume the buildbot didn't catch them because it's on a case-sensitive filesystem. Differential Revision: https://phab.mercurial-scm.org/D5681

File last commit:

r40955:a0886a4d default
r41380:6dadf3f4 default
Show More
test-wireproto-command-capabilities.t
750 lines | 28.8 KiB | text/troff | Tads3Lexer
/ tests / test-wireproto-command-capabilities.t
Kyle Lippincott
tests: mark tests that fail when using chg as #require no-chg...
r38041 #require no-chg
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 $ . $TESTDIR/wireprotohelpers.sh
$ hg init server
Gregory Szorc
tests: explicitly define compression engines for tests...
r37840
zstd isn't present in plain builds. Make tests easier by removing
zstd from the equation.
$ cat >> server/.hg/hgrc << EOF
> [server]
> compressionengines = zlib
> EOF
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
$ cat hg.pid > $DAEMON_PIDS
A normal capabilities request is serviced for version 1
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 Script output follows\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-0.1\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
A proper request without the API server enabled returns the legacy response
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> x-hgupgrade-1: foo
> x-hgproto-1: cbor
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgproto-1: cbor\r\n
s> x-hgupgrade-1: foo\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 Script output follows\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-0.1\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
Restart with just API server enabled. This enables serving the new format.
$ killdaemons.py
$ cat error.log
$ cat >> server/.hg/hgrc << EOF
> [experimental]
> web.apiserver = true
> EOF
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
$ cat hg.pid > $DAEMON_PIDS
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 X-HgUpgrade-<N> without CBOR advertisement uses legacy response
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> x-hgupgrade-1: foo bar
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgupgrade-1: foo bar\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 Script output follows\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-0.1\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> x-hgupgrade-1: foo bar
> x-hgproto-1: some value
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgproto-1: some value\r\n
s> x-hgupgrade-1: foo bar\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 Script output follows\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-0.1\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> x-hgupgrade-1: foo bar
> x-hgproto-1: cbor
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgproto-1: cbor\r\n
s> x-hgupgrade-1: foo bar\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 OK\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-cbor\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 cbor> [
{
b'apibase': b'api/',
b'apis': {},
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 }
]
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
Restart server to enable HTTPv2
$ killdaemons.py
$ enablehttpv2 server
$ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
Matt Harbison
tests: arrange for a server in wireproto-command-capabilities.t to be killed...
r37779 $ cat hg.pid > $DAEMON_PIDS
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
Only requested API services are returned
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
> x-hgupgrade-1: foo bar
> x-hgproto-1: cbor
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgproto-1: cbor\r\n
s> x-hgupgrade-1: foo bar\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 OK\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-cbor\r\n
Augie Fackler
tests: glob away content-length changes relating to missing zstd bindings...
r37838 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 cbor> [
{
b'apibase': b'api/',
b'apis': {},
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 }
]
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
Request for HTTPv2 service returns information about it
$ sendhttpraw << EOF
> httprequest GET ?cmd=capabilities
> user-agent: test
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 > x-hgupgrade-1: exp-http-v2-0003 foo bar
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 > x-hgproto-1: cbor
> EOF
using raw connection to peer
s> GET /?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> x-hgproto-1: cbor\r\n
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 s> x-hgupgrade-1: exp-http-v2-0003 foo bar\r\n
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 OK\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-cbor\r\n
Gregory Szorc
debugcommands: perform handshake when obtaining httpv2 peer...
r37663 s> Content-Length: *\r\n (glob)
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 cbor> [
{
b'apibase': b'api/',
b'apis': {
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 b'exp-http-v2-0003': {
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'commands': {
b'branchmap': {
b'args': {},
b'permissions': [
b'pull'
]
},
b'capabilities': {
b'args': {},
b'permissions': [
b'pull'
]
Gregory Szorc
wireprotov2: define and implement "changesetdata" command...
r39666 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'changesetdata': {
b'args': {
b'fields': {
b'default': set([]),
b'required': False,
b'type': b'set',
b'validvalues': set([
b'bookmarks',
b'parents',
b'phase',
b'revision'
])
},
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 b'revisions': {
b'required': True,
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'type': b'list'
}
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'permissions': [
b'pull'
]
Gregory Szorc
wireprotov2: define and implement "filedata" command...
r39675 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'filedata': {
b'args': {
b'fields': {
b'default': set([]),
b'required': False,
b'type': b'set',
b'validvalues': set([
Gregory Szorc
wireprotov2: support exposing linknode of file revisions...
r40427 b'linknode',
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'parents',
b'revision'
])
},
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'nodes': {
b'required': True,
b'type': b'list'
},
b'path': {
b'required': True,
b'type': b'bytes'
}
},
b'permissions': [
b'pull'
]
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
Gregory Szorc
wireprotov2: define and implement "filesdata" command...
r40214 b'filesdata': {
b'args': {
b'fields': {
b'default': set([]),
b'required': False,
b'type': b'set',
b'validvalues': set([
b'firstchangeset',
Gregory Szorc
wireprotov2: support exposing linknode of file revisions...
r40427 b'linknode',
Gregory Szorc
wireprotov2: define and implement "filesdata" command...
r40214 b'parents',
b'revision'
])
},
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'pathfilter': {
b'default': None,
b'required': False,
b'type': b'dict'
},
b'revisions': {
b'required': True,
b'type': b'list'
}
},
b'permissions': [
b'pull'
],
b'recommendedbatchsize': 50000
},
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'heads': {
b'args': {
b'publiconly': {
b'default': False,
b'required': False,
b'type': b'bool'
}
},
b'permissions': [
b'pull'
]
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'known': {
b'args': {
b'nodes': {
b'default': [],
b'required': False,
b'type': b'list'
}
},
b'permissions': [
b'pull'
]
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'listkeys': {
b'args': {
b'namespace': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'permissions': [
b'pull'
]
},
b'lookup': {
b'args': {
b'key': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'permissions': [
b'pull'
]
Gregory Szorc
wireprotov2: define and implement "manifestdata" command...
r39673 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'manifestdata': {
b'args': {
b'fields': {
b'default': set([]),
b'required': False,
b'type': b'set',
b'validvalues': set([
b'parents',
b'revision'
])
},
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'nodes': {
b'required': True,
b'type': b'list'
},
b'tree': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'permissions': [
b'pull'
Gregory Szorc
wireprotov2: advertise recommended batch size for requests...
r40208 ],
b'recommendedbatchsize': 100000
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 b'pushkey': {
b'args': {
b'key': {
b'required': True,
b'type': b'bytes'
},
b'namespace': {
b'required': True,
b'type': b'bytes'
},
b'new': {
b'required': True,
b'type': b'bytes'
},
b'old': {
b'required': True,
b'type': b'bytes'
}
},
b'permissions': [
b'push'
]
Gregory Szorc
wireprotov2: implement command for retrieving raw store files...
r40365 },
b'rawstorefiledata': {
b'args': {
b'files': {
b'required': True,
b'type': b'list'
},
b'pathfilter': {
b'default': None,
b'required': False,
b'type': b'list'
}
},
b'permissions': [
b'pull'
]
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 }
},
b'framingmediatypes': [
Gregory Szorc
wireprotov2: send protocol settings frame from client...
r40168 b'application/mercurial-exp-framing-0006'
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 ],
b'pathfilterprefixes': set([
b'path:',
b'rootfilesin:'
]),
b'rawrepoformats': [
b'generaldelta',
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 b'revlogv1',
b'sparserevlog'
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 ]
}
},
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'
Gregory Szorc
debugcommands: print all CBOR objects...
r40053 }
]
Gregory Szorc
wireproto: define and implement HTTP handshake to upgrade protocol...
r37575
capabilities command returns expected info
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551
Gregory Szorc
debugcommands: ability to suppress logging of handshake...
r37736 $ sendhttpv2peerhandshake << EOF
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 > command capabilities
> EOF
creating http peer for wire protocol version 2
Gregory Szorc
debugcommands: ability to suppress logging of handshake...
r37736 s> GET /?cmd=capabilities HTTP/1.1\r\n
Gregory Szorc
debugcommands: perform handshake when obtaining httpv2 peer...
r37663 s> Accept-Encoding: identity\r\n
s> vary: X-HgProto-1,X-HgUpgrade-1\r\n
s> x-hgproto-1: cbor\r\n
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 s> x-hgupgrade-1: exp-http-v2-0003\r\n
Gregory Szorc
debugcommands: perform handshake when obtaining httpv2 peer...
r37663 s> accept: application/mercurial-0.1\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> user-agent: Mercurial debugwireproto\r\n
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 200 OK\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Content-Type: application/mercurial-cbor\r\n
s> Content-Length: *\r\n (glob)
s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 sending capabilities command
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> Accept-Encoding: identity\r\n
Gregory Szorc
wireprotov2: send protocol settings frame from client...
r40168 s> accept: application/mercurial-exp-framing-0006\r\n
s> content-type: application/mercurial-exp-framing-0006\r\n
s> content-length: 63\r\n
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> host: $LOCALIP:$HGPORT\r\n (glob)
s> user-agent: Mercurial debugwireproto\r\n
s> \r\n
Gregory Szorc
wireprotov2: send protocol settings frame from client...
r40168 s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x13\x00\x00\x01\x00\x01\x00\x11\xa1DnameLcapabilities
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> makefile('rb', None)
s> HTTP/1.1 200 OK\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
Gregory Szorc
wireprotov2: send protocol settings frame from client...
r40168 s> Content-Type: application/mercurial-exp-framing-0006\r\n
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> Transfer-Encoding: chunked\r\n
s> \r\n
Gregory Szorc
wireprotov2: send content encoded frames from server...
r40173 s> 11\r\n
s> \t\x00\x00\x01\x00\x02\x01\x92
s> Hidentity
s> \r\n
received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos)
Gregory Szorc
wireprotov2: implement commands as a generator of objects...
r39595 s> 13\r\n
Gregory Szorc
wireprotov2: send content encoded frames from server...
r40173 s> \x0b\x00\x00\x01\x00\x02\x041
Gregory Szorc
wireprotov2: implement commands as a generator of objects...
r39595 s> \xa1FstatusBok
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> \r\n
Gregory Szorc
wireprotov2: send content encoded frames from server...
r40173 received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation)
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 s> 65e\r\n
s> V\x06\x00\x01\x00\x02\x041
s> \xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1Lsparserevlog
Gregory Szorc
wireprotov2: implement commands as a generator of objects...
r39595 s> \r\n
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 received frame(size=1622; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation)
Gregory Szorc
wireprotov2: implement commands as a generator of objects...
r39595 s> 8\r\n
s> \x00\x00\x00\x01\x00\x02\x002
s> \r\n
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551 s> 0\r\n
s> \r\n
Gregory Szorc
wireprotov2: implement commands as a generator of objects...
r39595 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
Gregory Szorc
wireprotov2peer: stream decoded responses...
r39597 response: gen[
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 {
b'commands': {
b'branchmap': {
b'args': {},
b'permissions': [
b'pull'
]
},
b'capabilities': {
b'args': {},
b'permissions': [
b'pull'
]
},
Gregory Szorc
wireprotov2: define and implement "changesetdata" command...
r39666 b'changesetdata': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'fields': {
b'default': set([]),
b'required': False,
Gregory Szorc
wireprotov2: advertise set of valid values for requestable fields...
r39838 b'type': b'set',
b'validvalues': set([
b'bookmarks',
b'parents',
b'phase',
b'revision'
])
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
Gregory Szorc
wireprotov2: change how revisions are specified to changesetdata...
r40212 b'revisions': {
b'required': True,
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'type': b'list'
}
Gregory Szorc
wireprotov2: define and implement "changesetdata" command...
r39666 },
b'permissions': [
b'pull'
]
},
Gregory Szorc
wireprotov2: define and implement "filedata" command...
r39675 b'filedata': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'fields': {
b'default': set([]),
b'required': False,
Gregory Szorc
wireprotov2: advertise set of valid values for requestable fields...
r39838 b'type': b'set',
b'validvalues': set([
Gregory Szorc
wireprotov2: support exposing linknode of file revisions...
r40427 b'linknode',
Gregory Szorc
wireprotov2: advertise set of valid values for requestable fields...
r39838 b'parents',
b'revision'
])
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'nodes': {
b'required': True,
b'type': b'list'
},
b'path': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
wireprotov2: define and implement "filedata" command...
r39675 },
b'permissions': [
b'pull'
]
},
Gregory Szorc
wireprotov2: define and implement "filesdata" command...
r40214 b'filesdata': {
b'args': {
b'fields': {
b'default': set([]),
b'required': False,
b'type': b'set',
b'validvalues': set([
b'firstchangeset',
Gregory Szorc
wireprotov2: support exposing linknode of file revisions...
r40427 b'linknode',
Gregory Szorc
wireprotov2: define and implement "filesdata" command...
r40214 b'parents',
b'revision'
])
},
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'pathfilter': {
b'default': None,
b'required': False,
b'type': b'dict'
},
b'revisions': {
b'required': True,
b'type': b'list'
}
},
b'permissions': [
b'pull'
],
b'recommendedbatchsize': 50000
},
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 b'heads': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'publiconly': {
b'default': False,
b'required': False,
b'type': b'bool'
}
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
b'permissions': [
b'pull'
]
},
b'known': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'nodes': {
b'default': [],
b'required': False,
b'type': b'list'
}
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
b'permissions': [
b'pull'
]
},
b'listkeys': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'namespace': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
b'permissions': [
b'pull'
]
},
b'lookup': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'key': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
b'permissions': [
b'pull'
]
},
Gregory Szorc
wireprotov2: define and implement "manifestdata" command...
r39673 b'manifestdata': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'fields': {
b'default': set([]),
b'required': False,
Gregory Szorc
wireprotov2: advertise set of valid values for requestable fields...
r39838 b'type': b'set',
b'validvalues': set([
b'parents',
b'revision'
])
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 },
b'haveparents': {
b'default': False,
b'required': False,
b'type': b'bool'
},
b'nodes': {
b'required': True,
b'type': b'list'
},
b'tree': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
wireprotov2: define and implement "manifestdata" command...
r39673 },
b'permissions': [
b'pull'
Gregory Szorc
wireprotov2: advertise recommended batch size for requests...
r40208 ],
b'recommendedbatchsize': 100000
Gregory Szorc
wireprotov2: define and implement "manifestdata" command...
r39673 },
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 b'pushkey': {
b'args': {
Gregory Szorc
wireprotov2: expose rich arguments metadata...
r39837 b'key': {
b'required': True,
b'type': b'bytes'
},
b'namespace': {
b'required': True,
b'type': b'bytes'
},
b'new': {
b'required': True,
b'type': b'bytes'
},
b'old': {
b'required': True,
b'type': b'bytes'
}
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 },
b'permissions': [
b'push'
]
Gregory Szorc
wireprotov2: implement command for retrieving raw store files...
r40365 },
b'rawstorefiledata': {
b'args': {
b'files': {
b'required': True,
b'type': b'list'
},
b'pathfilter': {
b'default': None,
b'required': False,
b'type': b'list'
}
},
b'permissions': [
b'pull'
]
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 }
},
b'framingmediatypes': [
Gregory Szorc
wireprotov2: send protocol settings frame from client...
r40168 b'application/mercurial-exp-framing-0006'
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 ],
Gregory Szorc
wireprotov2: advertise recognized path filter prefixes...
r39836 b'pathfilterprefixes': set([
b'path:',
b'rootfilesin:'
]),
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 b'rawrepoformats': [
b'generaldelta',
Boris Feld
test: enable sparse-revlog for test-wireproto-command-capabilities.t...
r40951 b'revlogv1',
b'sparserevlog'
Gregory Szorc
stringutil: teach pprint() to indent...
r39414 ]
}
]
Gregory Szorc
httppeer: report http statistics...
r40070 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
Gregory Szorc
wireproto: implement capabilities for wire protocol v2...
r37551
$ cat error.log