equal
deleted
inserted
replaced
569 .head_revs_py_list |
569 .head_revs_py_list |
570 .as_ref() |
570 .as_ref() |
571 .expect("head revs should be cached") |
571 .expect("head revs should be cached") |
572 .clone_ref(py)) |
572 .clone_ref(py)) |
573 } |
573 } |
|
574 } |
|
575 |
|
576 /// get diff in head revisions |
|
577 fn _index_headrevsdiff( |
|
578 slf: &Bound<'_, Self>, |
|
579 py: Python<'_>, |
|
580 begin: PyRevision, |
|
581 end: PyRevision, |
|
582 ) -> PyResult<Py<PyTuple>> { |
|
583 let begin: BaseRevision = begin.0 - 1; |
|
584 let end: BaseRevision = end.0 - 1; |
|
585 let (removed, added) = Self::with_index_read(slf, |idx| { |
|
586 idx.head_revs_diff( |
|
587 check_revision(idx, begin)?, |
|
588 check_revision(idx, end)?, |
|
589 ) |
|
590 .map_err(graph_error) |
|
591 })?; |
|
592 let py_removed = revs_py_list(py, removed)?; |
|
593 let py_added = revs_py_list(py, added)?; |
|
594 Ok((py_removed, py_added).into_pyobject(py)?.unbind()) |
574 } |
595 } |
575 |
596 |
576 /// True if the object is a snapshot |
597 /// True if the object is a snapshot |
577 fn _index_issnapshot( |
598 fn _index_issnapshot( |
578 slf: &Bound<'_, Self>, |
599 slf: &Bound<'_, Self>, |