Changeset View
Changeset View
Standalone View
Standalone View
rust/hg-core/src/operations/cat.rs
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | ) -> Result<CatOutput, RevlogError> { | ||||
for (manifest_file, node_bytes) in found { | for (manifest_file, node_bytes) in found { | ||||
found_any = true; | found_any = true; | ||||
let file_log = repo.filelog(manifest_file)?; | let file_log = repo.filelog(manifest_file)?; | ||||
let file_node = Node::from_hex_for_repo(node_bytes)?; | let file_node = Node::from_hex_for_repo(node_bytes)?; | ||||
bytes.extend(file_log.data_for_node(file_node)?.data()?); | bytes.extend(file_log.data_for_node(file_node)?.data()?); | ||||
} | } | ||||
let missing: Vec<HgPathBuf> = missing | let missing: Vec<HgPathBuf> = | ||||
.iter() | missing.iter().map(|file| (*file).to_owned()).collect(); | ||||
.map(|file| (*file).to_owned()) | |||||
.collect(); | |||||
Ok(CatOutput { | Ok(CatOutput { | ||||
found_any, | found_any, | ||||
concatenated: bytes, | concatenated: bytes, | ||||
missing, | missing, | ||||
node, | node, | ||||
}) | }) | ||||
} | } |