Patchwork D6397: rust-python3: compatibility fix for incoming PyLong

login
register
mail settings
Submitter phabricator
Date May 21, 2019, 5:58 p.m.
Message ID <1dd36c757b0b9d5f3c06b54c54d7d03c@localhost.localdomain>
Download mbox | patch
Permalink /patch/40165/
State Not Applicable
Headers show

Comments

phabricator - May 21, 2019, 5:58 p.m.
gracinet updated this revision to Diff 15207.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6397?vs=15164&id=15207

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

AFFECTED FILES
  rust/hg-cpython/src/dirstate.rs

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-cpython/src/dirstate.rs b/rust/hg-cpython/src/dirstate.rs
--- a/rust/hg-cpython/src/dirstate.rs
+++ b/rust/hg-cpython/src/dirstate.rs
@@ -12,7 +12,7 @@ 
 
 use cpython::{
     exc, PyBytes, PyDict, PyErr, PyInt, PyModule, PyObject, PyResult,
-    PySequence, PyTuple, Python, ToPyObject,
+    PySequence, PythonObject, PyTuple, Python, ToPyObject,
 };
 use hg::{
     pack_dirstate, parse_dirstate, CopyVecEntry, DirstateEntry,
@@ -153,7 +153,7 @@ 
         &dirstate_vec?,
         &copies?,
         DirstateParents { p1, p2 },
-        now.value(py) as i32,
+        now.as_object().extract::<i32>(py)?,
     ) {
         Ok((packed, new_dirstate_vec)) => {
             for (