Commit Graph

84304 Commits

Author SHA1 Message Date
John Elliott
5664b37971 Rename ProcessName* to ProcessInfo*
Summary: In preparation for merging ProcessSimpleName and ProcessName functionality into ProcessNameCache renaming now The new cache will cache ProcessInfo object which will include both names, and the parent pid.

Reviewed By: genevievehelsel

Differential Revision: D48855222

fbshipit-source-id: 4cb10df7b6cc32efc0d655771d01d58e7ba57dd5
2023-09-06 22:12:38 -07:00
Amandeep Chhabra
38f35935f8 Back out "update platform010 & platform010-aarch64 symlinks"
Summary:
S363809
To fix prod build failure

Differential Revision: D49041975

fbshipit-source-id: fe0204b32df7118ba7c120a3b4226c2c14b59d32
2023-09-06 19:04:25 -07:00
Open Source Bot
ec97e3ae65 Updating submodules
Summary:
GitHub commits:

209d15a269
0680ba7420
ca67293528
7ef596b914
195f35c08b

Reviewed By: jurajh-fb

fbshipit-source-id: 3bafb8b96f1ce773cb7872ae66d39ff6312837b3
2023-09-06 16:43:06 -07:00
Zhaolong Zhu
d8a006c5e9 pullcreatemarkers: test if an abandoned commit is hidable
Summary:
the visibilit.remove() function only hides commits if they don't have
any visible descendents. In order to have a more accurate count, let's
check that by checking if visibility.heads() contains the commit.

Reviewed By: quark-zju

Differential Revision: D49013280

fbshipit-source-id: f517ec62354bcda797113ff8c0665f519f584c74
2023-09-06 16:34:16 -07:00
Open Source Bot
d5bd1b7b44 Updating submodules
Summary:
GitHub commits:

8dffc4ae23
2a41202db5
d0706750c3
63a0de8374
ce0cf9be5f
ce5701fcc6
a695e775a1

Reviewed By: jurajh-fb

fbshipit-source-id: c0abae728bad378561799b8e50fa6b0ccfee4016
2023-09-06 15:42:58 -07:00
Muir Manders
ec41de0858 dirstate: drop support for legacy dirstatemap
Summary: There has been an "abort if not treestate" in localrepo.dirstate() for a long time, so I think we can kill all non-treestate code paths at this point.

Reviewed By: quark-zju

Differential Revision: D48988900

fbshipit-source-id: b6df9dd3e5ef7a77671099717dd190083542084b
2023-09-06 14:29:42 -07:00
Evan Krause
03a1231e6d Add tests for shelve list
Summary: Add a set of tests for features for the shelved changes list

Reviewed By: quark-zju

Differential Revision: D49018146

fbshipit-source-id: 82ddf739d9893d0d609decce48603080c5e7c33b
2023-09-06 13:10:12 -07:00
Evan Krause
41c3dcf0d8 Add info hover for shelved changes list
Summary: Explain what shelves are. If you've never used them, you might open this dropdown out of curiousity, but find it empty. This tooltip will tell you what they are for and how to add one.

Reviewed By: quark-zju

Differential Revision: D49017220

fbshipit-source-id: e9a5cfc08a3e4412137f372177d7768fe638f6be
2023-09-06 13:10:12 -07:00
Open Source Bot
844d9cfb6a Updating submodules
Summary:
GitHub commits:

f57084b7d6
323364cb7c
6d60accf20
dcab60b4de
851266f546
2aa6b9358d

Reviewed By: jurajh-fb

fbshipit-source-id: ca1dc979d1e838278fab94c2d88f226b87bb24ea
2023-09-06 13:00:25 -07:00
Open Source Bot
6d7fa88530 Updating submodules
Summary:
GitHub commits:

97845e76c4
0d868499e6
49d9b0dc9b
f8cc094dcd
00c313c4f9
199761f061
57886c6a67
f16c3dd929
dd5b4e497e
1034ed73d2
50f831390e

Reviewed By: jurajh-fb

fbshipit-source-id: 899f87de8c0005e39c2822006e7da1a4228c1340
2023-09-06 12:12:00 -07:00
Muir Manders
b20b4a1376 help: tabulate current cache settings
Summary: Now the "cache" help topic also includes information about the current cache config.

Reviewed By: sggutier

Differential Revision: D48925373

