Mercurial > evolve
changeset 865:5c40b2a4b52f
discovery: use the discovery process for pull
Wow! Such speed! Much functional! Very proof on concept implementation!
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 05 Mar 2014 15:14:40 -0800 |
parents | 401da1b38cca |
children | c6dc5822e640 |
files | hgext/evolve.py tests/test-evolve.t tests/test-exchange-A7.t tests/test-exchange-B3.t tests/test-exchange-B7.t tests/test-exchange-D3.t tests/test-tutorial.t |
diffstat | 7 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Mar 05 15:09:07 2014 -0800 +++ b/hgext/evolve.py Wed Mar 05 15:14:40 2014 -0800 @@ -2219,7 +2219,17 @@ may to contains 'heads' and 'common'. skip the key for None. Its a separed functio to play around with strategy for that.""" - return {'heads': pullop.pulledsubset} + repo = pullop.repo + cl = pullop.repo.changelog + remote = pullop.remote + unfi = repo.unfiltered() + revs = unfi.revs('::%ln', pullop.pulledsubset) + common = [nullid] + if remote.capable('_evoext_obshash_0'): + repo.ui.status("OBSEXC: looking for common markers in %i nodes\n" + % len(revs)) + common = findcommonobsmarkers(repo.ui, repo, remote, revs) + return {'heads': pullop.pulledsubset, 'common': common} @eh.wrapfunction(exchange, '_pullobsolete') @@ -2244,6 +2254,8 @@ ui.status("OBSEXC: %i markers added\n" % new) if new: pullop.repo.invalidatevolatilesets() + else: + ui.status("OBSEXC: no unknown remote markers\n") ui.status("OBSEXC: DONE\n") return tr
--- a/tests/test-evolve.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-evolve.t Wed Mar 05 15:14:40 2014 -0800 @@ -385,6 +385,7 @@ adding file changes added 1 changesets with 1 changes to 1 files OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE $ cd alpha
--- a/tests/test-exchange-A7.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-exchange-A7.t Wed Mar 05 15:14:40 2014 -0800 @@ -73,6 +73,7 @@ pulling from main no changes found OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE ## post pull state # obstore: main
--- a/tests/test-exchange-B3.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-exchange-B3.t Wed Mar 05 15:14:40 2014 -0800 @@ -96,6 +96,7 @@ adding file changes added 1 changesets with 1 changes to 1 files OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE (run 'hg update' to get a working copy) ## post pull state
--- a/tests/test-exchange-B7.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-exchange-B7.t Wed Mar 05 15:14:40 2014 -0800 @@ -80,6 +80,7 @@ pulling from main no changes found OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE ## post pull state # obstore: main
--- a/tests/test-exchange-D3.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-exchange-D3.t Wed Mar 05 15:14:40 2014 -0800 @@ -86,6 +86,7 @@ pulling from main no changes found OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE ## post pull state # obstore: main
--- a/tests/test-tutorial.t Wed Mar 05 15:09:07 2014 -0800 +++ b/tests/test-tutorial.t Wed Mar 05 15:14:40 2014 -0800 @@ -225,6 +225,7 @@ adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) OBSEXC: pull obsolescence markers + OBSEXC: no unknown remote markers OBSEXC: DONE (run 'hg heads' to see heads, 'hg merge' to merge)