Commit Graph

8071 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
4909562fe9 derived_data_test_utils: move test_utils to derived_data and update to new futures
Summary:
`manifest/test_utils` contains test utilities that are only used by derived data, and only one
of which relates to manifests.  Its name (`test_utils`) is also confusing with `tests/utils`.

Move it to `derived_data_test_utils`, and update it to new futures.

Reviewed By: mitrandir77

Differential Revision: D24787536

fbshipit-source-id: 7a4a735132ccf81e3f75683c7f44c9ada11bc9d7
2020-11-09 07:23:51 -08:00
Alex Hornby
6091d25bee mononoke: reduce visibility of add_* functions that MononokeApp controls
Summary:
Reduce visibility of add_* functions that MononokeApp controls, no need for them to be public.

Updated a couple of binaries to use MononokApp.with_fb303_args() instead of calling the add_fb303 function directly.

Reviewed By: krallin

Differential Revision: D24757202

fbshipit-source-id: a068ca4fd976429e7c02c4049429553cc8acf3d4
2020-11-09 02:25:25 -08:00
Alex Hornby
08595c74a1 mononoke: update benchmark to be MononokeApp
Summary: benchmark is the last remaining user of args::add_cachelib_args outside of MononokeApp,  switch it to use MononokeApp instead.

Reviewed By: krallin

Differential Revision: D24755785

fbshipit-source-id: c105b4443394c88b6effdac382089e7eaca65bfe
2020-11-09 02:25:24 -08:00
Alex Hornby
f28a33a86e mononoke: make MononokeApp arguments more configurable
Summary: make MononokeApp arguments more configurable so binaries can opt out of them if a section does not apply,  making the --help more relevant.

Reviewed By: krallin

Differential Revision: D24757007

fbshipit-source-id: eed2f321bdbd04208567ef9a45cf861e56cdd07e
2020-11-09 02:25:24 -08:00
Stanislau Hlebik
d59b6d61e9 mononoke: make hash_validation_percentage a tunable
Summary:
Previously it was a config knob, but they are rather hard to change because
they require a restart of the service. Let's make it a tunable instead.

Reviewed By: farnz

Differential Revision: D24682129

fbshipit-source-id: 9832927a97b1ff9da49c69755c3fbdc1871b3c5d
2020-11-09 02:25:24 -08:00
Jun Wu
d89311e478 Back out "log: backout D24293498 about prefetching commit data"
Summary:
The original problem was a fastlog bug, solved by D24513444 (c3bcc1ab88).

Restores prefetching for phabricator status so `hg ssl` and `hg fssl` become fast again.

Original commit changeset: b10c4caf8fda

Reviewed By: sfilipco

Differential Revision: D24749774

fbshipit-source-id: fa14f7dde9c922733525a7ff014efc32875426fa
2020-11-06 16:25:00 -08:00
Jun Wu
c6741e4c3a Back out "smartset: back out use Rust reentrant generator for generatorset"
Summary:
The original issue was a rust-cpython bug, solved by D24698226, or https://github.com/dgrunwald/rust-cpython/pull/244.

Original commit changeset: 08f598df0892

Reviewed By: sfilipco

Differential Revision: D24759765

fbshipit-source-id: f9a1359cfce68c8754ddd1bcb8bfc54bf75af7ff
2020-11-06 16:25:00 -08:00
Stanislau Hlebik
7b1746907e mononoke: initialize with_seq at the beginning of request handling
Reviewed By: ahornby

Differential Revision: D24788666

fbshipit-source-id: 25b2d854b96bc1ada42739fe0f94e20355a4d61b
2020-11-06 15:25:06 -08:00
Stanislau Hlebik
e7fe9e4ea9 mononoke: do not allow too big commits to be landed
Reviewed By: krallin

Differential Revision: D24730106

fbshipit-source-id: e2b116c437a557f1b795c3b07eb124b8dd1a3ef8
2020-11-06 11:24:19 -08:00
Thomas Orozco
447217c840 mononoke/filestore: update fetch to use 0.3 futures
Summary:
This updates the last bit of the Filestore that was using 0.1 futures to 0.3.
This used to use a weighted buffered stream (which we don't have for 0.3
futures at this point), but as I started working on one I realized we don't
even need it here, so I took this out.

Reviewed By: StanislavGlebik

Differential Revision: D24735907

