Commit Graph

18 Commits

Author SHA1 Message Date
Boris Feld
b989852f8f debugobsolete: also report the number of obsoleted changesets
This seems useful to have the number of obsoleted changesets when calling
debugobsolete.
2017-07-16 02:33:14 +02:00
Pierre-Yves David
4db3d34a4b discovery: include timing in the debug output
Having such date easily available is useful. It also prepare the inclusion of
some discovery related data in blackbox.
2017-06-07 10:29:39 +01:00
Pierre-Yves David
b594eddde5 debugbundle: display the content of obsmarkers parts
We parse and display the markers in the part when possible.
2017-05-25 16:50:46 +02:00
Pierre-Yves David
8873a232c1 bundle: add an experimental knob to include obsmarkers in bundle
The "hg bundle" command is a good place to test if the inclusion of obsmarkers
within a bundle is working well (part exists, content is correct etc). So we
add a way to have them included.

Ideally, this would be controlled by a change around bundlespec (bundlespec
"v3" + arguments). However, my main goal is to have obsmarkers included in
bundle created by the 'hg strip' command, not the 'hg bundle' so for now I'm
avoiding the detour through bundlespec rework territory.

Better debug output for obsmarkers in 'debugbundle' will be added in later
changesets. The 'test-obsolete-bundle-strip.t' test will also get updated in a
later changeset to keep the current changeset smaller.
2017-05-28 11:50:43 -07:00
Pierre-Yves David
9c635f53f5 caches: move the 'updating the branch cache' message in 'updatecaches'
We are about to remove the branchmap cache update in changegroup application.
There is a debug message alongside this update that we do not want to loose. We
move the message beforehand to simplify the test update in the next changeset.
The message move is quite noisy and isolating that noise is useful.

Most tests update are just line reordering since the message is issued at a
later point during the transaction.

After this changes, the message is displayed in more case since local commit
creation also issue it.
2017-05-02 22:27:44 +02:00
Pierre-Yves David
667d10975b changegroup: skip delta when the underlying revlog do not use them
Revlog can now be configured to store full snapshot only. This is used on the
changelog. However, the changegroup packing was still recomputing deltas to be
sent over the wire.

We now just reuse the full snapshot directly in this case, skipping delta
computation. This provides use with a large speed up(-30%):

# perfchangegroupchangelog on mercurial
! wall 2.010326 comb 2.020000 user 2.000000 sys 0.020000 (best of 5)
! wall 1.382039 comb 1.380000 user 1.370000 sys 0.010000 (best of 8)

# perfchangegroupchangelog on pypy
! wall 5.792589 comb 5.780000 user 5.780000 sys 0.000000 (best of 3)
! wall 3.911158 comb 3.920000 user 3.900000 sys 0.020000 (best of 3)

# perfchangegroupchangelog on mozilla central
! wall 20.683727 comb 20.680000 user 20.630000 sys 0.050000 (best of 3)
! wall 14.190204 comb 14.190000 user 14.150000 sys 0.040000 (best of 3)

Many tests have to be updated because of the change in bundle content. All
theses update have been verified.  Because diffing changelog was not very
valuable, the resulting bundle have similar size (often a bit smaller):

# full bundle of mozilla central
with delta:    1142740533B
without delta: 1142173300B

So this is a win all over the board.
2016-10-14 01:31:11 +02:00
Gregory Szorc
aa618850dc changegroup: move branch cache debug message to proper location
Before, we logged about performing a branch cache update when we
weren't actually doing it. Fix that.
2016-08-08 22:06:07 -07:00
Mike Hommey
50e9c3bb84 bundle2: properly request phases during getbundle
getbundle was requesting the "phase" namespace instead of the "phases"
namespace, which led to the client still requesting the phases
separately after getbundle finished.
2016-05-05 20:57:38 +09:00
Martin von Zweigbergk
63c15f247e changegroup3: introduce experimental.changegroup3 boolean config
In order to give us the freedom to change the changegroup3 format,
let's hide it behind an experimental config. Since it is required by
treemanifests, that will override the cg3 config.
2016-01-12 21:23:45 -08:00
Mike Edgar
44af48ee4a changegroup: add flags field to cg3 delta header
This lets revlog flags be transmitted over the wire. Right now this is
useful for censored nodes and for narrowhg's ellipsis nodes.
2015-12-14 15:55:12 -05:00
Pierre-Yves David
c33f182029 discovery: properly filter changeset in 'peer.known' (issue4982)
The 'peer.known' call (handled at the repository level) was applying its own
manual filtering (looking at phases) instead of relying on the repoview
mechanism. This led to the discovery finding more "common" node that
'getbundle' was willing to recognised. From there, bad things happen, issue4982
is a symptom of it. While situations like described in issue4982 can still
happen because of race conditions, fixing 'peer.known' is important for
consistency in all cases.

We update the code to use 'repoview' filtering. This lead to small changes in
the tests for exchanging obsolescence marker because the discovery yields
different results.

The test affected in 'test-obsolete-changeset-exchange.t' is a test for
issue4982 getting back to its expected state.
2015-12-02 16:12:15 -08:00
Gregory Szorc
4e3200d742 tests: test changegroup generation for filtered changesets (issue4982)
The test demonstrates the buggy behavior from issue4982 where the
changegroup contains changesets it shouldn't.
2015-12-02 14:20:13 -08:00
Durham Goode
312ed291dd obsolete: update tests to use obsolete options
The obsolete._enabled flag has become a config option. This updates all but one
of the tests to use the minimal number of flags necessary for them to pass.  For
most tests this is just 'createmarkers', for a couple tests it's
'allowunstable', and for even fewer it's 'exchange'.
2014-10-14 13:34:25 -07:00
Pierre-Yves David
b88b8cae5d test-obsolete: validate that bundle is not affected by issue3788
Bundle might have been affected by the same kind of error than pull (issue3788).
Testing show it is not the case.
2013-01-29 15:25:33 +01:00
Pierre-Yves David
d3771a5324 pull: fix crash when pulling changeset that get hidden locally (issue3788)
When you have obsolescence marker that apply to a pulled changesets, the added
changeset is immediately filtered. Then the list of added changeset needs to be
build against and unfiltered repo.
2013-01-29 15:26:10 +01:00
Pierre-Yves David
bd0e2aabbb test: fix typo in test comment 2012-08-01 15:12:22 +02:00
Pierre-Yves David
6e161cf9e7 obsolete: introduce an _enabled switch to disable the feature by default
Obsolete markers wide-usage and propagation should be avoided by default until
the obsolete feature is more mature.

This changeset introduce the `_enable` variable and prevent the creation of
obsolete marker if the feature is set to `False` (the default).

More limitation comes in followup changesets.
2012-07-28 13:19:06 +02:00
Patrick Mezard
7221d12e58 discovery: add extinct changesets to outgoing.excluded
Before this change, push would incorrectly fast-path the bundle
generation when extinct changesets are involved, because they are not
added to outgoing.excluded. The reason to do so are related to
outgoing.excluded being assumed to contain only secret changesets by
scmutil.nochangesfound(), when displaying warnings like:

 changes found (ignored 9 secret changesets)

Still, outgoing.excluded seems like a good API to report the extinct
changesets instead of dedicated code and nothing in the docstring
indicates it to be bound to secret changesets. This patch adds extinct
changesets to outgoing.excluded and fixes scmutil.nochangesfound() to
filter the excluded node list.

Original version and test by Pierre-Yves.David@ens-lyon.org
2012-07-25 19:34:31 +02:00