tests: add a test showing suboptimal offline commit UX

Summary:
The test shows the offline commit problem that will be addressed by upcoming
changes.

Reviewed By: andll

Differential Revision: D30094154

fbshipit-source-id: c5f38ff6f0d33d241501050a1f6257633b90b31e
This commit is contained in:
Jun Wu 2021-08-05 12:48:20 -07:00 committed by Facebook GitHub Bot
parent 76ffe430e0
commit 625d413add

View File

@ -0,0 +1,43 @@
#chg-compatible
$ configure modern
$ setconfig paths.default=test:e1 ui.ssh=false
Prepare Repo:
$ newremoterepo
$ setconfig paths.default=test:e1
$ drawdag << 'EOS'
> E
> |
> D
> |
> C
> |
> B
> |
> A
> EOS
$ hg push -r $E --to master --create -q
Clone the lazy repo:
$ hg clone -U --shallow test:e1 --config remotefilelog.reponame=x --config clone.force-edenapi-clonedata=1 cloned1 -q
$ cd cloned1
Commit and edit on top of B:
$ LOG=dag::protocol=debug hg up $B -q
DEBUG dag::protocol: resolve names [112478962961147124edd43549aedd1a335e44bf] remotely
DEBUG dag::protocol: resolve ids [0] remotely
DEBUG dag::protocol: resolve names [112478962961147124edd43549aedd1a335e44bf] remotely
$ touch B1
$ LOG=dag::protocol=debug hg commit -Am B1 B1
DEBUG dag::protocol: resolve names [6450b32886cbb2753b70e8ee3ccc82db22a0aa84] remotely
$ LOG=dag::protocol=debug hg metaedit -m B11
DEBUG dag::protocol: resolve names [9eea6a043f2ec4b2de206be3b46bba3a2bb1c37b] remotely
(suboptimal: extra network fetches needed for checkout)
(suboptimal: extra network fetches needed for commit and amend)