fbshipit-source-id: 00a55c14864b09f9c353f95f2f8cbb895cf52791
2020-11-06 07:26:04 -08:00
Thomas Orozco
26e06ef1a0 mononoke/filestore: update fetch methods to return 0.3 stream
Summary:
This updates the external facing API of the filestore to use 0.3 streams.
Internally, there is still a bit of 0.3 streams, but as of this change, it's
all 0.3 outside.

This required a few changes here and there in places where it was simpler to
just update them to use 0.3 futures instead of `compat()`-ing everything.

Reviewed By: ikostia

Differential Revision: D24731298

fbshipit-source-id: 18a1dc58b27d129970a6aa2d0d23994d5c5de6aa
2020-11-06 07:26:04 -08:00
Thomas Orozco
8cad2ed3f2 mononoke/filestore: update exists() to futures 0.3
Summary: Like it says in the title.

Reviewed By: StanislavGlebik

Differential Revision: D24731300

fbshipit-source-id: b9c44fc1e4bd4cfe8655e1024a0547e40fb99424
2020-11-06 07:26:03 -08:00
Thomas Orozco
184310158b mononoke/filestore: update fetch external API to 0.3 futures
Summary:
Like it says in the title. This required quite a lot of changes at callsites,
as you'd expect.

Reviewed By: StanislavGlebik

Differential Revision: D24731299

fbshipit-source-id: e58447e88dcc3ba1ab3c951f87f7042e2b03eb2c
2020-11-06 07:26:03 -08:00
Thomas Orozco
b6949dbc26 mononoke/filestore: update store to futures 0.3
Summary: Like it says in the title. This updates `store()` and its (many) callsites.

Reviewed By: ahornby

Differential Revision: D24728658

fbshipit-source-id: 5fccf76d25e58eaf069f3f0cf5a31d2c397687ea
2020-11-06 07:26:03 -08:00
Thomas Orozco
a9b64b93c5 mononoke/filestore: update rechunk module to futures 0.3
Summary: Not much to be seen here.

Reviewed By: ahornby

Differential Revision: D24727257

fbshipit-source-id: d97b68544d53cfe32eb11caab73535d9be16ad11
2020-11-06 07:26:03 -08:00
Thomas Orozco
8e7bf512a5 mononoke/filestore: convert alias module to futures 0.3
Summary: Like it says in the title. Not much to be said here.

Reviewed By: ahornby

Differential Revision: D24727256

fbshipit-source-id: 1645339edf287ac7e59612589b308f08b708ae00
2020-11-06 07:26:03 -08:00
Thomas Orozco
40e8cab560 mononoke/filestore: update metadata to futures 0.3
Summary:
This updates the metadata APIs in the filestore to futures 0.3 & async / await.
This changes the external API of the filestore, so there's quite a bit of churn
outside of that module.

Reviewed By: markbt

Differential Revision: D24727255

fbshipit-source-id: 59833f185abd6ab9c609c6bcc22ca88ada6f1b42
2020-11-06 07:26:03 -08:00
Thomas Orozco
c2ad26f991 mononoke/filestore: convert finalize to futures 0.3
Summary:
Like it says in the title. This also lets us get rid of some macros we no
longer need.

Reviewed By: markbt

Differential Revision: D24727259

