Commit Graph

33 Commits

Author SHA1 Message Date
Jun Wu
9bf6b674a6 config: use Rust graph render as default
Summary: Change the legacy Python graph render to Rust renderer.

Reviewed By: DurhamG

Differential Revision: D24317802

fbshipit-source-id: 4c3dc3a6dd02b7ebe79596a8e77f4b6b139d2e20
2020-10-19 17:07:30 -07:00
Jun Wu
88a6d88b90 tests: remove revnum from aliases
Summary: Remove revnum from `showgraph`, `tglog*` aliases.

Reviewed By: singhsrb

Differential Revision: D24191791

fbshipit-source-id: f60c00289a0c6d06101f1c8645fc9d6e0f0c941e
2020-10-08 20:31:41 -07:00
Jun Wu
026bd9f950 tests: avoid some rev numbers in revsets
Summary: Done by the fix-revnum.py script.

Reviewed By: singhsrb

Differential Revision: D24173575

fbshipit-source-id: e4cf417be759f9898adfd4102984098474ab38a2
2020-10-08 11:08:37 -07:00
Durham Goode
58667a3fe7 tests: fix test-commitcloud-sync.t and test-common-commands-fb.t
Summary:
test-commitcloud-sync.t is a new change and just needs to be made cross
platform.

I have no idea how test-common-commands-fb.t ever worked.  When HGRCPATH is set,
I expect the system hgrc to not be loaded, and therefore we can't run hg-clone.
Let's just unset it, since this is meant to test if the new Mercurial can
execute a clone. Ideally we'd redirect the system hgrc to the in-repo
staticfiles, but that's more effort.

Reviewed By: singhsrb

Differential Revision: D23869645

fbshipit-source-id: 66669d9fd9c3a23b01bc43b365723185b7b2ed33
2020-09-23 10:58:19 -07:00
Jun Wu
27f4f7e94c test-commitcloud-sync: fix test on Ubuntu
Summary:
On Ubuntu the output is a bit different:

```
   $ hg cloud sync --use-bgssh
   commitcloud: synchronizing 'server' with 'user/test/default'
-  remote: /bin/sh: trashssh: command not found
-  abort: no suitable response from remote hg!
+  remote: /bin/sh: 1: trashssh: not found
+  abort: no suitable response from remote hg: '[Errno 32] Broken pipe'!
```

Glob them out to make the test pass.

Reviewed By: DurhamG

Differential Revision: D23824735

fbshipit-source-id: 7f96149ee16daff31fd0a1c68975b5edfa27cc46
2020-09-22 15:21:56 -07:00
Liubov Dmitrieva
584de33443 fix workspace name for fbclone
Summary:
Automigration gets messed up with `hg cloud rejoin` command in fbclone code because it triggered by the pull command.

As a result fbclone ends up to join a hostname workspace instead of the default for some cases.

* make sure that the migration never runs if background commit cloud operations are disabled
* also, add skip the migration in the pull command in fbclone

Once of those would be enough to fix the issue but I prefer to make both
changes.

Reviewed By: markbt

Differential Revision: D23813184

fbshipit-source-id: 3b49a3f079e889634e3c4f98b51557ca0679090b
2020-09-21 05:09:40 -07:00
Liubov Dmitrieva
01615ae4de improve scm daemon checks and check workspace name as well
Summary:
Move bunch of code into a separate file (scm daemon related options). Move them
out of cloud sync.

Also introduce additional check that the `hg cloud sync` command scm daemon
runs is intended for the current connected workspace

In theory when we switch a subscription, the SCM daemon gets notified but races possible and it is better to have this additional check, so SCM daemon triggers cloud sync where it is supposed to.

Reviewed By: markbt

Differential Revision: D23783616

fbshipit-source-id: b91a8b79189b7810538c15f8e61080b41abde386
2020-09-18 14:01:11 -07:00
Liubov Dmitrieva
a37a294fda improve fbclone experience
Summary:
`hg cloud rejoin` is used in fbclone

By providing a bit more information about the workspaces available we can improve user
experience and try to eliminate the confusion multiple workspaces cause.

Reviewed By: mitrandir77

Differential Revision: D23623063

fbshipit-source-id: 7598c1b58597032c9cfcef0b44b0ec1b00510ffa
2020-09-11 03:45:55 -07:00
Liubov Dmitrieva
321f4dfb31 add hg cloud switch command to simplify switching between
Summary:
The command is easier to use than `hg cloud join --switch`.

Also highlight the workspace name in the output of `hg cloud status`

Reviewed By: mitrandir77

Differential Revision: D23601507

fbshipit-source-id: 74eb17c9366a9dbe96881c8e3e0705619fadb3d6
2020-09-09 14:04:57 -07:00
Liubov Dmitrieva
bd63a78f96 add more information to hg cloud leave command
Summary:
There are users who prefer run `hg cloud leave` if they notice they are
connected to commit cloud sync.

Proving more information and add a prompt might help them to change their mind.

For some users who left new fbclone will connect them back. So on next leave they can learn more information about Commit Cloud Workspaces.

Reviewed By: markbt

Differential Revision: D23346091

