Mercurial > evolve
changeset 1278:5ff8a5d85b2b stable
getbundleobsmarker: prevent crash from filtered content (issue4616)
The discovery may discover common markers on non-served nodes. This lead to
crash when building the obsmarker part.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 21 Apr 2015 16:52:08 +0200 |
parents | 0ac2ad8e7235 |
children | 064cf9ee4460 |
files | README hgext/evolve.py tests/test-wireproto.t |
diffstat | 3 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/README Tue Apr 21 17:37:19 2015 +0200 +++ b/README Tue Apr 21 16:52:08 2015 +0200 @@ -54,6 +54,8 @@ 5.1.4 -- - significant documentation update +- fix issue4616: pulling with bundle2 would crash if common marker when + discovered on non-served changesets. 5.1.3 -- 2015-04-20
--- a/hgext/evolve.py Tue Apr 21 17:37:19 2015 +0200 +++ b/hgext/evolve.py Tue Apr 21 16:52:08 2015 +0200 @@ -2657,7 +2657,7 @@ heads = repo.heads() obscommon = kwargs.get('evo_obscommon', ()) assert obscommon - obsset = repo.set('::%ln - ::%ln', heads, obscommon) + obsset = repo.unfiltered().set('::%ln - ::%ln', heads, obscommon) subset = [c.node() for c in obsset] markers = repo.obsstore.relevantmarkers(subset) exchange.buildobsmarkerspart(bundler, markers)
--- a/tests/test-wireproto.t Tue Apr 21 17:37:19 2015 +0200 +++ b/tests/test-wireproto.t Tue Apr 21 16:52:08 2015 +0200 @@ -126,5 +126,27 @@ 2 new obsolescence markers (run 'hg update' to get a working copy) +some common hidden + + $ hg touch . + $ hg push + pushing to ssh://user@dummy/server + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 0 changes to 1 files (+1 heads) + remote: obsmarker-exchange: 208 bytes received + remote: 1 new obsolescence markers + $ hg -R ../other pull + pulling from ssh://user@dummy/server + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 0 changes to 3 files (+1 heads) + obsmarker-exchange: 208 bytes received + 1 new obsolescence markers + (run 'hg heads' to see heads, 'hg merge' to merge) + $ cd .. -