public void Create() { string repositoryPath = Path.Combine(TestHelper.ParentPath, "SvnAdminTest.Create"); PathHelper.DeleteDirectory(repositoryPath); SvnAdmin svnAdmin = new SvnAdmin("create"); svnAdmin.RepositoryPath = repositoryPath; bool r = svnAdmin.Execute(); Assert.IsTrue(r); Assert.IsTrue(PathHelper.IsRepository(repositoryPath)); }
public void Dump() { string repositoryPath = Path.Combine(TestHelper.ParentPath, "SvnAdminTest.Create"); TestHelper.CreateRepository(repositoryPath, false); SvnAdmin svnAdmin = new SvnAdmin(SvnAdmin.Commands.Dump); svnAdmin.RepositoryPath = repositoryPath; bool r = svnAdmin.Execute(); Assert.IsTrue(r); }
public static bool CreateRepository(string repositoryPath, bool recreate) { if (PathHelper.IsRepository(repositoryPath)) { if (recreate) { PathHelper.DeleteDirectory(repositoryPath); } else { return(true); } } using (var svnAdmin = new SvnAdmin(SvnAdmin.Commands.Create)) { svnAdmin.RepositoryPath = repositoryPath; return(svnAdmin.Execute()); } }