fbshipit-source-id: 72f170f7133cd64b772ec75ae29a85dc8809e351
2020-08-26 22:43:20 -07:00
Liubov Dmitrieva
4f233b33f4 improve workspace information in hg cloud status
Summary:
It will be clearer to provide both names because all other commands (like `cloud
sl`, `cloud join`) use short names and if you would like to use the long one you would need to provide
'--raw-workspace' option and this is an advanced option.

Reviewed By: markbt

Differential Revision: D23274288

fbshipit-source-id: d751346a2e49cab21d1054eb196f7977c72c8764
2020-08-26 02:49:02 -07:00
Liubov Dmitrieva
b7f5085832 improve ux for hg cloud status command in regards to SCM Daemon
Summary:
There are two different magic background syncing that can be enabled. The first
is triggered by commit or any other local changes. The second is triggered by
SCM Daemon by any remote change in this workspace.

I would like to explain it a bit better in `hg cloud status` command.

This will also offer some reassurance to clients.

For example, assume they run `hg cloud disable` command that should disable all background Commit Cloud traffic for some time, so then they can run `hg cloud status` and verify that neither local changes, nor remote changes trigger any commit cloud traffic on this machine.

I also provide full log path to Scm Daemon logs if it is enabled.

Reviewed By: markbt

Differential Revision: D23038954

fbshipit-source-id: c3a5b8f58df729ee3f1c7f15da44ad6e6e0b98f6
2020-08-11 04:01:43 -07:00
Liubov Dmitrieva
cc2b5c04ca imrove authentication handling
Summary:
There have been lots of issues with user experience related to authentication
and its help messages.

Just one of it:
certs are configured to be used for authentication and they are invalid but the `hg cloud auth`
command will provide help message about the certs but then ask to copy and
paste a token from the code about interactive token obtaining.

Another thing, is certs are configired to use, it was not hard to
set up a token for Scm Daemon that can be still on tokens even if cloud
sync uses certs.

Now it is possible with `hg auth -t <token>` command

Now it should be more cleaner and all the messages should be cleaner as well.

Also certs related help message has been improved.

Also all tests were cleaned up from the authentication except for the main
test. This is to simplify the tests.

Reviewed By: mitrandir77

Differential Revision: D22866731

fbshipit-source-id: 61dd4bffa6fcba39107be743fb155be0970c4266
2020-07-31 10:16:59 -07:00
Liubov Dmitrieva
d266d99edf improve hg cloud rejoin behaviour to adapt to host workspaces.
Summary:
Some users on macs and dev servers are connected to their default workspace, other
 users after D22802064 will be connected to their machine workspace. Assume a
 user decides to reclone the repo. Currently, as a result of rejoin, the second batch of the users will
 automatically see all their commits from the default workspace and will be a bit
 surprised. It makes sense to adapt rejoin logic of choosing the default
 workspace if workspace name is not given.

Reviewed By: markbt

Differential Revision: D22817941

fbshipit-source-id: 764034c9f2d774051c5523cb2db093af525f27d7
2020-07-30 04:55:09 -07:00
Jun Wu
01e3ea0f8f tests: enable narrow-heads for test-[bc]*
Summary: Most of them need extra server-side bookmarks for deciding phases.

Reviewed By: DurhamG

Differential Revision: D22117739

fbshipit-source-id: 711bf96063913fd6148125a5628f0b0f4efbf489
2020-06-29 13:53:04 -07:00
Jun Wu
6554961897 tests: replace 'phase --public' with 'debugmakepublic'
Summary: This makes narrow-heads migration smoother.

Reviewed By: ikostia

Differential Revision: D22052478

fbshipit-source-id: 83047ad6da4de2034c917bfd5be47a2f32d5cc3d
2020-06-29 11:29:04 -07:00
Mark Thomas
2eb20def5a commitcloud: require visibleheads for sync
Summary: Commit cloud sync works best when visibleheads are enabled.  Default to requiring it.

Reviewed By: quark-zju

Differential Revision: D22089414

fbshipit-source-id: b786103d5c5f65a7908eb97a973af9eca5990b22
2020-06-18 12:15:00 -07:00
Jun Wu
9cd4491c02 transaction: remove summary callback
Summary:
The summary callback is only used to display "obsoleted n changesets".
Remove it to make transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913597

fbshipit-source-id: e47fa9df0033d1302ffc8dfa3b9885eb75861f4b
2020-06-10 19:29:53 -07:00
Durham Goode
8ff3a8cbd5 py3: fix commit cloud tests
Summary: Makes all the commit cloud tests pass

Reviewed By: quark-zju

Differential Revision: D20927720

fbshipit-source-id: a863dc1b06258ac8d0ee907f51948c012a23dddc
2020-04-10 10:59:50 -07:00
Jun Wu
2aec2dbcb6 commitcloud: migrate to tech-debt-free repo.pull for pulling
Summary:
The new API does nothing that cloud sync does not want: bookmarks, obsmarkers,
prefetch, etc. Wrappers to disable features are removed.

This solves a "lagged master" issue where selectivepull adds `-B master` to
pull extra commits but cloud sync cannot hide them without narrow-heads. Now
cloud sync just does not pull the extra commits.

