Patchwork D7613: rust-cpython: import utils::files::* function at module level

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2019, 6:18 p.m.
Message ID <ee8e8da1f30818ecdf88b0c15d1add52@localhost.localdomain>
Download mbox | patch
Permalink /patch/43801/
State Not Applicable
Headers show

Comments

phabricator - Dec. 13, 2019, 6:18 p.m.
Closed by commit rHG4f1cddd1939e: rust-cpython: import utils::files::* function at module level (authored by yuja).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7613?vs=18643&id=18691

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

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

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

CHANGE DETAILS




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

Patch

diff --git a/rust/hg-cpython/src/filepatterns.rs b/rust/hg-cpython/src/filepatterns.rs
--- a/rust/hg-cpython/src/filepatterns.rs
+++ b/rust/hg-cpython/src/filepatterns.rs
@@ -15,10 +15,8 @@ 
 use cpython::{
     PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject,
 };
-use hg::{
-    build_single_regex, read_pattern_file, utils::files::get_path_from_bytes,
-    LineNumber, PatternTuple,
-};
+use hg::utils::files;
+use hg::{build_single_regex, read_pattern_file, LineNumber, PatternTuple};
 use std::path::PathBuf;
 
 /// Rust does not like functions with different return signatures.
@@ -38,7 +36,7 @@ 
     source_info: bool,
 ) -> PyResult<PyTuple> {
     let bytes = file_path.extract::<PyBytes>(py)?;
-    let path = get_path_from_bytes(bytes.data(py));
+    let path = files::get_path_from_bytes(bytes.data(py));
     match read_pattern_file(path, warn) {
         Ok((patterns, warnings)) => {
             if source_info {