Patchwork D6516: rust-discovery: accept the new 'respectsize' init arg

login
register
mail settings
Submitter phabricator
Date July 17, 2019, 4:30 p.m.
Message ID <3c36172d7408076cb24d7c802bde9124@localhost.localdomain>
Download mbox | patch
Permalink /patch/40946/
State Not Applicable
Headers show

Comments

phabricator - July 17, 2019, 4:30 p.m.
Alphare updated this revision to Diff 15931.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6516?vs=15464&id=15931

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

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

AFFECTED FILES
  rust/hg-cpython/src/discovery.rs
  tests/test-rust-discovery.py

CHANGE DETAILS




To: gracinet, #hg-reviewers
Cc: durin42, kevincox, mercurial-devel

Patch

diff --git a/tests/test-rust-discovery.py b/tests/test-rust-discovery.py
--- a/tests/test-rust-discovery.py
+++ b/tests/test-rust-discovery.py
@@ -68,7 +68,7 @@ 
 
     def testaddcommonsmissings(self):
         idx = self.parseindex()
-        disco = PartialDiscovery(idx, [3])
+        disco = PartialDiscovery(idx, [3], True)
         self.assertFalse(disco.hasinfo())
         self.assertFalse(disco.iscomplete())
 
@@ -84,7 +84,7 @@ 
 
     def testaddmissingsstats(self):
         idx = self.parseindex()
-        disco = PartialDiscovery(idx, [3])
+        disco = PartialDiscovery(idx, [3], True)
         self.assertIsNone(disco.stats()['undecided'], None)
 
         disco.addmissings([2])
@@ -92,7 +92,7 @@ 
 
     def testaddinfocommonfirst(self):
         idx = self.parseindex()
-        disco = PartialDiscovery(idx, [3])
+        disco = PartialDiscovery(idx, [3], True)
         disco.addinfo([(1, True), (2, False)])
         self.assertTrue(disco.hasinfo())
         self.assertTrue(disco.iscomplete())
@@ -100,7 +100,7 @@ 
 
     def testaddinfomissingfirst(self):
         idx = self.parseindex()
-        disco = PartialDiscovery(idx, [3])
+        disco = PartialDiscovery(idx, [3], True)
         disco.addinfo([(2, False), (1, True)])
         self.assertTrue(disco.hasinfo())
         self.assertTrue(disco.iscomplete())
diff --git a/rust/hg-cpython/src/discovery.rs b/rust/hg-cpython/src/discovery.rs
--- a/rust/hg-cpython/src/discovery.rs
+++ b/rust/hg-cpython/src/discovery.rs
@@ -32,7 +32,8 @@ 
     def __new__(
         _cls,
         index: PyObject,
-        targetheads: PyObject
+        targetheads: PyObject,
+        _respectsize: bool
     ) -> PyResult<PartialDiscovery> {
         Self::create_instance(
             py,