fbshipit-source-id: e7a00ae303fa978d1955a9040b83e5c2609f7eed
2023-09-06 11:29:55 -07:00
Muir Manders
06e4546c51 help: add basic info about the cache
Summary: This has been a hot area recently due to memcache deprecation. Let's try to document how things are configured and how the cache works, briefly.

Reviewed By: sggutier

Differential Revision: D48924185

fbshipit-source-id: c3be77a5553b38c687a7ea5398296508dcdc90fb
2023-09-06 11:29:55 -07:00
Open Source Bot
7883daa136 Updating submodules
Summary:
GitHub commits:

f06abe38cf
ebe3c2ae81
b904abb693
34e775f0fa

Reviewed By: jurajh-fb

fbshipit-source-id: 5ef817e613e254e6a14d4cc35fda42ac0c338264
2023-09-06 10:48:30 -07:00
Sergey Anpilov
cedc76d502 adding deprecated_default_enum_min_i32: one-liners [2/n]
Reviewed By: zertosh

Differential Revision: D48983471

fbshipit-source-id: 11a45aa1b6e6359bc353c0b87ac4e78a3604d319
2023-09-06 10:12:37 -07:00
Evan Krause
680ea80100 use promise for fetching shelved state
Summary: Instead of using an atom to track state for shelved changes, use a promise, which we refresh each time you load the shelved changes list. This way, we fetch a new list of changes each time. It's still possible for the list of shelves to change while the dropdown is open, but I think that's not very common. Perhaps we should refetch periodically while it's open...in the future.

Reviewed By: quark-zju

Differential Revision: D48992198

fbshipit-source-id: abc6f26752948aa7aa68e3c2dade90fe7c24da61
2023-09-06 10:11:51 -07:00
Evan Krause
0ba34c69c8 sort shelved changes by date ascending
Summary: I noticed the list of shelved changes were ordered by date descending. Let's sort the other way, so if you make a new shelve, it's at the top of the list

Reviewed By: quark-zju

Differential Revision: D48983005

fbshipit-source-id: fad0a7d26b21f02cd53c24f64f8cc3be19b28d60
2023-09-06 10:11:51 -07:00
Evan Krause
8f5bde3053 Add unshelve operation
Summary:
Add operation to run unshelve. The optimistic applier needs to add the same file changes to the list of uncommitted changes, and de-dupe with existing uncommitted changes.

Sort of like uncommit, but slightly simpler because we don't have to change any commits optimistically.

Also use OperationDisabledButton to get a spinner when the operation is running.

I think there's still more work to do on the UI when running unshelve, since we should be hiding the shelve once you've unshelved it.

Reviewed By: quark-zju

Differential Revision: D48982813

fbshipit-source-id: c00646f3fb77a09afa72fca50d2b7e945f921d36
2023-09-06 10:11:51 -07:00
Evan Krause
878cbd5a5a Add files to shelved changes list
Summary:
Add more functionality to shelved changes list:
- list out changed files in each shelve
- shrink height of scrollable changed files list to just 2.5 files
- add "view changes" button to open comparison view
- add button on hover to unshelve (not implemented yet)

Reviewed By: quark-zju

Differential Revision: D48982811

fbshipit-source-id: a0e9c28dd7ea3741beb207b0f94e3a2003437912
2023-09-06 10:11:51 -07:00
Evan Krause
acf340bd69 Run shelve with --unknown to support untracked files
Summary: I noticed when trying to shelve untracked files that it didn't let me by default. We just need to pass `--unknown` to suppor this.

Reviewed By: quark-zju

Differential Revision: D48982807

fbshipit-source-id: b32d271c6b6f4ef8d102081263aac18d4b0a7591
2023-09-06 10:11:51 -07:00
Evan Krause
97902b7843 Render shelved changes list
Summary:
Send messages to fetch the shelved changes list and render it in the dropdown.

This is the most basic rendering of the shelved changes, we'll need to add buttons to apply the change and view comparison etc.

Reviewed By: quark-zju

Differential Revision: D48982810

fbshipit-source-id: e18267cb1194a9b20c9f94b4d14fbb0d18b4c0a7
2023-09-06 10:11:51 -07:00
Evan Krause
ed399f7f51 Add a way to fetch shelved changes
Summary:
Add api to fetch shelved changes, and call to `sl log` that can fetch the info for shelves. This needs to use a different template than the one we use for `CommitInfo`s. We need to fetch additional fields like `{shelvename}`, and we don't need all the fields from `CommitInfo`, like `predecessors`.

I duplicated the way we define the fields for this. There may be a way to consolidate these into a util or something so we don't need any duplication, but I'll put that off until we have yet another format of commit template we need to fetch.

