Commit Graph

82574 Commits

Author SHA1 Message Date
Muir Manders
e955a5eda2 filemerge: add start of simple merge tool DSL
Summary:
A user wants to use a different merge tool for delete+modified conflicts. The current merge tools are not flexible or composable enough to handle this. For example, even if we added a ":delete-keep-local" tool, there is no way to specify the fallback merge tool to use for other kinds of conflicts.

In this diff I introduce a simple DSL to solve the above problem. I called it "merge tool script". It only supports the "if" function, and "isabsent" to test of the "local" or "other" file context is absent/deleted.

Reviewed By: zzl0

Differential Revision: D46163270

fbshipit-source-id: 28f2579e665dc9dd66ab816b10e0b7a758e772f5
2023-06-04 22:40:24 -07:00
Muir Manders
67ef3afc23 parser: factor out string parsing
Summary: Move string parsing code from revsetlang.py into the parser so other langs can use it.

Reviewed By: zzl0

Differential Revision: D46194125

fbshipit-source-id: cb8c829ceb52a829a831a33b4265410ef704fef9
2023-06-04 22:40:24 -07:00
Muir Manders
1fd96b9a1d merge: remove v1 merge state
Summary: v1 and v2 have both been written out forever, so I think we can drop the v1 format.

Reviewed By: zzl0

Differential Revision: D46075828

fbshipit-source-id: 373dae9cf6a53534489022716986aa85b5de5552
2023-06-04 21:54:48 -07:00
Open Source Bot
759e51a9ab Updating submodules
Summary:
GitHub commits:

2c07901582
c0eedd17d8

Reviewed By: bigfootjon

fbshipit-source-id: bbb6c64596a5b9d1ca8278bd7d08ef89b5ab8b37
2023-06-04 07:10:07 -07:00
Open Source Bot
d10b449981 Updating submodules
Summary:
GitHub commits:

0938f58f0c
b00d373ac0
0c360b1bb8
1748cb7b0c

Reviewed By: bigfootjon

fbshipit-source-id: d3d4ed03ecc8d16a5b9bdbbdd2aff92d6d0e40be
2023-06-03 14:56:38 -07:00
Open Source Bot
acf1b77dd1 Updating submodules
Summary:
GitHub commits:

73b1e13cdc
5aa903f141

Reviewed By: bigfootjon

fbshipit-source-id: 691bd9521fe611621e8e6cec1dc02fc7f336c1a4
2023-06-02 19:33:47 -07:00
Shayne Fletcher
4ea1ce14a8 upgrade to parking_lot-0.12.1
Summary: upgrade parking_lot from version 0.11.2 to version 0.12.1

Reviewed By: zertosh, diliop, dtolnay

Differential Revision: D46398501

fbshipit-source-id: ffae0ea188abad5253f1524216dd18ce9a53a74c
2023-06-02 18:45:03 -07:00
Open Source Bot
dede76196d Updating submodules
Summary:
GitHub commits:

ba079adeb9
05eb09b6bf
31bbf58fd2

Reviewed By: bigfootjon

fbshipit-source-id: 1af20ab27ac94c3755deec59db572f7159344b78
2023-06-02 18:37:53 -07:00
Open Source Bot
ffd5873f34 Updating submodules
Summary:
GitHub commits:

35e93f5588
029d1bb999

Reviewed By: bigfootjon

fbshipit-source-id: a03259635b199d2bf511c58f322bbbcaf0bc630e
2023-06-02 12:38:36 -07:00
Rajiv Sharma
0443bba2cf Migrate check_git_wc command to new Mononoke App
Summary: As in title

Reviewed By: mitrandir77

Differential Revision: D46354685

fbshipit-source-id: 2a3e7e86772c71aed18cc6c83c31767c7454d65c
2023-06-02 12:00:47 -07:00
Open Source Bot
174b56b841 Updating submodules
Summary:
GitHub commits:

3021ff8d7c
abddb150e5
8ade744da6
9fcd80bb67
68903864ee
323afc52ed

Reviewed By: bigfootjon

fbshipit-source-id: 7f32aa7be14ef645c32df2de97aa14eb094fcddb
2023-06-02 10:11:27 -07:00
Andres Suarez
51fc649c56 unfork and update toml-5
Reviewed By: jsgf

Differential Revision: D46369474

