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n remove_path(&self, name: &str) -> Result<(), Self::Error>;
fn rename(&self, former: &str, new: &str) -> Result<(), Self::Error>;
fn set_permissions(&self, name: &str, permissions: u16) -> Result<(), Self::Error>;
type Writer: std::io::Write;
fn write_file(&self, file: &str) -> Result<Self::Writer, Self::Error>;
/// Read the file into the buffer
///
/// Returns the file's text encoding or None if it was a binary file
fn decode_file(
file: &str,
buffer: &mut Vec<u8>,
) -> Result<Option<Encoding>, Self::Error> {
let mut uncoded = Vec::new();
self.read_file(&file, &mut uncoded)?;
let mime = tree_magic_mini::from_u8(&uncoded);
debug!("mime = {:?}", mime);
let encoding = if mime.starts_with("text/") {
let mut detector = EncodingDetector::new();
detector.feed(&uncoded, true);
let encoding = detector.guess(None, true);
debug!("guessed encoding = {:?}", encoding.name());
let (_decoded, encoding, malformed) = encoding.decode(&uncoded);
debug!("final encoding = {:?}", encoding.name());
if !malformed {
Some(Encoding(encoding))
} else {
warn!("text file was malformed");
None
}
} else {
None
};
buffer.append(&mut uncoded);
Ok(encoding)
}
}
self.output_conflict_marker(START_MARKER)
if self.is_zombie {
Ok(())
} else {
self.is_zombie = true;
self.begin_conflict()
}
}
fn end_zombie_conflict(&mut self) -> Result<(), std::io::Error> {
self.is_zombie = false;
self.output_conflict_marker(END_MARKER)
let (contents, encoding) = if meta.is_file() {
let start = ChangePosition(self.rec.contents.len().into());
let encoding = working_copy.decode_file(&item.full_path, &mut self.rec.contents)?;
self.rec.has_binary_files |= encoding.is_none();
let end = ChangePosition(self.rec.contents.len().into());
self.rec.largest_file = self.rec.largest_file.max(end.0.as_u64() - start.0.as_u64());
let start = ChangePosition(contents.len().into());
let end = ChangePosition(contents.len().into());
self.largest_file = self.largest_file.max(end.0.as_u64() - start.0.as_u64());
let (contents_, encoding) = if meta.is_file() {
file_meta.write(&mut self.rec.contents);
let name_end = ChangePosition(self.rec.contents.len().into());
self.rec.contents.push(0);
file_meta.write(&mut contents);
let name_end = ChangePosition(contents.len().into());
contents.push(0);
self.actions.push(Hunk::FileAdd {
former_parents[0].encoding.clone(),
let name_start = ChangePosition(contents.len().into());
// Push the metadata, big-endian.
contents.push((item.metadata.0 >> 8) as u8);
contents.push((item.metadata.0 & 0xff) as u8);
//
contents.extend(item.basename.as_bytes());
let name_end = ChangePosition(contents.len().into());
contents.push(0);
let name = &contents[name_start.0.as_usize()..name_end.0.as_usize()];
let basename = item.basename.as_str();
FileMetadata {
metadata: item.metadata,
basename,
encoding: encoding.clone(),
}
let mut meta = Vec::new();
&mut meta,
let FileMetadata { basename: name, .. } = FileMetadata::read(&mut meta);
if !full_path.is_empty() {
full_path.push('/');
full_path.push_str(name);
changes,
changes: &C,
changes,
former_parents.push(Parent {
let mut k = match cursor.set(txn, &key, None) {
Ok(Some((k, _))) => k,
Ok(None) => {
if let Some((k, _)) = cursor.prev(txn).map_err(|x| BlockError::Txn(x.into()))? {
k
} else {
debug!("find_block_end, no prev");
return Err(BlockError::Block { block: p });
}
}
Err(e) => {
debug!("find_block_end: BLOCK ERROR");
return Err(BlockError::Txn(e.into()));
}
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> \S+)?"#).unwrap();
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> [^ ]+)? "(?P<encoding>[^"]*)""#).unwrap();
Regex::new(r#"^(?P<n>\d+)\. File addition: "(?P<name>[^"]*)" in "(?P<parent>[^"]*)"(?P<perm> \S+)? "(?P<encoding>[^"]*)""#).unwrap();
name = "blake2b_simd"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
dependencies = [
"arrayref",
"arrayvec",
"constant_time_eq",
]
[[package]]
checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41"
checksum = "265d751d31d6780a3f956bb5b8022feba2d94eeee5a84ba64f4212eedca42213"
checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_syscall"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041"
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
]
[[package]]
name = "redox_users"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
dependencies = [
"getrandom 0.1.16",
"redox_syscall 0.1.57",
"rust-argon2",
name = "rust-argon2"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
dependencies = [
"base64",
"blake2b_simd",
"constant_time_eq",
"crossbeam-utils",
]
[[package]]