diff rust/hg-cpython/src/dirstate.rs @ 42957:7a01778bc7b7

rust-hgpath: replace all paths and filenames with HgPath/HgPathBuf Differential Revision: https://phab.mercurial-scm.org/D6774
author Raphaël Gomès <rgomes@octobus.net>
date Sun, 01 Sep 2019 20:53:14 +0200
parents 4e8f504424f3
children 1ca3823aeefd
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate.rs	Sun Sep 01 20:53:14 2019 +0200
+++ b/rust/hg-cpython/src/dirstate.rs	Sun Sep 01 20:53:14 2019 +0200
@@ -17,7 +17,10 @@
     exc, PyBytes, PyDict, PyErr, PyModule, PyObject, PyResult, PySequence,
     Python,
 };
-use hg::{DirstateEntry, DirstateParseError, EntryState, StateMap};
+use hg::{
+    utils::hg_path::HgPathBuf, DirstateEntry, DirstateParseError, EntryState,
+    StateMap,
+};
 use libc::{c_char, c_int};
 #[cfg(feature = "python27")]
 use python27_sys::PyCapsule_Import;
@@ -75,7 +78,7 @@
             let filename = filename.extract::<PyBytes>(py)?;
             let filename = filename.data(py);
             Ok((
-                filename.to_owned(),
+                HgPathBuf::from(filename.to_owned()),
                 DirstateEntry {
                     state,
                     mode,