def svn_lines_changed(self, dirname):
        cwd = os.getcwd()
        os.chdir(dirname)
        try:
            command_str = "svn add --force .".format(dirname)
            self.log("Calling `{0}` in {1}".format(command_str, dirname))
            self.shell_out(command_str, message="Failed to add files to svn.")

            command_str = "svn diff --depth=infinity ."
            stdout, stderr, returncode = self.shell_out(
                command_str, message="Couldn't diff."
            )
        except Exception:
            raise
        finally:
            self.log("Changing pwd to {0}".format(cwd))
            os.chdir(cwd)  # go back!

        la, lr = 0, 0

        def svn_ignore(line):
            for ignore in self.svn_ignore:
                if ignore.match(line):
                    return True
            return False

        for line in stdout.split('\n'):
            if svn_ignore(line):
                continue
            if line.startswith('-'):
                lr += 1
            elif line.startswith('+'):
                la += 1
        return la, lr
This function will collect some metrics on how many lines were added
dataset/ETHPy150Open mozilla/inventory/mozdns/mozbind/builder.py/SVNBuilderMixin.svn_lines_changed