Commit Graph

4 Commits

Author SHA1 Message Date
Durham Goode
7386791327 pushrebase: don't send flat manifests back during reply to treeonly
Summary:
When constructing the pushrebase reply part, we weren't passing the
bundlecaps along, so it was creating a normal flat-manifest changegroup. A
treeonly client that received this would have to translate it to a tree, which
was expensive for pushes that returned a lot of manifests.

The fix is to pass the appopriate bundle caps to the changegroup creation. Since
we don't have access to the bundle1 caps inside a bundle2 part handler, we had
to update the treeonly logic to also pass treeonly=True caps as bundle2 caps.

Reviewed By: StanislavGlebik

Differential Revision: D8958866

fbshipit-source-id: 4d68031aedb61ae4b113ea9376c704c7548f029c
2018-07-23 18:53:13 -07:00
Stanislau Hlebik
1b2b294b18 pushrebase: add recording requests
Summary:
If pushrebase.enablerecording and the rest of the parameters are set then let's
save pushrebase requests. It involves saving the changegroup and treemanifest
bundles2 parts to bundlestore, and then inserting an entry into the database

Reviewed By: quark-zju

Differential Revision: D8801602

fbshipit-source-id: bea4f798daa8542541c8d7c4c2a051c8583930a0
2018-07-13 09:36:52 -07:00
Stanislau Hlebik
60e10ef772 pushrebase: add ConflictsError
Summary:
For request recording we want to treat conflicts separately. Let's add a
special exception for that.

Reviewed By: quark-zju

Differential Revision: D8787567

fbshipit-source-id: 8bee7e1a61763982e74fbaf15a9320d1d565fd76
2018-07-13 09:36:52 -07:00
Stanislau Hlebik
74b93af7fe pushrebase: move to a separate package
Summary:
The file is already quite big, and I'm going to add request recording
functionality soon. Let's move it in a separate package

Reviewed By: quark-zju

Differential Revision: D8787566

fbshipit-source-id: c0202d2ebf1e1662d4b02b966035f6cce9d2344e
2018-07-13 09:36:52 -07:00