fbshipit-source-id: 2905c96f24f3a6963c69ed89572ce36e564443d6
2023-06-02 08:04:49 -07:00
Rajiv Sharma
11982fe8da Log create_bookmark error in gitimport
Summary:
In D41769964, we decided not to stop `gitimport` simply because `create-bookmark` fails cause that could be due to the fact that the bookmark being created already exists. If that is indeed the case, we try to resolve the bookmark and move it to the new value. However, there could be other unrelated reasons for `create_bookmark` to fail in which case we would still try to resolve the bookmark and end up in unexpected situations (e.g. Luibov trying to import `paws` repo faced this problem). This diff does two things:
- Performs an early check to determine if the bookmark exists by resolving it. If it does exist, it executes the move bookmark branch of code
- If the bookmark doesn't exist, then it creates it.

If there are any errors during bookmark creation or movement, they get logged for the user.

Reviewed By: mitrandir77

Differential Revision: D46071703

fbshipit-source-id: 446b0bc720d13b9e9314feccdb147b2bab0b7cd9
2023-06-02 06:52:56 -07:00
Open Source Bot
72eeb1524e Updating submodules
Summary:
GitHub commits:

4a28444f0b
157d784af8

Reviewed By: bigfootjon

fbshipit-source-id: 823db0745ac1fd651aef6a7b3c47f9c6a40ba6f5
2023-06-02 04:53:12 -07:00
Jeremy Fitzhardinge
1ae4f69513 third-party/rust: update text_placeholder with https://github.com/bernardoamc/text-placeholder/pull/7
Summary: Added `fill_from_function` which makes it much more useful

Reviewed By: fanzeyi

Differential Revision: D46342378

fbshipit-source-id: 9bc8c01dcb10806a03f1eab628f9763c4e5edc81
2023-06-02 03:29:24 -07:00
Pierre Chevalier
c7c032c6fb non-oss work 67/n
Differential Revision: D46326058

fbshipit-source-id: 70db644c1badfcefddea80ce9961b9f547388192
2023-06-02 02:52:32 -07:00
Open Source Bot
491fe25394 Updating submodules
Summary:
GitHub commits:

7e057ce99b
adaf4caa53
49a43cb953
7f35d6e6dd
49820ae00e

Reviewed By: bigfootjon

fbshipit-source-id: 1541b29e8cee39f1fc5b59b949acffa9878b694a
2023-06-01 20:00:16 -07:00
Open Source Bot
b1b15c644f Updating submodules
Summary:
GitHub commits:

d639d0289b
dcfc0c5cad
9a7d6bfe81
af6a5c02fd
9f0173d375
2bf4019936

Reviewed By: bigfootjon

fbshipit-source-id: bcdd061aec66bcc120977131ba44fd94a55dfc36
2023-06-01 18:28:21 -07:00
Open Source Bot
43089d46f2 Updating submodules
Summary:
GitHub commits:

6d84367c0c

Reviewed By: bigfootjon

fbshipit-source-id: 29b8c4502d5fa197a290163ac6db6dba8d3d36c6
2023-06-01 17:37:06 -07:00
Open Source Bot
ed56d0a669 Updating submodules
Summary:
GitHub commits:

a7fa0b99f5
71ca9a1dcd
0f3ddab9d1
9c174bab9b
82d9239c9f

Reviewed By: bigfootjon

fbshipit-source-id: eac5e8e24b4dfb78efc15806f3567f42de304fc5
2023-06-01 16:43:53 -07:00
Xavier Deguillard
b26ca0d334 store: properly time ObjectStore::getBlobMetadata
Summary:
Our telemetry was showing that starting mid-April the cost of
ObjectStore::getBlobmetadata went down significantly but investigating the root
cause of the improvement didn't seem to yield any results. It turns out the
root cause was that the code no longer timed the cost of the future.

Reviewed By: kmancini

Differential Revision: D46369667

fbshipit-source-id: 0c7d997c93d94498384e27b3447a9c736dcce3b2
2023-06-01 15:51:45 -07:00
Open Source Bot
2bfe388510 Updating submodules
Summary:
GitHub commits:

4936f7dc85
b5918c9efa
5c0c8de571
c64a4e5b21
4f6024b16b

Reviewed By: bigfootjon

