From 625d413add72ff59bd3145a36843a6a3dc3c392e Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Thu, 5 Aug 2021 12:48:20 -0700 Subject: [PATCH] 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 --- eden/scm/tests/test-offline-commit.t | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 eden/scm/tests/test-offline-commit.t diff --git a/eden/scm/tests/test-offline-commit.t b/eden/scm/tests/test-offline-commit.t new file mode 100644 index 0000000000..365b736abd --- /dev/null +++ b/eden/scm/tests/test-offline-commit.t @@ -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)