Summary:
The `_makelogrevset` feels cryptic, partially because its use of `opt2revset`
and related logic for adhoc revset expression calculation.
This diff removes `opt2revset` and related logic, so:
- `opts` is no longer both input and output. It's only input. The output is a
different variable.
- Use `revsetlang` APIs to format revset strings directly, without going
through an indirection via `opts`. Avoid `repr` or `a % b` formatting.
Note: `%d` is formatted as `_intlist(v)` instead of `rev(v)`.
The new code generates slightly simpler revset expressions with less `()`s
(or "group" in revsetlang AST).
Reviewed By: zzl0
Differential Revision: D45936983
fbshipit-source-id: 3155016a85fa9ea61f9334a2d1fc82eac5450fec
Summary:
It's already the same as `descendants` in our current implementation.
It's non-trivial to implement efficiently and is rarely used. So let's just
remove it for now.
Note the order of children of a commit is undefined, unlike parents. If we want
to provide a "meaningful" order and implement this in the future we might want
to use commit date etc to sort children.
Reviewed By: zzl0
Differential Revision: D45936979
fbshipit-source-id: bff72a130a5ffb7c573f06374da8f9c02791049f
Summary: Useful to chain a list of revset together.
Reviewed By: zzl0
Differential Revision: D45936980
fbshipit-source-id: 1775cd472e239f56971d0b441aae3e416852ea3f
Summary: Named branches are removed in our implementation. Clean them up in the log command.
Reviewed By: zzl0
Differential Revision: D45936987
fbshipit-source-id: 98d3df01b1f3db53861f886289cb720dccf0535a
Summary: It's not used anywhere. This removes a dependency on the legacy filelog.
Reviewed By: zzl0
Differential Revision: D45936981
fbshipit-source-id: 1c3af8dc792454d1bf893e922c1c37c80fa0a79b
Summary: This can simplify logic that checks a bunch of repo requirements.
Reviewed By: zzl0
Differential Revision: D45936978
fbshipit-source-id: eec8ca0035642bf2324782b7fb7e97cb740cc02d
Summary: We need that for optimizing our storage.
Reviewed By: RajivTS
Differential Revision: D46362446
fbshipit-source-id: d81973cd05cffdc78ad84da867fa4791efea877c
Summary: As in title. Once `BlobRepo` has been removed from this tool, I will also migrate it to the new `Mononoke Admin`
Reviewed By: mitrandir77
Differential Revision: D46444744
fbshipit-source-id: 059623d32d608f852254f16f811bcaf4e6bf3b4a
Summary: This includes PR 7 so drops the patch.
Reviewed By: zertosh
Differential Revision: D46451758
fbshipit-source-id: 5df8ccbfa610eab470744e28b5bffe411a983996
Summary: Removing the previous default ctor to ensure that we always compute and pass blake3.
Reviewed By: chadaustin
Differential Revision: D46268716
fbshipit-source-id: d9bfbc7bfd07b61dbb2e915c3fe72d7526d919e1
Summary: Adding a method to retrieve blake3 hash for a list of files.
Reviewed By: chadaustin
Differential Revision: D46268718
fbshipit-source-id: 59cb3d25a1d059a7e9b6a4da784a820945ffbd32
Summary: Expose blake3 via file attributes and changing some integration tests accordingly. Added blake3_sum so that it could be used to verify blake3 hashes and updated the tests to work with blake3.
Reviewed By: chadaustin
Differential Revision: D46307686
fbshipit-source-id: 6f2a4e8e25757862ef17d56f92b90a95c7f5a474
Summary: This utility binary could be used from the integration tests to compute blake3 hashes as it is easier to have it than adding the python pypi package with native dependencies.
Reviewed By: chadaustin
Differential Revision: D46307685
fbshipit-source-id: 1c48c689312cd9a04a19a62ad02ae3e9185041e5
Summary: If backing store doesn't provide a blake3 hash then we should be able to compute and cache it on demand.
Reviewed By: chadaustin
Differential Revision: D46316187
fbshipit-source-id: 9b77368ac5bb351d0edd80274b280692f8e1f774
Summary: Adding some util functions to ThriftUtil to support blake3
Reviewed By: chadaustin
Differential Revision: D46268709
fbshipit-source-id: 1bc7b7b02ecb121e10e4b15036aa645466e7f762
Summary:
Adding blake3 support into TreeEntry and backing stores.
Note: Http and RE CAS stores don't provide blake3 hash so far. While it would be pretty easy to add support for RE, not sure how hard it would be for the http store.
Reviewed By: chadaustin
Differential Revision: D46268715
fbshipit-source-id: db66e63fe0348eb582a8050f22cdc0ff720ccf85
Summary: Exposing blake3 from hg to eden
Reviewed By: chadaustin
Differential Revision: D46268710
fbshipit-source-id: 5f34b5f9586cc8c9507cc987378dc172959b4079
Summary:
Adding blake3 into the `Entry` and `Info` objects to make it possible to retrieve blake3 hashes.
The FileNode part will be integrated in the next diff
Reviewed By: chadaustin
Differential Revision: D46268719
fbshipit-source-id: b787b583e5abb3ed306fd1870f96bbdbc9fc0711
Summary: Adding blake3 support to the FileHash util that is used to compute hashes on Windows.
Reviewed By: chadaustin
Differential Revision: D46268714
fbshipit-source-id: cdca3dced494b1f37841121df09351acfdd6c745
Summary: Frequently we will be operating with the blake3 key that is represented as `std::optional` so making it is easier to initialize blake3 appropriately.
Reviewed By: chadaustin
Differential Revision: D46268711
fbshipit-source-id: 2b9882683e79de2325d23353a4ca7260f3853f47
Summary:
Adding blake3 support to SerializedBlobMetadata.
* The serialized data is stored as:
* - version (1 byte, big endian)
* - blob_size (up to 10 bytes, big endian)
* - used_hashes (1 byte, big-endian)
* - hashes stored in order of their type values e.g. from less significant
to more significant
* - hash (N bytes)
...
* - hash (M bytes)
Reviewed By: chadaustin
Differential Revision: D44500908
fbshipit-source-id: d64081db8591f85be5cdf3fd98ff9839c028d5fb
Summary: Use `-` for old working copy parent, so we can easily go back to the previous working copy parent with `hg go -`. This is similar to `cd -` to go back to the previous folder.
Reviewed By: quark-zju
Differential Revision: D46368217
fbshipit-source-id: ab51992f8dde66a7535ba673892bbb6c0f01ecec
Summary:
first in a set of diffs with the intent of removing `lazy_static!` from fbcode.
this diff changes `std::sync::Mutex` and `parking_lot::Mutex` to plain `static` initializations where possible.
Reviewed By: zertosh
Differential Revision: D46335784
fbshipit-source-id: 105848f38dcb8083be77a4ad4db267058081fe53
Summary: Show 9 characters for autocompleted revs, to match rev numbers shown in e.g. `hg sl`. This makes it a little easier to verify the rev that was autocompleted for you matches the one you were looking at in the smart log (i.e. if you're looking at the end of the rev rather than the beginning).
Reviewed By: zzl0
Differential Revision: D46398818
fbshipit-source-id: 70f19d60df7aa85371e1c1838b362b621da5b493
Summary: This library doesn't seem to be used anymore in that file, so seems to be safe to delete it
Reviewed By: zzl0
Differential Revision: D46433066
fbshipit-source-id: 7c522b99048130f2ecd996e6ba901b5e5cccad2b
Summary:
saintelmosfire
Will only land this after D45356044 is landed and tested.
Differential Revision: D45356043
fbshipit-source-id: 068aa45e1edd954b8ba5dc3355f9392ab06419b5
Summary:
Now we interpret merge tool specifications as "merge tool scripts" and evaluate them in the context of each conflicting file. This allows the merge tool script to use a different underlying tool depending on the type of conflict. For now, the only test the script can do is whether the file was deleted on one side.
In particular, we evaluate merge tools specified via "--tool", "HGMERGE", "ui:merge" config, and "merge-patterns" config.
Note that some existing valid inputs are invalid merge tool script (e.g. "--tool '/bin/sh do_something'"). It's invalid because of the space, among other potential reasons. I don't think this is common, but to work around it we let the input through un-intrepreted if it doesn't contain "if(" (i.e. doesn't look like a merge tool script that needs evaluating).
Reviewed By: quark-zju
Differential Revision: D46163268
fbshipit-source-id: 8a3d4b799e7f8d1d36bcc21035d7310de3d30ddb
Summary:
Add a wrapper that contains the three file contexts. This will be used in next commit to simplify integration of "merge tool script" tool selection.
I tweaked the debugpickmergetool to allow specifying whether the local or other fctx is absent rather than the less specific "changedelete".
Reviewed By: quark-zju
Differential Revision: D46163269
fbshipit-source-id: 184ca01ca9dc3bdf80d2ec23f2e0a3f1d745f581
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
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
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
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
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
Summary: Added `fill_from_function` which makes it much more useful
Reviewed By: fanzeyi
Differential Revision: D46342378
fbshipit-source-id: 9bc8c01dcb10806a03f1eab628f9763c4e5edc81
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
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
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