fbshipit-source-id: 5e3211bc08fa5376b4cfce4bea0428ab7bf3dc0f
2020-11-06 07:26:03 -08:00
Thomas Orozco
5adbccff53 mononoke/filestore: convert prepare to futures 0.3 / tokio 0.2
Summary:
Like it says in the title. This also lets us remove the spawn module entirely.
Note that there is one little annoyance here: I ran into the good old "not
general enough" compiler issue, so I had to add a bit more boxing to make this
go away :(

Reviewed By: markbt

Differential Revision: D24727253

fbshipit-source-id: 73435305d39cade2f32b151734adf0969311c243
2020-11-06 07:26:03 -08:00
Thomas Orozco
565eff1f9d mononoke/filestore: convert ChunkStream to futures 0.3
Summary: Like it says in the title!

Reviewed By: markbt

Differential Revision: D24727252

fbshipit-source-id: dc4b3f1f5631d54d5964e1e5e5f538f81769e425
2020-11-06 07:26:02 -08:00
Thomas Orozco
b1b1860c67 mononoke/filestore: just require input streams to be Send
Summary:
This will simplify a bunch of refactoring, and we no longer need them not to
be. This lets us convert parts of `chunk` to new futures as well.

Reviewed By: markbt

Differential Revision: D24727254

fbshipit-source-id: de643effe2d1d42ff9bf85a48d09301e929e66de
2020-11-06 07:26:02 -08:00
Thomas Orozco
b37bd20ab8 mononoke/filestore: update multiplexer to futures 0.3 / tokio 0.2
Summary:
Like it says in the title. This updates the Filestore's multiplexer to new
futures. The change is pretty mechanical, save for:

- We don't use filestore::spawn anymore, since that's provided by
  `tokio::task::spawn`  now.
- We no longer need to use futures or streams with `Error = !` since in Futures
  0.3 you can have an `Output` that isn't a `Result`.
- We need to make the `Stream` we accept `Send` because we can't used
  `boxed().compat()` otherwise. I'd like to remove that constraint once the
  conversion is complete, but considering all callsites do have a `Send` stream
  (the only one that didn't was API Server but that's long gone), just adding
  the bound is easiest.

Reviewed By: farnz

Differential Revision: D24708596

fbshipit-source-id: 8b278b5ae49029b7f0d0d9d4fe96c467e1343f60
2020-11-06 07:26:02 -08:00
Thomas Orozco
390d305281 mononoke/test: call the filestore with static streams
Summary:
This makes some refactoring later easier. I'd like to not require this, but for
now it's a bit simpler to just do this. Those are the only callsites that
send non-static streams.

Reviewed By: markbt

Differential Revision: D24727258

fbshipit-source-id: c0e4dc86e249a08c2194a20de5a2dfd5a5933d0b
2020-11-06 07:26:02 -08:00
Stanislau Hlebik
a5f6874c72 mononoke: add a tunable to log large read requests
Reviewed By: krallin

Differential Revision: D24780218

fbshipit-source-id: 9207a471e65407a023223ce5a0aeee3511a9823e
2020-11-06 04:23:40 -08:00
Lukas Piatkowski
a3c2ea6fa0 mononoke/commit_rewriting: fix doc generation
Reviewed By: ahornby

Differential Revision: D24780398

fbshipit-source-id: 79570f6b6959362bcdbc20f425378b7ec460e480
2020-11-06 03:24:20 -08:00
Alex Hornby
14128ce2dc mononoke: remove unnecessary .version("0.0.0") in clap App setup
Summary: We don't need to declare a fake empty version number

Reviewed By: farnz

Differential Revision: D24757981

fbshipit-source-id: 594c97e225704d783bea723efcbb9dfc4d5d800b
2020-11-06 02:23:46 -08:00
Xavier Deguillard
c5480fdf6f hooks: forbid windows reserved names in the repos
Summary:
The root cause for S199754 was a file named "con.rs" was checked in onto the
repo. Since this is a reserved filename on Windows, this broke all Windows
users having it in their sparse profiles.

The rules for reserved names are defined as such by Microsoft:

"CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9,
LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these
names followed immediately by an extension; for example, NUL.txt is not
recommended. For more information, see Namespaces."

Of course, since the filesystem is case insensitive, these can have any casing.

Reviewed By: krallin

Differential Revision: D24453528

fbshipit-source-id: 389f15e2b1a88e3c1e8721fb7868616acabebc64
2020-11-05 19:24:04 -08:00
Xavier Deguillard
800952135e crecord: make it more readable on Windows terminal and light colors
Summary:
On Windows terminal, with light color schemes, crecord text was barely visible
(sometimes invisible) due to low contrast on either the background, or the
foreground. Making the text bold makes it brighter and thus more readable.

As a bonus, I've also made the hunk lines magenta to mimic what `hg diff` does.

Reviewed By: DurhamG

Differential Revision: D24718598

fbshipit-source-id: 18c2ff03fc2a46ca45808d5061db21e1f1b501ae
2020-11-05 13:44:41 -08:00
Jun Wu
83ad42d760 config: reduce treestate mingcage to 15 minutes
Summary: This makes it clean up stale files more aggressively.

Reviewed By: DurhamG

Differential Revision: D24744461

fbshipit-source-id: 76d163c9f16d8f8d1bf628e9197a3086d7cd48aa
2020-11-05 11:35:32 -08:00
Durham Goode
a1d2d702d7 datastore: fix bug in indexedlogdatastore max log size
Summary:
The goal of this code was to divide the cache limit by the number of
logs. Instead it divided the cache limit by the default per-log size (2GB). That
results in a very small max-bytes-per-log so data was being thrown out
constantly. This fixes it and updates tests to actually demonstrate the issue.

Reviewed By: kulshrax

Differential Revision: D24712842

fbshipit-source-id: 8062758b5bfa40493e2003d5a9028d601b1522b1
2020-11-05 09:48:26 -08:00
Durham Goode
5fd8358356 chg: don't set line buffering
Summary:
Python 3 doesn't support line buffering for binary file descriptors.
Let's stop setting it in chg.

This was causing warnings to pop up during prompts for users.
```
.../python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, *args, **kwargs)
```

Reviewed By: singhsrb

Differential Revision: D24747777

fbshipit-source-id: 0b881b4067e8c7086fe73380f81d526a2ecc364a
2020-11-05 09:44:00 -08:00
Liubov Dmitrieva
463ba371b8 add getfrombackup command to provide API to fetch from bundle store
Summary:
Downloading and applying mercurial bundles directly for list of given heads.

Backup store stores commits as mercurial bundles that can be fetched directly from the store and applied (everstore).

The command could be useful when we migrate our server from one backend to another (Mononoke) and some commits can be missing in Mononoke.

The command could probably be deleted after a while once we migrate completely...

Reviewed By: mitrandir77

Differential Revision: D24756583

fbshipit-source-id: 1629c3756f244621efb965dfe15b75c7509a1cd1
2020-11-05 06:30:18 -08:00
Lukas Piatkowski
3c3de9e954 rust-shed/futures_01_ext: rename futures_ext to futures_01_ext
Summary: As part of the effort to deprecate futures 0.1 in favor of 0.3 I want to create a new futures_ext crate that will contain some of the extensions that are applicable from the futures_01_ext. But first I need to reclame this crate name by renaming the old futures_ext crate. This will also make it easier to track which parts of codebase still use the old futures.

Reviewed By: farnz

Differential Revision: D24725776

fbshipit-source-id: 3574d2a0790f8212f6fad4106655cd41836ff74d
2020-11-05 06:07:16 -08:00
Aida Getoeva
1240231656 mononoke/mysql: share single connection pool in the same SMC between shards
Summary:
In Mononoke for a sharded DB we historically used connection pool size 1 per shard. With the Mysql FFI client now it doesn't make sense, as the client's conn pool is smart enough and designed to works with sharded DBs, so currently we don't even benefit from having a pool.

In this diff I added an API to create sharded connections: a single pool is shared between all the shards.

Reviewed By: farnz

Differential Revision: D24475317

fbshipit-source-id: b7142c030a10ccfde1d5a44943b38cfa70332c6a
2020-11-05 05:34:22 -08:00
Stanislau Hlebik
7b1798be37 sparse: use xormatcher instead of unionmatcher
Summary:
This diff makes "Calculating additional actions for sparse profile update" more
efficient by using xormatcher instead of unionmatcher. Indeed, we are
interested only in files that changed their "state" after sparse profile change
e.g. either a file was included in sparse profile and then became excluded.

Reviewed By: sfilipco

Differential Revision: D24725902

fbshipit-source-id: ee611e7c123b95937652ced828b5bea6d75a3daf
2020-11-05 04:39:48 -08:00
Stanislau Hlebik
abfe3d84c7 match: make differencematcher.visitdir slightly more efficient
Summary:
At the moment differencematcher.visitdir never returns "all".

This diff changes it to return all in the case if self._m2 doesn't visit the directory at all and
self.m1.visitdir(dir) returns "all". This makes sense - if m1 visits all files
in the directory and m2 doesn't exclude any file then it's safe to return all
in this case.

This optimization will be used in the next diff.

Reviewed By: sfilipco

Differential Revision: D24725903

fbshipit-source-id: 2a049cfb1ea4878331e8640cbb20af74da86a1a1
2020-11-05 04:39:48 -08:00
Stanislau Hlebik
5b92b6978e sparse: use mf.walk with ondemand fetch when calculating updates on sparse profile change
Summary:
Whenever a sparse profile changes (e.g. we include or exclude a directory or a file) we do a full prefetch for all trees in the revision and then for each file in a revision we check if this file has changed its state after sparse profile change (i.e. whether it was included before the change and became excluded after the change and vice versa). It can be quite expensive for large repos and looks like checking all the files is unnecessary.

For example, there might be top-level directories that are excluded in sparse profile before and after the change. In that case there's no reason to check every file in this directory, and there's no reason to prefetch manifests for this directory.

More importantly, `mf.walk()` method is already smart enough to do manifest prefetches if treemanifest.ondemandfetch is set to True, so it looks like there's no reason to do any additional prefetching at all (at least in theory).

So this diff does a few things:
1) The default mode is to use mf.walk() method with a union matcher to find all the files that were are included either in old or new sparse profile. In order for it to prefetch efficiently we force enable treemanifest.ondemandfetch config option.
2) It also adds a fallback option to full prefetch (i.e. the same thing we do right now)  Hopefully this fallback option won't be necessary and we'll delete them soon. I've added them only to be able to fallback to current behaviour in case there are problems with the new behaviour

