Summary:
Let's fail only if inconsistent data was inserted - for example, same commit
hash but different parents.
This matches core hg behavior, and also it's completely normal for commit cloud
to send more parent commits than necessary.
Reviewed By: lukaspiatkowski
Differential Revision: D7722649
fbshipit-source-id: 172a0985fb3fda27d55e9dce8916ec3793de5db9
Summary:
They would hang on any failure rather than reporting properly.
Convert to using async_unit::tokio_unit_test() to make sure unwinds are caught.
Reviewed By: StanislavGlebik
Differential Revision: D7408174
fbshipit-source-id: 39b41bd66557e0d455f87ad29a2df73768cfb9c6
Summary:
Run changeset db operations in worker threads to make them async as
far as the rest of the system is concerned.
Reviewed By: farnz
Differential Revision: D7350002
fbshipit-source-id: 66fadf9ad2f16929e0c07a6907aa9d5f5a7075a8
Summary:
There's no point passing it by reference since callers don't need to
retain it, and the async implementation needs to move it into another context.
Reviewed By: farnz
Differential Revision: D7350001
fbshipit-source-id: 5947557a84621afae801dc20e3994496244e3a10
Summary: Add in the missing code to establish a MySQL connection to the `changesets` crate. Also add unit tests for `MysqlChangesets`.
Reviewed By: jsgf
Differential Revision: D7174371
fbshipit-source-id: b531c5d5efb95eeb5e39188c4d608540f0c0261f
Summary:
Diesel looks quite promising overall, as long as we can ensure async operations
work.
Some basic notes:
* This just looks async but isn't really -- doing that would need a way to send
queries over to a thread pool. (cc kulshrax)
* It is unfortunate that we must use a macro for the exact same `add` code across
MySQL and SQLite. There doesn't appear to be a way out though -- there is no
trait bound that we can apply to the `add` method here.
This is currently pretend-async -- it would be good to make this really async, but that should wait for a future diff IMO
Reviewed By: StanislavGlebik
Differential Revision: D6932028
fbshipit-source-id: ac1cfde3b96bb790f00b73d49c6d90ed128f0255