2019-08-30 15:06:50 +03:00
|
|
|
$ . "$TESTDIR/helpers-wireprotologging.sh"
|
2019-05-28 13:12:27 +03:00
|
|
|
$ setconfig extensions.treemanifest=!
|
2018-10-02 15:02:05 +03:00
|
|
|
$ CACHEDIR=`pwd`/hgcache
|
2018-05-24 12:52:47 +03:00
|
|
|
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [extensions]
|
2018-10-02 15:02:05 +03:00
|
|
|
> remotefilelog=
|
2018-05-24 12:52:47 +03:00
|
|
|
> [ui]
|
|
|
|
> ssh = python "$TESTDIR/dummyssh"
|
2018-10-02 15:02:05 +03:00
|
|
|
> [remotefilelog]
|
|
|
|
> cachepath=$CACHEDIR
|
2018-05-24 12:52:47 +03:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ hg init repo
|
2019-08-30 15:06:50 +03:00
|
|
|
$ capturewireprotologs
|
2018-10-02 15:02:05 +03:00
|
|
|
$ cd repo
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [remotefilelog]
|
|
|
|
> server=True
|
|
|
|
> EOF
|
|
|
|
$ cd ..
|
|
|
|
$ hg clone ssh://user@dummy/repo --shallow repo-clone -q
|
2018-05-24 12:52:47 +03:00
|
|
|
$ cd repo
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [wireproto]
|
|
|
|
> logrequests=batch,branchmap,getbundle,hello,listkeys,lookup,between,unbundle
|
2018-10-02 15:02:05 +03:00
|
|
|
> loggetfiles=true
|
2018-05-24 12:52:47 +03:00
|
|
|
> EOF
|
|
|
|
$ echo a > a && hg add a && hg ci -m a
|
|
|
|
$ cd ../repo-clone
|
2018-06-25 18:35:39 +03:00
|
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
2018-10-02 15:02:06 +03:00
|
|
|
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', '0000000000000000000000000000000000000000'), ('heads', 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b'), ('listkeys', 'bookmarks'), ('phases', '1')], command=getbundle, duration=*, reponame=unknown, responselen=*) (glob)
|
2018-05-24 12:52:47 +03:00
|
|
|
$ cd ../repo
|
|
|
|
$ echo b > b && hg add b && hg ci -m b
|
2018-10-02 15:02:05 +03:00
|
|
|
$ echo c > c && hg add c && hg ci -m c
|
2018-05-24 12:52:47 +03:00
|
|
|
$ cd ../repo-clone
|
2018-06-25 18:35:39 +03:00
|
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
2018-10-02 15:02:06 +03:00
|
|
|
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)
|
2018-10-02 15:02:05 +03:00
|
|
|
$ 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 'getfiles' $TESTTMP/loggedrequests
|
2018-10-02 15:02:06 +03:00
|
|
|
wireproto_requests: (args=[*], command=getfiles, duration=*, reponame=unknown, responselen=*) (glob)
|
2018-10-02 15:02:05 +03:00
|
|
|
$ echo cc > c && hg ci -m c
|
2018-06-25 18:35:39 +03:00
|
|
|
$ hg push --force 2>&1 | grep wireproto_requests
|
2018-10-02 15:02:06 +03:00
|
|
|
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=['phases'], command=listkeys, 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)
|
|
|
|
remote: wireproto_requests: (args=['phases'], command=listkeys, duration=*, reponame=unknown, responselen=*) (glob)
|
2018-06-25 18:35:39 +03:00
|
|
|
$ hg pull -r ololo 2>&1 | grep wireproto_requests
|
2018-10-02 15:02:06 +03:00
|
|
|
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=['ololo'], command=lookup, duration=*, reponame=unknown, responselen=*) (glob)
|
2018-10-02 15:02:05 +03:00
|
|
|
|
2018-10-02 15:02:06 +03:00
|
|
|
Enable clienttelemetry and change reponame
|
2018-10-02 15:02:05 +03:00
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [extensions]
|
|
|
|
> clienttelemetry=
|
2018-10-02 15:02:06 +03:00
|
|
|
> [common]
|
|
|
|
> reponame=repo
|
2018-10-02 15:02:05 +03:00
|
|
|
> EOF
|
|
|
|
$ hg pull 2>&1 | grep wireproto_requests
|
2018-10-02 15:02:06 +03:00
|
|
|
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)
|
2018-10-02 15:02:05 +03:00
|
|
|
$ cd ../repo
|
|
|
|
$ echo xxx > xxx && hg add xxx && hg ci -m xxx
|
|
|
|
$ cd -
|
|
|
|
$TESTTMP/repo-clone
|
|
|
|
$ hg pull -q
|
|
|
|
$ hg up tip -q
|
|
|
|
$ grep 'getfiles' $TESTTMP/loggedrequests
|
2018-10-02 15:02:06 +03:00
|
|
|
wireproto_requests: (args=[*], command=getfiles, duration=*, reponame=unknown, responselen=*) (glob)
|
|
|
|
wireproto_requests: (args=[*], client_fullcommand=up tip -q, client_hostname=*, command=getfiles, duration=*, reponame=repo, responselen=*) (glob)
|