Patchwork D6430: rust-discovery: using from Python code

login
register
mail settings
Submitter phabricator
Date June 13, 2019, 1:33 p.m.
Message ID <2e84523f778401c39b1ea4413043b3cc@localhost.localdomain>
Download mbox | patch
Permalink /patch/40485/
State Not Applicable
Headers show

Comments

phabricator - June 13, 2019, 1:33 p.m.
gracinet edited the summary of this revision.
gracinet updated this revision to Diff 15487.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6430?vs=15473&id=15487

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6430/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6430

AFFECTED FILES
  mercurial/setdiscovery.py

CHANGE DETAILS




To: gracinet, #hg-reviewers
Cc: martinvonz, mercurial-devel

Patch

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -52,6 +52,7 @@ 
 )
 from . import (
     error,
+    policy,
     util,
 )
 
@@ -269,6 +270,10 @@ 
                 sample.update(takefrom[:more])
         return sample
 
+partialdiscovery = policy.importrust('discovery',
+                                     member='PartialDiscovery',
+                                     default=partialdiscovery)
+
 def findcommonheads(ui, local, remote,
                     initialsamplesize=100,
                     fullsamplesize=200,