示例#1
0
 def main(self):
     exitCode = 0
     svnCommand = SvnLookChangedCommand(self.repositoryPath, self.transaction)
     stdOutCapture = StdOutCapture(svnCommand.command())
     changedFiles = stdOutCapture.linesFromStdOut()
     for changedFile in changedFiles:
         svnLookCatCommand = SvnLookCatCommand(self.repositoryPath, self.transaction, changedFile)
         cmd = svnLookCatCommand.command()
         if cmd is not None:
             stdOutCapture = StdOutCapture(cmd)
             lines = stdOutCapture.linesFromStdOut()
             result = self.checkFile(lines)
             if result is not None:
                 sys.stderr.write("\n" + result + svnLookCatCommand.filePath)
                 exitCode = -1
     return exitCode
示例#2
0
 def main(self):
     exitCode = 0
     svnCommand = SvnLookChangedCommand(self.repositoryPath,
                                        self.transaction)
     stdOutCapture = StdOutCapture(svnCommand.command())
     changedFiles = stdOutCapture.linesFromStdOut()
     for changedFile in changedFiles:
         svnLookCatCommand = SvnLookCatCommand(self.repositoryPath,
                                               self.transaction,
                                               changedFile)
         cmd = svnLookCatCommand.command()
         if cmd is not None:
             stdOutCapture = StdOutCapture(cmd)
             lines = stdOutCapture.linesFromStdOut()
             result = self.checkFile(lines)
             if result is not None:
                 sys.stderr.write("\n" + result +
                                  svnLookCatCommand.filePath)
                 exitCode = -1
     return exitCode
    def test_command(self):
        transaction = 'ax8'
        svnLook = SvnLookChangedCommand('D:\BackedUp\csvn\data\\repositories\dev', transaction)

        self.assertEqual('svnlook changed -t ax8 D:\BackedUp\csvn\data\\repositories\dev', svnLook.command())