Summary:
The `memcommit` command output will be processed by the calling
process and therefore, let's just output JSON for easy consumption.
Reviewed By: quark-zju
Differential Revision: D14177417
fbshipit-source-id: 541cf73fa2bef20512164b43f1c4224415fba596
Summary:
This commit introduces the `memcommit` command to allow creation of
commits without a working copy.
Reviewed By: quark-zju
Differential Revision: D14177415
fbshipit-source-id: 518d29e2fe8fcc7e74d10ec22ebfcd22e136da06
Summary:
We will be relying on `pushrequest` to create commits to the
repository without a working copy using the `memcommit` command that will be
introduced in D14177415. Therefore, lets introduce a class method for creating
a pushrequest based on memcommit parameters.
Reviewed By: quark-zju
Differential Revision: D14177413
fbshipit-source-id: fe326e1e2908724b81a95fbf13a05163fb435ada
Summary:
Calculating the file conditions will be a common operation for any
class method which creates the pushrequest object as in D14177413. Therefore,
it makes sense to segregate this functionality.
Reviewed By: quark-zju
Differential Revision: D14177414
fbshipit-source-id: d57919098f372a9cbed13f59e3d3c4e3cc7a0b55
Summary:
This is certainly not required while creating new commits using
stackpush. Therefore, let's change the code to make this optional. See
D14177415 for an example of when specifying the date is not required.
Reviewed By: quark-zju
Differential Revision: D14177422
fbshipit-source-id: 6a8c5bcf8a01d79c46bc4fe1b4cca8ec16f7f0c2
Summary:
Change the message about limiting the number of backup heads to only print
when actually performing a backup. Previously it was printed by anything that
used the `notbackedup()` revset predicate, which could cause it to be printed
in `hg log` commands in the middle of normal log template output.
e.g.:
$ hg log -r. --graph -T'{node} {sl_backup}\n'
@ backing up only recent 50 heads
| ffc89f60162956497cd9e8e33798dd1d63ddd1da
~
This diff also changes the behavior to print the message to stderr rather than
stdout (using `ui.warn()` instead of `ui.status()`).
Reviewed By: quark-zju
Differential Revision: D14212701
fbshipit-source-id: ef3636850d8149cb0c1931b84b9a5b45e60f89c7
Summary:
This commit introduces the `memcommit` extension along with the
`debugmemcommit` command. The `debugmemcommit` serializes a commit in a format
that is consumable by the command for creating commit i.e `memcommit`
introduced in D14177415. The `debugmemcommit` is mainly for testing purposes.
Reviewed By: quark-zju
Differential Revision: D14177419
fbshipit-source-id: 3a05a210986402f661d7d08902f28fd53f4bdb2d
Summary:
`push --new-branch` is very rarely used and it does not make much sense with
checkheads removed (D14179861). Remove it everywhere.
There is still [one user](https://fburl.com/t5hmcxrp) of the
`push --new-branch` flag. Do not remove it just yet.
Reviewed By: singhsrb
Differential Revision: D14212180
fbshipit-source-id: 18f80576ab6464fc36b047a8a35b339231ee9d8e
Summary:
Previously one couldn't use `sendunbundlereplay` to replay a bundle that just
deletes a bookmark i.e. sends only pushkey part. The problem was in that
`bundleoperation.gettransaction` method wasn't called and so a few hook
arguments weren't set.
In order to fix it this diff just calls this method before calling pushkey. The
solution is not clean, but I don't see much better alternatives.
Another smaller change that this diff is doing is changing sendunbundlereplay
command to require `--deleted` flag. This is just for convenience.
Reviewed By: quark-zju
Differential Revision: D14185380
fbshipit-source-id: f511dc0b9906520b7877501b37639d89ada6fc45
Summary:
We didn't process parts like `error:abort` and so we might have easily missed
an error. This diff fixes it.
Reviewed By: quark-zju
Differential Revision: D14185378
fbshipit-source-id: e68e365fd939a4bd6a0c2835a513ebc94530aa87
Summary:
This solves an issue vipannalla saw that the heuristics logic behaves incorrectly
when running `hg up -C c4a88583; hg graft 23001ead`. The file `great_persons_on_ex_civilization-inl.h`
would be marked as "unresolved" and removed from the working copy potentially
due to other mergedriver actions, while it should be merged cleanly and do not
appear in mergestate at all.
After debugging, the file was only renamed on one side, and not changed on the
other side. In the heuristics code path, the file was reported as copied and
confused the callsite.
Reviewed By: singhsrb
Differential Revision: D14195031
fbshipit-source-id: 0602fd56b75219f851c0175debfe72c4d49d652d
Summary:
This is probably not the proper fix but we're getting rid of svn too.
Remove tests coupled with named branches. Modified some critical tests (ex.
"push") so they can still pass.
Reviewed By: DurhamG
Differential Revision: D14210968
fbshipit-source-id: 62e02179b0e4745db8f90f718613afad42d7376a
Summary:
In some cases, a user has a badly configured ssh config which leads to
unexpected errors when running hg pull. Collecting the ssh config should help
us catch what is wrong.
Reviewed By: sfilipco
Differential Revision: D14189702
fbshipit-source-id: 73fff933987bcc95f23795c5cb6beee54ae2f141
Summary:
We are working on a `memcommit` extension to provide a command for
making commits without a working copy. This is required for implementing the
ScmWrite Commit API i.e. https://fb.quip.com/u5WJAx6i59Kl. The plan is that
ScmWrite service will use this command to create the commits in the repository.
This commit just introduces the data model for the memcommit.
Reviewed By: DurhamG
Differential Revision: D14177420
fbshipit-source-id: 5c5e63bfecedd71a56d9e0b27e308e1803a4dafe
Summary:
It seems these tests were not updated while fixing the branch cache.
This commits updates the test to address the test failures.
Reviewed By: quark-zju
Differential Revision: D14208936
fbshipit-source-id: 6ec741886a2ef8da0feb294847757d3ae94b36ee
Summary: I think when we moved to process commits stack by stack we didn't change the timeout.
Differential Revision: D14188545
fbshipit-source-id: a01432e6aef29f7e603742f854c323996856fdda
Summary:
Move the strip extension to core. Rename the command to `hg debugstrip` as it
is not intended for use by users. Users should use `hg hide` instead.
Reviewed By: quark-zju
Differential Revision: D14185822
fbshipit-source-id: ef096488cb94b72a7bb79f5bf153c064e0555b34
Summary:
When receiving cloud bookmarks, if they point to a hidden/obsolete commit,
don't omit them. The bookmark will make the commit visible again.
Reviewed By: quark-zju
Differential Revision: D14183009
fbshipit-source-id: ddcb8cce6aaa1eefae93490f76c3dffeaffda21c
Summary:
`fetch` is a deprecated extension. It uses non-trivial branch-related logic.
Drop it to unblock further branch related cleanups.
Differential Revision: D14180593
fbshipit-source-id: 8288a7f0ac1ba72cf476cb78f109c71aa11c92c0
Summary:
They're no longer used. Drop them. The `branchcache` is still somehow used,
although it's basically equvilent to `{"default": heads}`.
We can probably clean it up further after detached from subversion.
Reviewed By: singhsrb
Differential Revision: D14180592
fbshipit-source-id: 45230d486f203bf3f55e89ce9eb89e6855e14e54
Summary: It's a no-op already. Drop it.
Reviewed By: singhsrb
Differential Revision: D14180595
fbshipit-source-id: 9f904b818bcf56b9d12405ca9894baa9c786801b
Summary:
All commits belong to `default` branch. Therefore `branch(x)` can be seen as
just `all()`, assuming `x` is a valid name.
This removes the only user of `repo.revbranchcache`.
In a later step, branch related features will be moved to an extension so the
code becomes separate and features are optional.
Reviewed By: sfilipco
Differential Revision: D14180594
fbshipit-source-id: 9dc52743f1b69a1838114c8c0de5fc69383dc41e
Summary:
This hardcodes several perftweaks configs that have been enabled for major FB
repos for months:
[perftweaks]
disablebranchcache = True
disablebranchcache2 = True
disableresolvingbranches = True
disableupdatebranchcacheoncommit = True
Practically, this means the branchmap is now just `{'default': heads}`. (i.e.
there are no named branches other than `default`), and branchcache is removed
(i.e. `.hg/cache` does not exist without clindex or in-repo tags).
This diff only makes easy-to-verify logic changes by assuming the configs and
removing dead code. Things can be further cleaned up. They will be done by
upcoming changes.
Most test changes are due to the fact that `.hg/cache` is no longer created.
Reviewed By: singhsrb
Differential Revision: D14179858
fbshipit-source-id: 479f7427168eb1d9614a973e273a229e50f5620a
Summary:
The tests are about HTTP bundle1 support, which is not an environment we care
about. They will break in a way that is non-trivial to fix with the upcoming
branchmap removal. There is little value keeping them. So let's just remove the
tests.
Reviewed By: sfilipco
Differential Revision: D14179859
fbshipit-source-id: 09392bb2e5c0aebc30e584ed3a6593b0b2a81089
Summary:
The WSGI parameter part gets changed with the upcoming branchmap removal.
We don't have resources to maintain WSGI for now, so let's just remove the
test.
Reviewed By: singhsrb
Differential Revision: D14179860
fbshipit-source-id: b2b82f7658a754caece220fa5f80d15514dd9260
Summary:
The CVS branch support will break with the upcoming branchcache removal.
CVS repos are rare. Let's just remove the code.
Differential Revision: D14179863
fbshipit-source-id: 890ce34958d2efe4f2ef02b1d72cf92f6269378c
Summary:
We had `ui.checkheads=false` set for a long time. Let's remove the feature
entirely and update the tests.
This is necessary before killing the branch cache, as some tests still use
different branches and there would be suddently more "heads" that cause
test issues.
Reviewed By: sfilipco
Differential Revision: D14179861
fbshipit-source-id: 0de76566799a9560b45e823cc5f49cfda9e3dd30
Summary:
The checkheads feature is being removed. See D8148016 for details.
This diff just removes tests with "checkheads" in their names.
Reviewed By: sfilipco
Differential Revision: D14179862
fbshipit-source-id: abd5bb26c0d92276273bef7ea93096ca3fde95dc
Summary: Build openssl using vcpkg. Then zip its build results.
Reviewed By: kulshrax
Differential Revision: D14197306
fbshipit-source-id: 7f019f52fb93118cb7c20c95cf41aedf3a1fbefc
Summary:
The purpose of `FileMetadata` is to be a data container. Using the
`FileMetadata` implies accessing the underlying values. That means that the
underlying values need to be `public`.
Differential Revision: D14178260
fbshipit-source-id: 8b8e5ead23d47962498f991152c2a5fd94ac3c74
Summary: These implementations are going to used in quickcheck tests.
Differential Revision: D14178259
fbshipit-source-id: 0bded67deab3422b4aad53666c14cf195ea1b0d4
Summary:
`as_bytes` is useful for interacting with code that is written in reference
to a `slice` or when attempting to serialize them. It is fine to serialize
these paths using their underlying representation because we request that they
be normalized.
Reviewed By: quark-zju
Differential Revision: D14178263
fbshipit-source-id: 36529e2ae47580ae4014ae279df98b35eac5484a
Summary:
Implementing these traits allows easy use of `RepoPath` and friends in
quickcheck tests.
It is tricky to implement `PathComponentBuf`. I believe that most strings will
end up being a valid `PathComponent` so I think that it is reasonable to loop
until a valid string is found. To note generating Arbitrary Unicode `char`s is
implemented using a loop where random bytes are validated against the `char`
constructor.
Reviewed By: quark-zju
Differential Revision: D14178262
fbshipit-source-id: 759486a2053b851f8259d7cc03eee1cd69893f9f
Summary:
These constant can be useful for parsing byte streams that we expect to contain
`Node`s. These constant should replace all potential hardcoding of values that
intend to represent the byte lengths for `Node`.
Differential Revision: D14178261
fbshipit-source-id: 34471151b5d253504e32a9e8b039608c1d4943fe
Summary: Mononoke uses the markers but we shouldn't look at them for Commit Cloud.
Differential Revision: D14188356
fbshipit-source-id: e5dee581728a9bc83d2f7a17575b3ae6b3183d39
Summary:
add this check to avoid overhead
we don't need to backup to the secondary place if it is the same as the first.
Reviewed By: singhsrb
Differential Revision: D14187754
fbshipit-source-id: 6ee59ae2f0846716ca99253958af7088d0538df9
Summary: Just renaming, and another variable as well to look similar
Reviewed By: DurhamG, quark-zju
Differential Revision: D14185033
fbshipit-source-id: e34de690274afd2f2c6e51db21c7b158f6c3452a
Summary:
Instead of using the rand crate imported into quickcheck, we can use the
rand crate directly.
Reviewed By: quark-zju
Differential Revision: D14174653
fbshipit-source-id: c848f139765b9e458d374790227399f0ad836af6
Summary:
The watchman_client crate relied on unix-only crates for both
unix_socket_transport and command_line_transport. Let's not compile
these on windows.
Reviewed By: quark-zju
Differential Revision: D14174654
fbshipit-source-id: 67d26d1799e71a1bf20af1a57a687249f5dce227
Summary: Changing the permission on the packfile failed due to the file being opened.
Reviewed By: quark-zju
Differential Revision: D14174652
fbshipit-source-id: 356ac4748fd69e660a6cb9e63367a87489755e5e
Summary:
Treemanifest uses it's own fallbackpath for reads in all cases, but
particularly in the case of remotenames it should stay on the path that is
actively being used by the push. It is possible to have remotenames which are
mirrored and selected by query strings in the repo path. In this case it is
possible that the mirror is still out of date when reading back data from our
push. Ensure that when doing a push the remote server this is considered
'sticky' so that we read back from the remote we pushed to, rather then
determening the path ourselves.
To disable, please use:
treemanifest.stickypushpath=False
Reviewed By: DurhamG, markbt, quark-zju
Differential Revision: D14165444
fbshipit-source-id: 75a53ffab895d87a4c52814f7887145c134868b5
Summary:
Context: in pushrebase replay job we run on Mononoke we also want to test our
hooks i.e. replay pushrebase requests that were denied on mercurial because of
a hook failure. The problem is that at the moment the only error message we have
is `prepushrebase.driver hook failed` (see xdb table `xdb.mononoke_production`,
query `select * from pushrebaserecording where pushrebase_errmsg like '%hook%'
limit 10;`). This error message tells us nothing, not even what hook failed.
To change it I suggest to make it possible for python hooks to raise HookAbort
and provide more information in the `hook_failure_reason` field.
Reviewed By: quark-zju
Differential Revision: D14131359
fbshipit-source-id: 69a2b51b30c78efadf3ba0d3332f46a777022568
Summary: In chef there is currently an override to 50, so if someone got more due to some reason, it is nice to add a message.
Reviewed By: quark-zju
Differential Revision: D14170749
fbshipit-source-id: 3f3c79e4e6103523c14c8d9c1600f104e3d5d3d8
Summary:
Rust tells us that Rng::choose and Rng::shuffle should be replaced by
SliceRandom::choose and SliceRandom::shuffle, so let's do it.
Reviewed By: singhsrb
Differential Revision: D14178565
fbshipit-source-id: 586eb2891f1c2cab0a3435c1b4ae8f870e7a3c25
Summary:
Tell serde to use an [untagged representation](https://serde.rs/enum-representations.html#untagged) of this enum. This means that `Parents::None` will map to a null value, `Parents::One` will map to an array representing a `Node`, and a `Parents::Two` will map to an array of 2 arrays representing `Node`.
Using CBOR serialization, this means that these variants are 1 byte, 21 bytes, and 43 bytes respectively.
Differential Revision: D14174309
fbshipit-source-id: 0217a23c4ee5409ab293525d7b6e5ae969b5504d
Summary: Add implementations for `FromIterator` and `IntoIterator` for the `Parents` type to make it more ergonomic to use.
Reviewed By: quark-zju
Differential Revision: D14172511
fbshipit-source-id: 5ba848c1dfbb8cc23ed19c9dc816616f5ed7af5f