Mercurial > hg
comparison rust/hg-cpython/src/dirstate/dirstate_map.rs @ 49112:a55934393078
rust-distatemap: remove `addfile` API
All of its users have been migrated to the new API
Differential Revision: https://phab.mercurial-scm.org/D12510
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 23 Mar 2022 17:19:32 +0100 |
parents | 8a17fc501eda |
children | 3df46f3a3d6c |
comparison
equal
deleted
inserted
replaced
49111:8a17fc501eda | 49112:a55934393078 |
---|---|
114 self.inner(py) | 114 self.inner(py) |
115 .borrow_mut() | 115 .borrow_mut() |
116 .set_entry(filename, item.get_entry(py)) | 116 .set_entry(filename, item.get_entry(py)) |
117 .map_err(|e| v2_error(py, e))?; | 117 .map_err(|e| v2_error(py, e))?; |
118 Ok(py.None()) | 118 Ok(py.None()) |
119 } | |
120 | |
121 def addfile( | |
122 &self, | |
123 f: PyBytes, | |
124 item: DirstateItem, | |
125 ) -> PyResult<PyNone> { | |
126 let filename = HgPath::new(f.data(py)); | |
127 let entry = item.get_entry(py); | |
128 self.inner(py) | |
129 .borrow_mut() | |
130 .add_file(filename, entry) | |
131 .map_err(|e |dirstate_error(py, e))?; | |
132 Ok(PyNone) | |
133 } | 119 } |
134 | 120 |
135 def set_tracked(&self, f: PyObject) -> PyResult<PyBool> { | 121 def set_tracked(&self, f: PyObject) -> PyResult<PyBool> { |
136 let bytes = f.extract::<PyBytes>(py)?; | 122 let bytes = f.extract::<PyBytes>(py)?; |
137 let path = HgPath::new(bytes.data(py)); | 123 let path = HgPath::new(bytes.data(py)); |