I think we can do an even more efficient fetch by using xor matcher instead of union matcher. I'll try to implement it in the next diffs

Reviewed By: sfilipco

Differential Revision: D24705823

fbshipit-source-id: 2c232a66cc74ee95bdaa84201df46448412f087f
2020-11-05 04:39:48 -08:00
Thomas Orozco
eb8156f8c8 mononoke: flag comment text as text
Summary:
This seems to trip up Cargo builds

```
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `with`
 --> src/lib.rs:365:3
  |
7 | S with version V1
  |   ^^^^ expected one of 8 possible tokens

error: aborting due to previous error
```

Reviewed By: StanislavGlebik

Differential Revision: D24754708

fbshipit-source-id: 0dc5539acf340ac409bf7b6158313c8fec16a275
2020-11-05 03:43:50 -08:00
Chad Austin
6fcf159049 move eden/scripts/ into eden/fs/
Summary: force-unmount-all.sh is a convenience script for edenfs, so move it into eden/fs/.

Reviewed By: fanzeyi

Differential Revision: D24745361

fbshipit-source-id: 661a6f09b73911411fbb8a00bc016757ad19eb2a
2020-11-04 18:29:49 -08:00
Xavier Deguillard
bb9b0b46e1 inodes: remove unecessary include of FuseChannel.h
Summary: This is unecessary, remove it.

