def svnCommit(project, repository): """ Make the C{project} directory a valid subversion directory with all files committed to C{repository}. """ runCommand(["svnadmin", "create", repository.path]) runCommand(["svn", "checkout", "file://" + repository.path, project.path]) runCommand(["svn", "add"] + glob.glob(project.path + "/*")) runCommand(["svn", "commit", project.path, "-m", "yay"])
def svnCommit(self, project=None): """ Make the C{project} directory a valid subversion directory with all files committed. """ if project is None: project = self.project repositoryPath = self.mktemp() repository = FilePath(repositoryPath) runCommand(["svnadmin", "create", repository.path]) runCommand(["svn", "checkout", "file://" + repository.path, project.path]) runCommand(["svn", "add"] + glob.glob(project.path + "/*")) runCommand(["svn", "commit", project.path, "-m", "yay"])
def svnCommit(self, project=None): """ Make the C{project} directory a valid subversion directory with all files committed. """ if project is None: project = self.project repositoryPath = self.mktemp() repository = FilePath(repositoryPath) runCommand(["svnadmin", "create", repository.path]) runCommand( ["svn", "checkout", "file://" + repository.path, project.path]) runCommand(["svn", "add"] + glob.glob(project.path + "/*")) runCommand(["svn", "commit", project.path, "-m", "yay"])
def test_removeNEWSfragments(self): """ L{NewsBuilder.buildALL} removes all the NEWS fragments after the build process, using the C{svn} C{rm} command. """ builder = NewsBuilder() project = self.createFakeTwistedProject() self.svnCommit(project) builder.buildAll(project) self.assertEqual(5, len(project.children())) output = runCommand(["svn", "status", project.path]) removed = [line for line in output.splitlines() if line.startswith("D ")] self.assertEqual(3, len(removed))
def test_removeNEWSfragments(self): """ L{TwistedBuildStrategy.buildALL} removes all the NEWS fragments after the build process, using the C{svn} C{rm} command. """ builder = NewsBuilder() project = createFakeTwistedProject(FilePath(self.mktemp())) svnCommit(project, repository=FilePath(self.mktemp())) strategy = TwistedBuildStrategy(newsBuilder=builder) strategy.buildAll(project) self.assertEqual(5, len(project.children())) output = runCommand(["svn", "status", project.path]) removed = [line for line in output.splitlines() if line.startswith("D ")] self.assertEqual(3, len(removed))
def test_removeNEWSfragments(self): """ L{NewsBuilder.buildALL} removes all the NEWS fragments after the build process, using the C{svn} C{rm} command. """ builder = NewsBuilder() project = self.createFakeTwistedProject() self.svnCommit(project) builder.buildAll(project) self.assertEqual(5, len(project.children())) output = runCommand(["svn", "status", project.path]) removed = [ line for line in output.splitlines() if line.startswith("D ") ] self.assertEqual(3, len(removed))