rust/hg-cpython/src/lib.rs
changeset 44222 3bd77c64bc74
parent 43966 b69d5f3a41d0
child 44541 d4f19eb471ca
equal deleted inserted replaced
44221:baa4e7fdfd47 44222:3bd77c64bc74
    31 pub mod ref_sharing;
    31 pub mod ref_sharing;
    32 pub mod dagops;
    32 pub mod dagops;
    33 pub mod dirstate;
    33 pub mod dirstate;
    34 pub mod discovery;
    34 pub mod discovery;
    35 pub mod exceptions;
    35 pub mod exceptions;
    36 pub mod filepatterns;
       
    37 pub mod parsers;
    36 pub mod parsers;
    38 pub mod revlog;
    37 pub mod revlog;
    39 pub mod utils;
    38 pub mod utils;
    40 
    39 
    41 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
    40 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
    51     m.add(py, "discovery", discovery::init_module(py, &dotted_name)?)?;
    50     m.add(py, "discovery", discovery::init_module(py, &dotted_name)?)?;
    52     m.add(py, "dirstate", dirstate::init_module(py, &dotted_name)?)?;
    51     m.add(py, "dirstate", dirstate::init_module(py, &dotted_name)?)?;
    53     m.add(py, "revlog", revlog::init_module(py, &dotted_name)?)?;
    52     m.add(py, "revlog", revlog::init_module(py, &dotted_name)?)?;
    54     m.add(
    53     m.add(
    55         py,
    54         py,
    56         "filepatterns",
       
    57         filepatterns::init_module(py, &dotted_name)?,
       
    58     )?;
       
    59     m.add(
       
    60         py,
       
    61         "parsers",
    55         "parsers",
    62         parsers::init_parsers_module(py, &dotted_name)?,
    56         parsers::init_parsers_module(py, &dotted_name)?,
    63     )?;
    57     )?;
    64     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
    58     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
    65     m.add(
       
    66         py,
       
    67         "PatternFileError",
       
    68         py.get_type::<exceptions::PatternFileError>(),
       
    69     )?;
       
    70     m.add(
       
    71         py,
       
    72         "PatternError",
       
    73         py.get_type::<exceptions::PatternError>(),
       
    74     )?;
       
    75     Ok(())
    59     Ok(())
    76 });
    60 });
    77 
    61 
    78 #[cfg(not(any(feature = "python27-bin", feature = "python3-bin")))]
    62 #[cfg(not(any(feature = "python27-bin", feature = "python3-bin")))]
    79 #[test]
    63 #[test]