mirror of
https://github.com/facebook/sapling.git
synced 2024-12-25 05:53:24 +03:00
dag: delegate reachable_root to inner implementations
Summary: Otherwise the default implementation will be used. Reviewed By: sfilipco Differential Revision: D22657206 fbshipit-source-id: dea31149efe41cb3d9e30b33c138e437dce8011e
This commit is contained in:
parent
bdf0655def
commit
64d4f5743f
@ -237,6 +237,11 @@ impl DagAlgorithm for commits {
|
||||
let py = unsafe { Python::assume_gil_acquired() };
|
||||
self.inner(py).borrow().descendants(set)
|
||||
}
|
||||
|
||||
fn reachable_roots(&self, roots: Set, heads: Set) -> Result<Set> {
|
||||
let py = unsafe { Python::assume_gil_acquired() };
|
||||
self.inner(py).borrow().reachable_roots(roots, heads)
|
||||
}
|
||||
}
|
||||
|
||||
impl IdConvert for commits {
|
||||
|
@ -223,6 +223,9 @@ impl DagAlgorithm for HgCommits {
|
||||
fn descendants(&self, set: Set) -> Result<Set> {
|
||||
self.dag.descendants(set)
|
||||
}
|
||||
fn reachable_roots(&self, roots: Set, heads: Set) -> Result<Set> {
|
||||
self.dag.reachable_roots(roots, heads)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToIdSet for HgCommits {
|
||||
|
@ -174,6 +174,9 @@ impl DagAlgorithm for MemHgCommits {
|
||||
fn descendants(&self, set: Set) -> Result<Set> {
|
||||
self.dag.descendants(set)
|
||||
}
|
||||
fn reachable_roots(&self, roots: Set, heads: Set) -> Result<Set> {
|
||||
self.dag.reachable_roots(roots, heads)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToIdSet for MemHgCommits {
|
||||
|
@ -163,6 +163,9 @@ impl DagAlgorithm for RevlogCommits {
|
||||
fn descendants(&self, set: Set) -> Result<Set> {
|
||||
self.revlog.descendants(set)
|
||||
}
|
||||
fn reachable_roots(&self, roots: Set, heads: Set) -> Result<Set> {
|
||||
self.revlog.reachable_roots(roots, heads)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToIdSet for RevlogCommits {
|
||||
|
Loading…
Reference in New Issue
Block a user