The fetch works because shelves are just commits, and we can use the `shelved()` revset to find them all.

Reviewed By: quark-zju

Differential Revision: D48982809

fbshipit-source-id: 9e2e9fdf946794bace01dc7d95958032acfc37ef
2023-09-06 10:11:51 -07:00
Evan Krause
ad1babcad2 Add shelved change menu
Summary:
Add menu to top bar to show shelved changes.

Debatable whether this is worth a top bar button, since it ONLY shows shelved changes and nothing else. Perhaps in the future we could hide this if you have no shelved changes...?

We can't put it into the uncommitted changes list because you may want to unshelve when you have no changed files (hence the list of uncommitted changes + actions wouldn't appear)

Reviewed By: quark-zju

Differential Revision: D48982808

fbshipit-source-id: 2d3fbbca3f9e924acb35b04b59464300254b1835
2023-09-06 10:11:51 -07:00
Evan Krause
ad7cc4f1eb Add shelve button
Summary:
Add a button to shelve your changes. `sl shelve` removes your uncommitted changes but saves them to a temporary place that you can recover later.

We'll need to also add an unshelve button/list to match, but this diff focuses on the shelve button first. I think the unshelve button will be some top-level thing, since you may not have the uncommitted changes list visible when you'd like to unshelve.

Eventually, we should also add some keyboard shortcuts to shelve/unshelve. That would be so cool!

Several behaviors are packed in here:
- if you've written a title in the quick commit form, it'll use that as your shelved changes' name. This helps when unshelving later, if you have multiple shelved changes.
- if you have a partial selection, it should only use your selected files
- we don't support per-line selections (this would require changes to debugimportstack)
- we use optimistic state to to hide selected file changes while shelve runs
- we disable the shelve button if you don't have anything selected, or if it's a partial selection
- untracked files are shelvable (we get this for free)

Reviewed By: quark-zju

Differential Revision: D48851127

fbshipit-source-id: 7560060be8106fff7a819ae0455c6800dd8ffc66
2023-09-06 10:11:51 -07:00
Jan Mazur
34fd0f2dc7 fix clippy lints: immediate unwrap on Some type
Summary: Let's fix this

Reviewed By: YousefSalama

Differential Revision: D49014872

fbshipit-source-id: 60f51b6cefe537a367ae5dd668c314a5268bddbd
2023-09-06 09:49:11 -07:00
Jan Mazur
a6f524a06e fix clippy lints
Summary:
rust-clippy output: {P821184100}

I'm fixing unnecessary hashes around literal strings, unnecessary .into_iter and unnecessary vec!

Remaining are `immediate unwraps on Some`, `&-masking with zero`, `incorrect implementation of clone on a Copy type`, `private item shadows public glob re-export`.

`&-masking with zero` comes from third-party macro expansion, same as one `unnecessary vec!`.

Reviewed By: YousefSalama

Differential Revision: D49014408

fbshipit-source-id: 410c8b831b87eea92a15e012656ed4c1d061fb75
2023-09-06 09:49:11 -07:00
Open Source Bot
b2bd9ff221 Updating submodules
Summary:
GitHub commits:

f62dca2944
3b8a750bb8

Reviewed By: jurajh-fb

fbshipit-source-id: 848327d9719bab1975c77c3aa68f397ff9f6e039
2023-09-06 08:45:52 -07:00
Open Source Bot
c81a564919 Updating submodules
Summary:
GitHub commits:

75697c6f5a
ffa582c8d2
a67cc213d7
f0f8406902

Reviewed By: jurajh-fb

fbshipit-source-id: 9b0c0d69825c8216a420225b3c07910cee4d1167
2023-09-06 07:48:17 -07:00
Zhaolong Zhu
93fd096a43 automerge: add support to get merge info from file
Summary:
this supports to read merge related commit hashes from file, we will
use it to run benchmark on the shallow (lazy) prod repo

Reviewed By: quark-zju

Differential Revision: D48876698

fbshipit-source-id: 836064b8b80699e5d7366944fb18962771ca4fe4
2023-09-06 06:37:12 -07:00
Zhaolong Zhu
3e082d1b4b automerge: add merge_common_changes heuristic
Summary: added merge_common_changes heuristic

Reviewed By: quark-zju

Differential Revision: D48980165

