# HG changeset patch # User Pierre-Yves David # Date 1394061280 28800 # Node ID 5c40b2a4b52f44a12923c052e2b9169e34985860 # Parent 401da1b38cca4fb3c5544cfa88be98a91c5c249b discovery: use the discovery process for pull Wow! Such speed! Much functional! Very proof on concept implementation! diff --git a/hgext/evolve.py b/hgext/evolve.py --- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -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 diff --git a/tests/test-evolve.t b/tests/test-evolve.t --- a/tests/test-evolve.t +++ b/tests/test-evolve.t @@ -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 diff --git a/tests/test-exchange-A7.t b/tests/test-exchange-A7.t --- a/tests/test-exchange-A7.t +++ b/tests/test-exchange-A7.t @@ -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 diff --git a/tests/test-exchange-B3.t b/tests/test-exchange-B3.t --- a/tests/test-exchange-B3.t +++ b/tests/test-exchange-B3.t @@ -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 diff --git a/tests/test-exchange-B7.t b/tests/test-exchange-B7.t --- a/tests/test-exchange-B7.t +++ b/tests/test-exchange-B7.t @@ -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 diff --git a/tests/test-exchange-D3.t b/tests/test-exchange-D3.t --- a/tests/test-exchange-D3.t +++ b/tests/test-exchange-D3.t @@ -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 diff --git a/tests/test-tutorial.t b/tests/test-tutorial.t --- a/tests/test-tutorial.t +++ b/tests/test-tutorial.t @@ -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)