Reviewed By: chadaustin

Differential Revision: D24743519

fbshipit-source-id: 5e10eafcd3f84d9ad053be35798df86b21f97d4f
2020-11-04 17:34:01 -08:00
Xavier Deguillard
e50725d2cb inodes: rename FUSE refcount to fs refcount
Summary:
One of the issue that EdenFS on Windows is currently facing is around
invalidation during an update. In effect, EdenFS is over invalidating, which
causes update to be slower than it should be, as well as EdenFS recursively
triggering ProjectedFS callbacks during invalidation. Both of these are a
sub-par UX.

The reason this issue exist is multi-faceted. First, the update code follows
the "kPreciseInodeNumberMemory" path which enforces that a directory that is
present in the overlay needs to be invalidated, even if it isn't materialized.
The second reason is that no reclamation is done for the overlay, combine the
two and you get an update that gets both slower over time and will issue
significantly more invalidation that is needed.

Solving this is a bit involved. We could for instance start by reclaiming
inodes from the overlay, but this wouldn't be effective as we use the fact that
an inode is present in the overlay as a way to know that the file is cached in
the overlay. If we reclaim from the overlay we simply won't be invalidating
enough and some files will be out of date.

It turns out that we already have a mechanism to track what is cached by the
kernel: the fuse refcount. On Linux/macOS, everytime an inode is returned to
the kernel, this refcount incremented, and the kernel then notifies us when it
forgot about it, at which point the refcount can be decremented. On Windows,
the rules are a bit different, and a simple flag is sufficient: set when we
write a placeholder on disk (either during a directory listing, or when
ProjectedFS asks for it), and unset at invalidation time during update. There
is however a small snag in this plan. On Linux, the refcount starts at 0 when
EdenFS starts as a mount/unmount will clear all the kernel references on the
inodes. On Windows, the placeholder aren't disappearing when EdenFS dies or is
stopped, so we need a way to scan the working copy when EdenFS starts to know
which inodes should be loaded (an UnloadedInode really).

The astute reader will have noticed that this last part is effectively a
O(materialized) operation that needs to happen at startup, which would be
fairly expensive in itself. It turns out that we really don't have choice and
we need to do it regardless due to Windows not disallowing writes to the
working copy when EdenFS is stopped, and thus for EdenFS to be aware of the
actual state of the working copy, it needs to scan it at startup...

The first step in doing all of this is to simply rename the various places that
uses "fuse refcount" to "fs refcount" which is what this diff does.

Reviewed By: chadaustin

Differential Revision: D24716801