fbshipit-source-id: 319d1f5e05d432924cf576020697b2b17bbd2ad6
2023-09-06 06:37:12 -07:00
Zhaolong Zhu
751b2508ee automerge: ignore whitespaces when comparing files
Summary: Let's ignore whitespaces when comparing files.

Reviewed By: quark-zju

Differential Revision: D48980166

fbshipit-source-id: 8a4d48647fbfde73bef3eef41541f0eb42beeccf
2023-09-06 06:37:12 -07:00
Shayne Fletcher
1139ef7f87 update platform010 & platform010-aarch64 symlinks
Summary: Updating from 1.71.0-beta.3 to 1.72.0

Reviewed By: zertosh, diliop

Differential Revision: D48881939

fbshipit-source-id: e6a4ba9b86357305546b4c567eddb9880bcc692a
2023-09-06 05:39:36 -07:00
Mark Juggurnauth-Thomas
2c6bc47d03 redaction: log reason and enforcement of redacted accesses
Summary: When we log a redacted access, also log what the reason was and whether or not we enforced it.  This will make it easier to check new redactions are being applied correctly.

Differential Revision: D49008130

fbshipit-source-id: 756a65b0756f48731017e7f8b64dfb487e0e2991
2023-09-06 04:38:41 -07:00
Open Source Bot
256a4b4e0d Updating submodules
Summary:
GitHub commits:

2deb904c88

Reviewed By: jurajh-fb

fbshipit-source-id: 35bf8b3dfeedf68230c496e90e769f510b3182fe
2023-09-06 03:35:20 -07:00
Open Source Bot
7b922bf498 Updating submodules
Summary:
GitHub commits:

b9ab12a991
0792326ca8
110614cf84
154c320575

Reviewed By: jurajh-fb

fbshipit-source-id: 94f028afb05b18a7018cbb1cad33d09158431656
2023-09-05 18:32:38 -07:00
Jun Wu
a70bfca3a2 UncommittedChanges: improve partial selection invalidation on file change
Summary:
Detect file status change using `status` timestamp,
and kick off a new fetch in background.

Reviewed By: evangrayk

Differential Revision: D48970663

fbshipit-source-id: 0ed994ee7e875917eaaccf43d4807ff5f25267f8
2023-09-05 18:16:59 -07:00
Jun Wu
f57d0c390f UncommittedChanges: improve partial selection invalidation on operation
Summary:
After a partial commit/amend/discard, the "partial selection" state for files
should be invalidated. Alternatively we need to reload the file contents from
disk.

For now, let's just invalidate those "partial selection" files.

Reviewed By: evangrayk

Differential Revision: D48970664

fbshipit-source-id: dbf4074ba0f8f42822247258fbb518d3b04ad006
2023-09-05 18:16:59 -07:00
Jun Wu
4058f19230 UncommittedChanges: show chunk selection inline
Summary:
The tooltip is hard to layout:
{F1083502634}

Showing the chunk selections inline so we don't
have to worry much about the height.

Right now only the unified diff view is used. There is no editing or expansion.
This UI seems straightforward to understand.

I thought about switching the tooltip to a modal before. But that is annoying,
for example, the modal has to duplicate operations like commit/amend/discard to
avoid the "double confirm" issue. There is no way to use the right panel for
structured commit message editing. By showing the chunk selector inline we avoid
button duplication and support reusing the right panel.

Reviewed By: evangrayk

Differential Revision: D48970672

fbshipit-source-id: a08b8d57077d3a5dc9c13fd409b8f3c04dcbdddb
2023-09-05 18:16:59 -07:00
Jun Wu
3b0b293281 partialSelection: track file expansion state
Summary: The next change uses this feature to "expand" and "collapse" chunk selections.

Reviewed By: evangrayk

Differential Revision: D48970661

fbshipit-source-id: a27ec31f62fe8c25afadbdc8b43681cd536983fb
2023-09-05 18:16:59 -07:00
Jun Wu
0a9c703ce2 FileStackEditPanel: ensure file stacks are built
Summary:
`FileStackEditPanel` requires the optional file stacks to be built.
While it is often built, with the upcoming split UI it might be not
(after `applySubStak`, for performance reasons). Let's build them
on demand explicitly.

Reviewed By: evangrayk

Differential Revision: D48970667

fbshipit-source-id: a67bbc736f211374b521e3d20c201edaf6f90c61
2023-09-05 18:16:59 -07:00
Jun Wu
32b094ab2c CommandHistoryAndProgress: reduce progress container z-index
Summary: A dialog should be above the progress container.

