merge with stable
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 05 Mar 2020 10:46:31 -0800
changeset 44441 8cdd0b9629e3
parent 44440 d543ef183eb8 (current diff)
parent 44431 b24721e7c5ee (diff)
child 44442 6306baa7d19a
merge with stable
hgext/histedit.py
rust/hg-cpython/src/dirstate/dirstate_map.rs
--- a/contrib/heptapod-ci.yml	Thu Mar 05 10:52:51 2020 -0500
+++ b/contrib/heptapod-ci.yml	Thu Mar 05 10:46:31 2020 -0800
@@ -10,13 +10,14 @@
 
 variables:
     PYTHON: python
+    TEST_HGMODULEPOLICY: "allow"
 
 .runtests_template: &runtests
     script:
         - cd tests/
         - echo "python used, $PYTHON"
         - echo "$RUNTEST_ARGS"
-        - $PYTHON run-tests.py --color=always $RUNTEST_ARGS
+        - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" run-tests.py --color=always $RUNTEST_ARGS
 
 checks-py2:
     <<: *runtests
@@ -43,29 +44,34 @@
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "c"
 
 test-py3:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "c"
 
 test-py2-pure:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "py"
 
 test-py3-pure:
     <<: *runtests
     variables:
         RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "py"
 
 test-py2-rust:
     <<: *runtests
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
+        TEST_HGMODULEPOLICY: "rust+c"
 
 test-py3-rust:
     <<: *runtests
@@ -73,3 +79,4 @@
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
         PYTHON: python3
+        TEST_HGMODULEPOLICY: "rust+c"
--- a/hgext/histedit.py	Thu Mar 05 10:52:51 2020 -0500
+++ b/hgext/histedit.py	Thu Mar 05 10:46:31 2020 -0800
@@ -1860,10 +1860,7 @@
     # kludge: _chistedit only works for starting an edit, not aborting
     # or continuing, so fall back to regular _texthistedit for those
     # operations.
-    if (
-        ui.interface(b'histedit') == b'curses'
-        and _getgoal(opts) == goalnew
-    ):
+    if ui.interface(b'histedit') == b'curses' and _getgoal(opts) == goalnew:
         return _chistedit(ui, repo, freeargs, opts)
     return _texthistedit(ui, repo, freeargs, opts)
 
--- a/rust/hg-cpython/src/ancestors.rs	Thu Mar 05 10:52:51 2020 -0500
+++ b/rust/hg-cpython/src/ancestors.rs	Thu Mar 05 10:46:31 2020 -0800
@@ -126,7 +126,12 @@
 py_class!(pub class MissingAncestors |py| {
     data inner: RefCell<Box<CoreMissing<Index>>>;
 
-    def __new__(_cls, index: PyObject, bases: PyObject) -> PyResult<MissingAncestors> {
+    def __new__(
+        _cls,
+        index: PyObject,
+        bases: PyObject
+    )
+    -> PyResult<MissingAncestors> {
         let bases_vec: Vec<Revision> = rev_pyiter_collect(py, &bases)?;
         let inner = CoreMissing::new(pyindex_to_graph(py, index)?, bases_vec);
         MissingAncestors::create_instance(py, RefCell::new(Box::new(inner)))