mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
98d9269874
Summary: Create a fork of the Mercurial code that we can use to build server rpms. The hg servers will continue to exist for a few more months while we move the darkstorm and ediscovery use cases off them. In the mean time, we want to start making breaking changes to the client, so let's create a stable copy of the hg code to produce rpms for the hg servers. The fork is based off c7770c78d, the latest hg release. This copies the files as is, then adds some minor tweaks to get it to build: - Disables some lint checks that appear to be bypassed by path - sed replace eden/scm with eden/hg-server - Removed a dependency on scm/telemetry from the edenfs-client tests since scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts with the hg-server conflict parser. allow-large-files Reviewed By: quark-zju Differential Revision: D27632557 fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
73 lines
5.3 KiB
Perl
73 lines
5.3 KiB
Perl
$ . "$TESTDIR/helpers-wireprotologging.sh"
|
|
$ disable treemanifest
|
|
$ CACHEDIR="$TESTTMP/hgcache"
|
|
|
|
$ configure dummyssh
|
|
$ enable remotefilelog
|
|
$ setconfig remotefilelog.cachepath="$CACHEDIR"
|
|
|
|
$ hg init repo
|
|
$ capturewireprotologs
|
|
$ cd repo
|
|
$ setconfig remotefilelog.server=true
|
|
$ cd ..
|
|
$ hg clone ssh://user@dummy/repo --shallow repo-clone -q
|
|
$ cd repo
|
|
$ setconfig wireproto.logrequests=batch,branchmap,getbundle,hello,listkeys,lookup,between,unbundle
|
|
$ setconfig wireproto.loggetfiles=true
|
|
$ echo a > a && hg add a && hg ci -m a
|
|
$ cd ../repo-clone
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
|
remote: wireproto_requests: (args=[], command=hello, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'], command=between, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[], command=batch, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[('bookmarks', '1'), ('bundlecaps', 'HG20,$USUAL_BUNDLE2_CAPS$%0Aremotefilelog%3DTrue,remotefilelog'), ('cg', '1'), ('common', ''), ('heads', 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b'), ('listkeys', 'bookmarks'), ('phases', '1')], command=getbundle, duration=*, reponame=unknown, responselen=*) (glob)
|
|
$ cd ../repo
|
|
$ echo b > b && hg add b && hg ci -m b
|
|
$ echo c > c && hg add c && hg ci -m c
|
|
$ cd ../repo-clone
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
|
remote: wireproto_requests: (args=[], command=hello, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'], command=between, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[], command=batch, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[('bookmarks', '1'), ('bundlecaps', 'HG20,$USUAL_BUNDLE2_CAPS$%0Aremotefilelog%3DTrue,remotefilelog'), ('cg', '1'), ('common', 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b'), ('heads', '177f92b773850b59254aa5e923436f921b55483b'), ('listkeys', 'bookmarks'), ('phases', '1')], command=getbundle, duration=*, reponame=unknown, responselen=*) (glob)
|
|
$ hg up tip -q
|
|
|
|
Looks like `ui.warn()` after getfiles might not make it's way to client hg. Let's read from file
|
|
$ grep 'getpack' $TESTTMP/loggedrequests
|
|
wireproto_requests: (args=[*], command=getpack*, duration=*, reponame=unknown, responselen=*) (glob)
|
|
$ echo cc > c && hg ci -m c
|
|
$ hg push --force 2>&1 | grep wireproto_requests
|
|
remote: wireproto_requests: (args=[], command=hello, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'], command=between, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[], command=batch, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['bookmarks'], command=listkeys, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['666f726365'], command=unbundle, duration=*, reponame=unknown, responselen=*) (glob)
|
|
$ hg pull -r ololo 2>&1 | grep wireproto_requests
|
|
remote: wireproto_requests: (args=[], command=hello, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'], command=between, duration=*, reponame=unknown, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['bookmarks'], command=listkeys, duration=*, reponame=unknown, responselen=0) (glob)
|
|
remote: wireproto_requests: (args=['ololo'], command=lookup, duration=*, reponame=unknown, responselen=*) (glob)
|
|
|
|
Enable clienttelemetry and change reponame
|
|
$ cat >> $HGRCPATH <<EOF
|
|
> [extensions]
|
|
> clienttelemetry=
|
|
> [common]
|
|
> reponame=repo
|
|
> EOF
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
|
remote: wireproto_requests: (args=[], command=hello, duration=*, reponame=repo, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=['0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'], command=between, duration=*, reponame=repo, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[], client_fullcommand=pull, client_hostname=*, command=batch, duration=*, reponame=repo, responselen=*) (glob)
|
|
remote: wireproto_requests: (args=[('bookmarks', '1'), ('bundlecaps', 'HG20,$USUAL_BUNDLE2_CAPS$%0Aremotefilelog%3DTrue,remotefilelog'), ('cg', '0'), ('common', 'cc27a19b3db0a292460298a71c413840f27f6a37'), ('heads', 'cc27a19b3db0a292460298a71c413840f27f6a37'), ('listkeys', 'bookmarks'), ('phases', '1')], client_fullcommand=pull, client_hostname=*, command=getbundle, duration=*, reponame=repo, responselen=*) (glob)
|
|
$ cd ../repo
|
|
$ echo xxx > xxx && hg add xxx && hg ci -m xxx
|
|
$ cd -
|
|
$TESTTMP/repo-clone
|
|
$ hg pull -q
|
|
$ hg up tip -q
|
|
$ grep 'getpack' $TESTTMP/loggedrequests
|
|
wireproto_requests: (args=[*], command=getpack*, duration=*, reponame=unknown, responselen=*) (glob)
|
|
wireproto_requests: (args=[*], client_fullcommand=up tip -q, client_hostname=*, command=getpack*, duration=*, reponame=repo, responselen=*) (glob)
|