Reviewed By: evangrayk

Differential Revision: D48970665

fbshipit-source-id: a7ce8e9054cad4f7d0ca1805464291a8cbe166d9
2023-09-05 18:16:59 -07:00
Jun Wu
a174737d28 FileStackEditor: make skip and getTitle optional
Summary:
This makes it slightly easier to use. The interactive split UI does not want
the editors to render commit titles, and always wants to skip only rev 0.

Reviewed By: evangrayk

Differential Revision: D48970673

fbshipit-source-id: 8c095dde3534df38ab1ea7c55a02827bae82d0fd
2023-09-05 18:16:59 -07:00
Jun Wu
e65c980fa6 FileStackEditor: set width for the main editor content
Summary:
By defining a width, we avoid "width based on text" which is ugly when 2
editors are drawn vertically:

  |Editor 1       |
  |<---width----->|
  |               |

  |Editor 2    |
  |<---width-->|
  |            |

Now both editors will have the same width:

  |Editor 1       |
  |<---width----->|
  |               |

  |Editor 2       |
  |<---width----->|
  |               |

Reviewed By: evangrayk

Differential Revision: D48970671

fbshipit-source-id: fcd9377697703a9a5f0b88684e0aa2742dd13f1d
2023-09-05 18:16:59 -07:00
Jun Wu
cb5574c58a StackEditState: add splitRange state
Summary:
The splitRange state must be part of the main stack editing state, tracked with
history, so "undo" can work naturally in the split UI. Otherwise the split range
can be out of sync in the split UI.

Reviewed By: evangrayk

Differential Revision: D48970670

fbshipit-source-id: e68c9e83fa6fd809c33b688d3ad6180eecf888bd
2023-09-05 18:16:59 -07:00
Jun Wu
07fdac7ff4 CommitTitle: simple component for commit with tooltip
Summary:
A simple component that shows one line commit message and expands to full in
tooltip. In the future we might want to display structured commit messages
customized by the code review provider. Right now, it's just a simple
plain-text tooltip.

Reviewed By: evangrayk

Differential Revision: D48970668

fbshipit-source-id: 33b5828a8ef28bb6e90ec7c48de0b8375df6308f
2023-09-05 18:16:59 -07:00
Jun Wu
45f6f1d829 CommitStackState: add some helper APIs
Summary: Add some helper APIs to make it easier to use.

Reviewed By: evangrayk

Differential Revision: D48970662

fbshipit-source-id: ff7432e6cc080f902c8321b739c8c9eb09624d47
2023-09-05 18:16:59 -07:00
Jun Wu
82a2bab960 CommitStackState: applySubStack to replace a range of commits
Summary: This is the reverse of `denseSubStack`. It will be used by interactive split.

Reviewed By: evangrayk

Differential Revision: D48970669

fbshipit-source-id: 05ff9a78b9d9d10ae4f483393ad3a69b793b6358
2023-09-05 18:16:59 -07:00
Jun Wu
1fcc9492e4 CommitStackState: insertEmpty to insert an empty commit
Summary: This will be used by interactive split.

Reviewed By: evangrayk

Differential Revision: D48970666

fbshipit-source-id: ad147efbe147a3b295b3a2b4c5f763803dc39865
2023-09-05 18:16:59 -07:00
Jun Wu
ba2fb4c1c7 CommitStackState: add denseSubStack for interactive split use-case
Summary:
Add a way to export part of the stack to a "dense" form for interactive split
editing.

Reviewed By: evangrayk

Differential Revision: D48870581

fbshipit-source-id: f202b843ef2c6e4ca1174a88dfa4a5ce0dd11fb9
2023-09-05 18:16:59 -07:00
Jun Wu
c06009dce8 EditStackModal: adjust styles
Summary:
Disable VSCode panel's scrolling settings, since we are doing scrolling on our
own. This also allows the dropdown to be not clipped.

Enlarge the dropdown file selector width since file names can be long.

Reviewed By: evangrayk

Differential Revision: D48870582

fbshipit-source-id: 20af399634939ff0241194ccaed0a9451655d133
2023-09-05 18:16:59 -07:00
Jun Wu
0039e23a1d EditStackModal: move undo redo buttons left
Summary:
In the new modal layout the undo redo buttons should be on the left side of
"Save changes".

Reviewed By: evangrayk

Differential Revision: D48859617

fbshipit-source-id: 284220236bfa64bdfab020ef6928c0f341eeaec7
2023-09-05 18:16:59 -07:00