예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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();
            }
        }