Commit Graph

10 Commits

Author SHA1 Message Date
Durham Goode
94c39b6032 writecg2: disable cg2 bundle writing, and force bundle v1
Summary:
Core hg now has support for writing bundle2 bundles. Those bundles are not
readable by older versions of Mercurial though, so we need to first deploy a
mercurial that can read the new, but writes the old, then later we will begin
writing the new as well.

Test Plan:
Created a bundle with my local machine that had the latest hg, and
handed it to a piece of infrastructure that unbundled it using the old hg.

Reviewers: #sourcecontrol, rmcelroy, sid0

Reviewed By: rmcelroy, sid0

Subscribers: rmcelroy

Differential Revision: https://phabricator.fb.com/D2587398

Signature: t1:2587398:1446027602:f711941d49ed8b1b40330c4a6bc21949b3461c10
2015-10-28 12:41:36 -07:00
Durham Goode
4cecb62eb2 Update tests 2015-10-26 15:10:59 -07:00
Durham Goode
fd063c11c1 Backed out changeset b4a7055ecf04 2015-10-16 12:30:38 -07:00
Durham Goode
60c8c6ea8b writecg2: delete the writecg2 extension
Summary:
According to pyd, Mercurial core now writes bundle2 bundles when the repo is
generaldelta, so we don't need this anymore. Plus we're using evolve now so
we're not producing many bundles anyway.

The motivation for disabling this is that the code broke due to changes from
upstream, and I was too lazy to fix it.

Test Plan: nope

Reviewers: pyd, ericsumner, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2538749
2015-10-13 16:35:52 -07:00
Durham Goode
d63b523d53 Import correct changegroup fix from upstream
Our hack for preventing overbundling was incorrect. Upstream has 22c0e29cfb77
which is the right fix.

We're also seeing missing manifest revisions in bundles for some users, so this
change (or the one upstream), might be exposing a deeper bug in the general
delta bundle creation.
2015-07-13 11:21:33 -07:00
Adam Simpkins
db3c61fed7 [writecg2] fix changegroupsubset() returning too many nodes
Summary:
Fix node computation in overridechangegroupsubset().  Previously it could
return many nodes that weren't descendants of any of the roots.

Say you had a tree like this:

  A E
  | |
  B D
  |/
  C

If you tried to strip A and B, the old code would set discbases to [C],
and incorrectly include D and E in the returned results.

This bug also exists in the upstream changegroup.changegroupsubset() function.
We should probably fix it there too.

Test Plan:
Confirmed that 'hg strip -v' didn't grossly overreport how many commits needed
to be included in the bundle.  In my test case the old code incorrectly put
15k+ commits in the bundle, instead of just the 4 commits being stripped.

Reviewers: pyd, mpm, ericsumner, durham

Reviewed By: durham

Subscribers: ericsumner, net-systems@, exa

Differential Revision: https://phabricator.fb.com/D2150067

Tasks: 7391096

Signature: t1:2150067:1434410675:f7e2520e9b7783e97b69c898b3f447a3e7cb2763
2015-06-11 19:54:19 -07:00
Durham Goode
ce52c33e1e writecg2: update to match upstream
Summary:
Upstream has finalized bundle2 and removed the experimental flags. So let's
upgrade along with it.

Test Plan: Ran the tests

Reviewers: sid0, rmcelroy, lcharignon, pyd, ericsumner

Differential Revision: https://phabricator.fb.com/D2003046
2015-04-17 14:30:35 -07:00
Eric Sumner
c81d3f9f70 [writecg2] Fix conflict with bundle2 bundlerepo work
Summary:
If bundle2 backups are turned on, don't write the nonstandard format; just
allow reading them.

Test Plan: ##run-tests##

Reviewers: durham, pyd, mpm, #sourcecontrol, sid0

Reviewed By: #sourcecontrol, sid0

Differential Revision: https://phabricator.fb.com/D1852582

Tasks: 6271882
2015-02-17 14:04:28 -08:00
Eric Sumner
34002e0224 hgext: fix many tests, run-tests, writecg2 for hg3.3
Summary: Still need to fix pushrebase

Test Plan: ##run-tests.py##

Reviewers: sid0, daviser, davidsp, mitrandir, akushner, rmcelroy, pyd, mpm, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1813630

Signature: t1:1813630:1422573745:c5ea2a8acdfda0e555d1ae56a16f4fb5e5618174
2015-01-29 15:06:06 -08:00
Siddharth Agarwal
f5b98a0424 add a hacky extension to write changegroup2 on strip
Summary:
Through experiments we've found that for highly interleaved histories, generating a changegroup2 can be 6-7x as slow as generating a changegroup1.

While we work this out upstream, ship an extension to write changegroup2s out to disk.

Note that we'll only write cg2s for strips (and related operations like amend) -- for regular bundles we'll continue to write changegroup1 for maximum compatibility.

Test Plan:
Ran the included tests. Also ran the full Mercurial test suite with:

```
python run-tests.py -j32 --extra-config-opt extensions.writecg2=/home/sid0/local/fb-hgext/writecg2.py
```

Finally, tried it out in fbobjc. Found a 6x gain in strip performance with this extension enabled.

Reviewers: durham, davidsp, rmcelroy, akushner, daviser, mitrandir, ericsumner, pyd

Reviewed By: pyd

Differential Revision: https://phabricator.fb.com/D1774334

Signature: t1:1774334:1420844207:461b830aafd7728ea3b5593fe0a02f6f66444ec3
2015-01-08 22:46:29 -08:00