fbshipit-source-id: a9ecd94cd552fd00b3d04f7597ea2584671a5c36
2023-06-01 14:32:02 -07:00
Open Source Bot
db9062459e Updating submodules
Summary:
GitHub commits:

9f9c84ba6d
86b25ea834
9f7877f246
66e629c618

Reviewed By: bigfootjon

fbshipit-source-id: ea3529064d259ea25c87a8ae3d50b5ef1e212685
2023-06-01 11:52:46 -07:00
Zhaolong Zhu
ccec2d4263 copytrace: exclude files that are not in the dest manifest
Summary:
the previous change broke `test-fb-ext-copytrace.t` tests, but somehow the failure didn't show up in the CI, this is to fix the that.

The issue happened when rebasing 8f852f229 (mv a b) to 046961699 (del a), and file `a` doesn't in the dest commit. The old logic is to keep b in the final commit, and my previous abort with an error that a is not in dest. I think a better way is to report a conflict and ask users to resolve it. But for now, I will keep the old behevior.

```
  @  046961699  72 seconds ago  zhaolong
  │  del a
  │
  │ o  8f852f229  107 seconds ago  zhaolong
  ├─╯  mv a b
  │
  o  7a737d7e6  2 minutes ago  zhaolong
╭─╯  add a
```

Reviewed By: sggutier

Differential Revision: D46357844

fbshipit-source-id: f5860c0037b909e2dd1a62700775dba505b88849
2023-06-01 10:32:04 -07:00
Open Source Bot
0debcc9472 Updating submodules
Summary:
GitHub commits:

303d213180
a7ee85399b
9d947f2f2d
14e00355e3
4383d67460
72cb34b32e
7c9d41689e

Reviewed By: bigfootjon

fbshipit-source-id: 3e03ca0d912686f04edd053ac7959de26716fd08
2023-06-01 09:01:16 -07:00
Open Source Bot
7baf69fa20 Updating submodules
Summary:
GitHub commits:

44fff7c3e4
82c13cdea7
fcdc6fdf6f
48c498debf
933339454c
596a5276cb
10a58cb3c2

Reviewed By: bigfootjon

fbshipit-source-id: 498c6dbad79f0ff320d74389003fc20c9ead4c81
2023-06-01 07:55:47 -07:00
Saul Gutierrez
d430d13cb5 tests: move environment related utils to their own crate
Summary: The `lock_env` function from `scm/lib/config/loader/src/test_util.rs` was way too useful to leave in its own crate, since it could be useful for Rust unit tests that modified environment variables

Reviewed By: quark-zju

Differential Revision: D46133861

fbshipit-source-id: b32842c55bd7279490f69601fbb22201da7a0767
2023-06-01 05:52:37 -07:00
Saul Gutierrez
8de3e9d5d8 io: add an IOInput trait
Summary: Adds a trait similar to `IOOutput`, which can be used for determining whether the input object held by `IO` is in a tty

Reviewed By: zzl0

Differential Revision: D46129268

fbshipit-source-id: 2fe2b19baf85d6ba361e515cd9e017bda628cc60
2023-06-01 05:52:37 -07:00
Saul Gutierrez
50d51ee002 configfile: move steps for obtaining default user config file to its own function
Summary: This function will be used in later diffs for determining the default user config file

Reviewed By: muirdm

Differential Revision: D46005612

fbshipit-source-id: 52a0fcba6fbb3d47d24c759d3ff946301ccaa922
2023-06-01 05:52:37 -07:00
Open Source Bot
99f4f10611 Updating submodules
Summary:
GitHub commits:

81ebaf1ce9
6125e9128d

Reviewed By: bigfootjon

fbshipit-source-id: 43f10dde921fdfe6e9a23556a409722636ce5f8c
2023-06-01 03:25:42 -07:00
Zhaolong Zhu
6a94e0c7f8 copytrace: use dagcopytrace to trace renames for src missing files
Summary:
Currently, the `_forwardcopies` doesn't support git format repo, which
means copytrace can not find the renames on the source side.  So let's use
`dagcopytrace` for it as well. It also benefits hg format repos as well, since
`dagcopytrace` support content similarity based rename finder.

Reviewed By: quark-zju

Differential Revision: D46315431

