svn:ignore command

This commit is contained in:
aaron-jack-manning
2022-08-31 08:45:37 +10:00
parent ac9f0a5532
commit cd0fdbed3f
3 changed files with 23 additions and 3 deletions

View File

@@ -29,3 +29,15 @@ pub fn command(args : Vec<String>, vcs : Vcs, vault_folder : &path::Path) -> Res
pub fn create_gitignore(vault_folder : &path::Path) -> Result<(), error::Error> {
Ok(fs::write(vault_folder.join(".gitignore"), "state.toml\ntemp.toml\ntemp.md")?)
}
pub fn set_svn_ignore(vault_folder : &path::Path) -> Result<(), error::Error> {
let mut child = process::Command::new("svn")
.current_dir(vault_folder)
.args(&["propset", "svn:ignore", "state.toml\ntemp.toml\ntemp.md", "."])
.spawn()?;
let _ = child.wait()?;
Ok(())
}