fbshipit-source-id: e9e6ccff14c454e9f2626fab23daeb3930554b1a
2020-11-04 17:34:01 -08:00
Jun Wu
c3bcc1ab88 fastlog: do not construct revlog changelog
Summary:
The revlog changelog has incompatible rev numbers with changelog2 backends. Do
not construct it.  Instead, just use the current changelog.

Reviewed By: DurhamG

Differential Revision: D24513444

fbshipit-source-id: 35d9326cd9fde4af8b98d628f6df66bd80883f92
2020-11-04 14:39:04 -08:00
Stanislau Hlebik
b5991c8dfa mononoke: fix repo_import to choose correct version
Summary:
Previously we were choosing current version, and just as with backsyncer this
is not always correct. Let's instead choose not the current version but the
version of the bookmark you are importing to.

This diff also introduced an integration test for a repo import into a pushredirected repo, and turned out there were a few bugs in the repo_import code (open_source_sql was used instead of open_sql). This diff fixed them as well

Reviewed By: ikostia

Differential Revision: D24651849

fbshipit-source-id: bfe36e005170ae2f49fa3a6cb208bf6d2c351298
2020-11-04 11:33:22 -08:00
Stanislau Hlebik
bccc2779cf mononoke: remove _DEPRECATED method calls
Summary: Instead let's fetch mover by version name

Reviewed By: farnz

Differential Revision: D24651848

fbshipit-source-id: 08c0a980d139cc74cc7963b1b38f045b10874060
2020-11-04 11:33:22 -08:00
Stanislau Hlebik
b65c8a15eb mononoke: do not backsync commits if no version is found
Reviewed By: ikostia

Differential Revision: D24648254

fbshipit-source-id: ad00dfd096ec5644d48ebd6593101fa5a8e3e04c
2020-11-04 11:33:22 -08:00
Stanislau Hlebik
14e80fdd77 mononoke: disallow syncing commit with no parents without specifying a version
Summary:
This diff changes semantic of `sync_commit()` function to return an error when
trying to sync a commit with no parents. This is a small code change which has big change
in semantics, and because of that I had to change how backsyncer and
mononoke_x_repo_sync job.

Instead of using `unsafe_sync_commit()/sync_commit()` functions both backsyncer and
`x_repo_sync_job` now use `unsafe_sync_commit_with_expected_version()`
which forces them to specify which version to use for commit with no parents.
And in order to find this version I changed find_toposorted_unsynced_ancestors
to not only return unsynced ancestors but also return mapping versions of their
(i.e. of unsynced ancestors) parents. Given this mapping we can figure out what
version is supposed to be used in `unsafe_sync_commit_with_expected_version()`.

The question raises what to do when a commit doesn't have any synced ancestor and hence we can't decide
which version to use to remap it. At the moment we are using current version (i.e. preserving the existing behaviour).
However this behaviour is incorrect, and so it will be changed in the next diffs

Reviewed By: ikostia

Differential Revision: D24617936

fbshipit-source-id: 6de26c50e4dde0d054ed2cba3508e6e8568f9222
2020-11-04 11:33:22 -08:00
Stanislau Hlebik
58224708fa mononoke: select version for pushrebase commit
Summary:
Previously we were always choosing the current version for remapping via
pushrebase, but this is incorrect. Let's instead select the version based on
what version parent commits used to remap with.

Reviewed By: ikostia

Differential Revision: D24621128

fbshipit-source-id: 2fedc34b706f090266cd43eaf3439f8fb0360d0d
2020-11-04 11:33:22 -08:00
Alex Hornby
37d17cd46c mononoke: use strum EnumString instead of own parsing
Summary: use strum  EnumString instread of own macro generated parsing

Reviewed By: krallin

Differential Revision: D24680440

fbshipit-source-id: 1f4cac6b8abf4420965702785b5df1d5bf225d32
2020-11-04 09:48:18 -08:00
Alex Hornby
6a92e3c512 mononoke: use strum EnumIter in walker instead of own macro
Summary: Let strum generate the equivalent of ALL_VARIANTS

Reviewed By: krallin

Differential Revision: D24680443

fbshipit-source-id: 70a8056c020db6ef62ea2b76b69430546da177ae
2020-11-04 09:48:18 -08:00
Alex Hornby
f2abe35cee mononoke: use strum IntoStaticStr in walker instead of own macro
Summary: Let strum crate do this for us

Reviewed By: krallin

Differential Revision: D24680444

fbshipit-source-id: dbde0077c105d6cc572a0c863bcb4d043714d441
2020-11-04 09:48:18 -08:00