fbshipit-source-id: 5f9ba4a9346f1dbd7e96731b9559dfe686ff028c
2023-05-31 21:42:03 -07:00
Zhaolong Zhu
f276a73c2e copytrace: add .t test for testing missing files in source side
Summary:
Currently, the `_forwardcopies` doesn't support git format repo, which
means copytrace can not find the renames on the source side. Add a test to
reproduce this issue.

Reviewed By: quark-zju

Differential Revision: D46315430

fbshipit-source-id: c25f8db6da121a7baa02045720b867c08845f169
2023-05-31 21:42:03 -07:00
Zhaolong Zhu
46b2feabcb copytrace: remove unnecessary pub(crate)
Summary: remove unnecessary pub(crate)

Reviewed By: quark-zju

Differential Revision: D46315432

fbshipit-source-id: 239150866b721818fa7816ac505ed3d56e4ae719
2023-05-31 21:42:03 -07:00
Xavier Deguillard
1c20e574cc telemetry: fix typo in counter name
Summary:
Both the getBlobMetadata and fetchBlobMetadata were publishing to the same counter, making them indistinguishable.

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: genevievehelsel

Differential Revision: D46343472

fbshipit-source-id: 04e09372c21dd5cb09336259ff34a5394d10d3b4
2023-05-31 20:38:26 -07:00
Open Source Bot
a42156f7dd Updating submodules
Summary:
GitHub commits:

ab6ce60dcb
b690823b79

Reviewed By: bigfootjon

fbshipit-source-id: 0400b6418cf7944bb3c8e91558a97bd0ae8b0a89
2023-05-31 19:41:39 -07:00
Open Source Bot
53576f0396 Updating submodules
Summary:
GitHub commits:

150885e9f1
3f0db77727

Reviewed By: bigfootjon

fbshipit-source-id: fd27526a8d9a118a9faa578a7e461762dcad4d03
2023-05-31 17:39:01 -07:00
Jun Wu
302c731878 vscode: bump extension version 0.1.16
Summary: Include the "Stack edit" button and bump version.

Reviewed By: evangrayk

Differential Revision: D46332150

fbshipit-source-id: fbcf5869d7b69c5ec942f42aa5445b32d04078d0
2023-05-31 16:04:46 -07:00
Jun Wu
afa3c5a587 vscode: update buildForPublish to work on Windows
Summary:
Windows does not support shell scripts.

The code translation is mostly done by ChatGPT.

Reviewed By: evangrayk

Differential Revision: D46334170

fbshipit-source-id: aeca554f364104c49d810a532a6bdf5a55def9ad
2023-05-31 16:04:46 -07:00
Open Source Bot
a3a7c92928 Updating submodules
Summary:
GitHub commits:

a9bc6f8e4e
ff8b099d7f
7296359b2d
5907a7e35a
68a9cd21f2
982b955181
222bf7c993
fd09df681a

Reviewed By: bigfootjon

fbshipit-source-id: a45edd94a4822f27533f5286c4a55f73dd7030ce
2023-05-31 15:35:40 -07:00
Liubov Dmitrieva
45565b3045 add new ods logging for bookmark fetching from phases crate
Summary:
add new ods logging for bookmark fetching from phases crate

This would help with investigation sevs like S344849, also having this info we
can setup alerts.

Reviewed By: YousefSalama

Differential Revision: D46314640

fbshipit-source-id: 66e72da19ad4eb528c78d0783c297746f57cd4f1
2023-05-31 13:57:24 -07:00
Open Source Bot
88e493047e Updating submodules
Summary:
GitHub commits:

d7c18535f4
3e204b2476
2ecb1dd6d4
d276511161
149a8a24ee

Reviewed By: bigfootjon

fbshipit-source-id: 162809f94d2afcfe59730eeb0ebc7eae45ada643
2023-05-31 13:14:08 -07:00
Jun Wu
75e38e362c tooltip: stop using <Component /> to better support closures
Summary:
I noticed that the scrollbar state or `useState` state in the <Tooltip /> dropdown
does not preserve across state changes. But they preserve fine without <Tooltip />.

I think what happens is, in this function:

  function PartialSelectionAction({file}: {file: UIChangedFile}) {
    const getPanel = () => {
      return <PartialSelectionPanel file={file} />;
    };

    return (
      <Tooltip
        component={getPanel}
        ...>
      </Tooltip>
    );
  }