Reviewed By: sfilipco

Differential Revision: D20808884

fbshipit-source-id: 0e60d96f6bbb9d4ce02c04e8851fc6bda442c764
2020-04-01 19:40:57 -07:00
Jun Wu
07fc8adad9 commitcloud: sort hashes being pulled
Summary: This makes the upcoming change easier to verify.

Reviewed By: sfilipco

Differential Revision: D20808883

fbshipit-source-id: 5563601125ef5c961785f7275fd82fc3fefe53ff
2020-04-01 19:40:56 -07:00
Mark Thomas
d4cfd6f918 commitcloud: store cloud sync status in the store vfs
Summary:
Commit cloud sync works at the store granularity, so the status should be
stored in the store vfs.  Move it there.

Improve the output of `hg cloud status` by logging more information about the workspace.

Reviewed By: quark-zju

Differential Revision: D20419223

fbshipit-source-id: 4f0d6b9aab55d2bbeaf89b489606f0bc25400de5
2020-03-12 12:58:17 -07:00
Jun Wu
5d253a75df amend: remove hiddenoverride
Summary:
`hiddenoverride` is a hacky implementation that preserves part of another hacky
`inhibit` extension. With our modern setup (inhibit or narrow-heads),
`hiddenoverride` is less useful. Therefore just remove it.

Reviewed By: sfilipco

Differential Revision: D20148011

fbshipit-source-id: f4a5f05b67ae6f315e9b07d50ef03018d6d05df5
2020-02-28 17:45:26 -08:00
Jun Wu
ae8f6ff8e8 tests: opt-in DUMMYSSH_STABLE_ORDER for more tests
Summary: This should help reduce test flakiness.

Reviewed By: xavierd

Differential Revision: D19872952

fbshipit-source-id: d66f6c404534b3f47903b478e3cdfdda5ed46284
2020-02-27 17:54:08 -08:00
Liubov Dmitrieva
3163d20016 commitcloud: log errors to scuba
Summary:
This will allow us to improve our dashboards filtering out errors we are
responsible for, like missing certs on the machines.

Reviewed By: mitrandir77

Differential Revision: D19950614

fbshipit-source-id: 73503e984dfe8513a700fdcb2fc36b1618c20a4f
2020-02-18 14:28:33 -08:00
Zeyi (Rice) Fan
92f6f35e7a mark all tests requiring Python 2
Summary:
This diff marks **ALL** mercurial tests requiring Python 2 feature.

After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed.

To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example:

```
HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests
```

or

```
HGTEST_FORCE_PY2=1 python run-tests.py
```

----

Basically this diff are created with the following commands:

```
$ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py
$ sed -i '1s/^/#require py2\n/' test-*.t
$ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list)
# manually adding feature requires for these Python tests.
```

(Note: this ignores all push blocking failures!)

ignore-conflict-markers

Reviewed By: singhsrb

Differential Revision: D19655148

fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
2020-01-30 18:49:21 -08:00
Mark Thomas
b361a8d1bd tests: update tests-[a-h]*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457677

fbshipit-source-id: 9f121837dfc6bf98ff4525c6535496b292409844
2020-01-20 02:45:15 -08:00
Mark Thomas
b654a9aae5 tests: use disable treemanifest in place of setconfig
Summary: Use `disable treemanifest` in place of `setconfig extensions.treemanifest=!`

Reviewed By: quark-zju

Differential Revision: D19457678

fbshipit-source-id: 47c8b3c4f4ed5cfc97275ca67afab4a86ffe7f0d
2020-01-20 02:45:15 -08:00
Jun Wu
ba2d83b3f8 pull: remove "new changesets" message
Summary:
Reverts https://www.mercurial-scm.org/repo/hg/rev/eb586ed5d8ce.

The colon syntax (x:y) is deprecated and is unsupported by segmented changelog.

Reviewed By: DurhamG

Differential Revision: D19394101

fbshipit-source-id: 8c66756f1035ab7660180716a2afa052879f384e
2020-01-14 21:02:27 -08:00
Durham Goode
218c83d574 tags: remove tip tag
Summary:
In a future diff we'll be removing tags. The most prevalent tag is
'tip', which shows up in a ton of test output. Let's drop that tag first, so we
can safely update the tests before we drop tags entirely.

Reviewed By: xavierd

Differential Revision: D18995058

fbshipit-source-id: 8c63710cd4ed567ea24e32724b8660f9006a61f1
2019-12-20 16:14:19 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Jun Wu
4fe519d97f repo: always share bookmarks
Summary:
Right now `bookmarks` is stored at both "local" vfs and the "shared" vfs.
In an upcoming change I'd like to move bookmarks to the "metalog" to get
better transaction. Therefore make it always shared.

The shared bookmark feature is turned on by default. Assuming nobody manually
turns it off, production hosts all have shared bookmark turned on.

Reviewed By: simpkins

Differential Revision: D18524103

fbshipit-source-id: 3160146f357dd01f2d78f5d2f4a14838f8f12a94
2019-11-27 11:37:42 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00