The `getPanel` is a dynamically created function, and gets used by Tooltip like
`<getPanel ... />`. Then React notices that `getPanel` changes every time per
render (because `getPanel` is not a "static" function) and treat the `getPanel`
as "incompatible" component and re-render the whole thing. Note the `getPanel`
needs the `file` in the closure, so it cannot be a static function.

Fix this issue by avoiding treating `component` as a React component (so React
won't treat it as "component type changed" when re-rendering).

To avoid misuse, I updated `component` signature to no longer be compatible
with a React component. Callsites need to migrate `component={Foo}` to
`component={(dismiss) => <Foo dismiss={dismiss} />}`.

Reviewed By: evangrayk

Differential Revision: D46244645

fbshipit-source-id: 40ea4c0d6637da19ac9fe2b23d9c334e2575a148
2023-05-31 12:45:12 -07:00
Jun Wu
991c8e0664 tooltip: use ResizeObserver to handle inner children changes
Summary:
One of the children in `<Tooltip />` might change without re-rendering `<Tooltip />`.
Trigger `setDimensions` to re-position the tooltip.

Unfortunately this does not prevent rendering the old state. So the user might see
the "wrong" position for a short amount of time.

Reviewed By: evangrayk

Differential Revision: D46188944

fbshipit-source-id: effa41088190ba22929daba0f39beb87f242ef13
2023-05-31 12:45:12 -07:00
Jun Wu
fbc4d53b73 tooltip: fix useRenderedDimensions
Summary:
`useRenderedDimensions` does not recalculate `dimensions` on resize since `ref`
does not change. Fix it by making `children` a dependent.

Reviewed By: evangrayk

Differential Revision: D46188947

fbshipit-source-id: 1edfd8e7eb5515691a8d3672a3afabe004eb695c
2023-05-31 12:45:12 -07:00
Jun Wu
c92082a1df tooltip: support click-to-show-component and hover-to-show-title
Summary:
It seems tooltip is used as a Popover (trigger=click, show `component`) and a
Tooltip (trigger=hover, show `title`). I think it's also useful to work for
both - show tooltip on hover, then show popover on click. This diff implements
that.

Reviewed By: evangrayk

Differential Revision: D46188945

fbshipit-source-id: 30b7f64f5cbca7d031861cbb166dc0ba5c2b8b9c
2023-05-31 12:45:12 -07:00
Jun Wu
c6ec8f1e4c tooltip: make Component rendering lazy
Summary: Avoid rendering the tooltip content if it's not needed.

Reviewed By: evangrayk

Differential Revision: D46188948

fbshipit-source-id: 0c83b2b7e80debf0bde96c9d0dd8d14b8707100f
2023-05-31 12:45:12 -07:00
Jun Wu
d14e071ada stack: bump modified commit dates for edited commits
Summary:
We bump commit date for other operations like amend, rebase, histedit, etc.
Let's do the same for stack editing.

Reviewed By: evangrayk

Differential Revision: D46188950

fbshipit-source-id: 0e636c13f6bd07945c00f5376991e7dcc0a8793a
2023-05-31 12:45:12 -07:00
Jun Wu
3ccae421be stack: add a date option for CommitStackState.calculateImportStack
Summary: This will be used to bump date for the modified commits.

Reviewed By: evangrayk

Differential Revision: D46188949

fbshipit-source-id: 459b5cebf4929343c9442d2d48d8ddf7342a0776
2023-05-31 12:45:12 -07:00
Jun Wu
8ca23c9a63 stack: hide "Edit stack" for single commit stack
Summary:
It does not make much sense to stack edit a single-commit stack. In the future
if we have split operations then it might make sense to use it. For now let's
just hide the button for a single commit.

Reviewed By: evangrayk

Differential Revision: D46156654

fbshipit-source-id: 553daae9b420ff9bbb500843c36c31977ec04d27
2023-05-31 12:45:12 -07:00
Jun Wu
73dfba1b46 stack: add metrics
Summary:
Track stack editing sessions: duration, how many times each operation gets
used. For reordering, we also distinguish between DnD reorder and button
reorder.

Reviewed By: zzl0

Differential Revision: D46155621

fbshipit-source-id: f4bc679be2be3c5747a9a7968cac66bc76995afe
2023-05-31 12:45:12 -07:00