aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorspiff <spiff@xbmc.org>2011-05-15 19:57:29 +0200
committerspiff <spiff@xbmc.org>2011-05-15 20:59:30 +0200
commit58411707b808866a641e42dbb026a8c99aa3f71f (patch)
treeb21640d211afb04b545979313c2ad2e182583307 /tools
parent0653ebded2d9329590fc2e7fbb7961114a33cc0e (diff)
changed: remove old changelog utility
it can only work with a svn, and as we all know, svn is sooo 2005
Diffstat (limited to 'tools')
-rw-r--r--tools/Changelog/Changelog.cpp150
-rw-r--r--tools/Changelog/Changelog.exebin114688 -> 0 bytes
-rwxr-xr-xtools/Changelog/Changelog.py120
-rw-r--r--tools/Changelog/Changelog.sln21
-rw-r--r--tools/Changelog/Changelog.vcproj179
-rw-r--r--tools/Changelog/Makefile2
-rw-r--r--tools/Changelog/stdafx.cpp29
-rw-r--r--tools/Changelog/stdafx.h36
8 files changed, 0 insertions, 537 deletions
diff --git a/tools/Changelog/Changelog.cpp b/tools/Changelog/Changelog.cpp
deleted file mode 100644
index 30817b6d5d..0000000000
--- a/tools/Changelog/Changelog.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// Changelog.cpp : Defines the entry point for the console application.
-//
-
-#include "stdafx.h"
-
-#include "tinyxml.h"
-#include "../../xbmc/utils/RegExp.h"
-
-#ifdef _LINUX
-#define _tmain main
-#define _TCHAR char
-#endif
-
-const char header[] = "*************************************************************************************************************\r\n"
- "*************************************************************************************************************\r\n"
- " XBMC CHANGELOG\r\n"
- "*************************************************************************************************************\r\n"
- "*************************************************************************************************************\r\n"
- "\r\n"
- "Date Rev Message\r\n"
- "=============================================================================================================\r\n";
-
-const char filter[][100] = {"[- ]*[0-9]+-[0-9]+-[0-9]+ *",
- "\\*\\*\\* empty log message \\*\\*\\*",
- "no message" };
-
-std::string FilterMessage(std::string message)
-{
- std::string filteredMessage = message;
- CRegExp reg;
- for (int i = 0; i < sizeof(filter) / 100; i++)
- {
- reg.RegComp(filter[i]);
- int findStart = reg.RegFind(message.c_str());
- while (findStart >= 0)
- {
- filteredMessage = message.substr(0, findStart);
- filteredMessage.append(message.substr(findStart + reg.GetFindLen(), message.length()));
- message = filteredMessage;
- findStart = reg.RegFind(message.c_str());
- }
- }
- return filteredMessage;
-}
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- std::string input = "svn_log.xml";
- std::string output = "Changelog.txt";
- int limit = 0;
-
- if (argc < 2)
- {
- // output help information
- printf("usage:\n");
- printf("\n");
- printf(" Changelog input <output> <limit>\n");
- printf("\n");
- printf(" input : input .xml file generated from SVN (using svn log --xml)\n");
- printf(" DOWNLOAD to download direct from XBMC SVN\n");
- printf(" <output> : output .txt file for the changelog (defaults to Changelog.txt)\n");
- printf(" <limit> : the number of log entries for svn to fetch. (defaults to no limit)");
- printf("\n");
- return 0;
- }
- input = argv[1];
- if (argc > 2)
- output = argv[2];
- FILE *file = fopen(output.c_str(), "wb");
- if (!file)
- return 1;
- fprintf(file, header);
- if (input.compare("download") == 0)
- {
- if(argc > 3)
- limit = atoi(argv[3]);
- // download our input file
- std::string command = "svn log -r 'HEAD':8638 ";
- if (limit > 0)
- {
- command += "--limit ";
- command += argv[3]; // the limit as a string
- command += " ";
- }
-#ifndef _LINUX
- command += "--xml https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/XBMC > svn_log.xml";
-#else
- command += "--xml https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC > svn_log.xml";
-#endif
- printf("Downloading changelog from SVN - this will take some time (around 1MB to download with no limit)\n");
- system(command.c_str());
- input = "svn_log.xml";
- printf("Downloading done - processing\n");
- }
- TiXmlDocument doc;
- if (!doc.LoadFile(input.c_str()))
- {
- fclose(file);
- return 1;
- }
-
- TiXmlElement *root = doc.RootElement();
- if (!root) return 1;
-
- TiXmlElement *logitem = root->FirstChildElement("logentry");
- while (logitem)
- {
- int revision;
- logitem->Attribute("revision", &revision);
- TiXmlNode *date = logitem->FirstChild("date");
- std::string dateString;
- if (date && date->FirstChild())
- dateString = date->FirstChild()->Value();
- TiXmlNode *msg = logitem->FirstChild("msg");
- if (msg && msg->FirstChild())
- {
- // filter the message a bit
- std::string message = FilterMessage(msg->FirstChild()->Value());
- if (message.size())
- fprintf(file, "%s %4i %s\r\n", dateString.substr(0,10).c_str(), revision, message.c_str());
- else
- int breakhere = 1;
- }
- logitem = logitem->NextSiblingElement("logentry");
- }
- fclose(file);
- printf("Changelog saved as: %s\n", output.c_str());
- return 0;
-}
diff --git a/tools/Changelog/Changelog.exe b/tools/Changelog/Changelog.exe
deleted file mode 100644
index 5571d90375..0000000000
--- a/tools/Changelog/Changelog.exe
+++ /dev/null
Binary files differ
diff --git a/tools/Changelog/Changelog.py b/tools/Changelog/Changelog.py
deleted file mode 100755
index eeebd0d0c6..0000000000
--- a/tools/Changelog/Changelog.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2007-2010 Team XBMC
-# http://www.xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-# http://www.gnu.org/copyleft/gpl.html
-
-import re, os, sys
-
-def usage ():
- print " Changelog.py [option]"
- print " -h : display this message"
- print " -r <REV> : get log messages up until REV"
- print " -d <DIR> : place Changelog.txt in DIR"
- sys.exit()
-
-
-header = "*************************************************************************************************************\n" \
- "*************************************************************************************************************\n" \
- " XBMC CHANGELOG\n" \
- "*************************************************************************************************************\n" \
- "*************************************************************************************************************" \
- "\nDate Rev Message\n" \
- "=============================================================================================================\n"
-
-xmlre = re.compile("^<logentry.*?revision=\"([0-9]{4,})\".*?<date>([0-9]{4}-[0-9]{2}-[0-9]{2})T.*?<msg>(.*?)</msg>.*?</logentry>$", re.MULTILINE | re.DOTALL)
-txtre = re.compile("([0-9]{4}-[0-9]{2}-[0-9]{2}) ([0-9]{4,5}) {1,2}(.*)")
-
-old = None
-lastrev = 8638
-rev = 1000000
-dir = "."
-
-nargs = len(sys.argv)
-args = sys.argv
-
-i = 1
-while i < nargs:
- if args[i] == "-r":
- i += 1
- try:
- rev = int(sys.argv[i])
- except:
- rev=1000000
- elif args[i] == "-d":
- i+=1
- dir = args[i].replace(' ', '\ ')
- elif args[i] == "-h" or args[i] == "--help":
- usage()
- i+=1
-
-# print dir
-# print rev
-
-try:
- old = open("%s/Changelog.txt" % (dir))
-except:
- old = None
-
-if old != None:
- olddoc = old.read()
- old.close()
- oldmsgs = txtre.findall(olddoc)
- del olddoc
- if len(oldmsgs) > 0:
- lastrev = int(oldmsgs[0][1])
-try:
- output = open("%s/Changelog.txt" % (dir),"w")
-except:
- print "Can't open %s/Changelog.txt for writing." % (dir)
- sys.exit()
-
-output.write(header)
-
-if rev <= lastrev:
- for msg in oldmsgs:
- if int(msg[1]) <= rev:
- s = "%-11.11s %-5.5s %s\n" % (msg[0], msg[1], msg[2])
- output.write(s)
- sys.exit()
-
-svncmd = "svn log --xml -r %s:HEAD" % (lastrev)
-newlog = os.popen(svncmd)
-
-newlogdoc = newlog.read()
-newlog.close()
-
-newmsgs = xmlre.findall(newlogdoc)
-
-newmsgs.reverse()
-
-for msg in newmsgs:
- s = "%-11.11s %-5.5s %s\n" % (msg[1], msg[0], msg[2].replace('\n',''))
- output.write(s)
-
-skip = 0
-if old != None:
- for msg in oldmsgs:
- if skip == 1:
- s = "%-11.11s %-5.5s %s\n" % (msg[0], msg[1], msg[2])
- output.write(s)
- else:
- skip = 1
-
-output.close()
-
diff --git a/tools/Changelog/Changelog.sln b/tools/Changelog/Changelog.sln
deleted file mode 100644
index 1c4f46bce9..0000000000
--- a/tools/Changelog/Changelog.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Changelog", "Changelog.vcproj", "{05525588-A93C-4220-8C26-A93FBCE525BD}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Debug.ActiveCfg = Debug|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Debug.Build.0 = Debug|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Release.ActiveCfg = Release|Win32
- {05525588-A93C-4220-8C26-A93FBCE525BD}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/tools/Changelog/Changelog.vcproj b/tools/Changelog/Changelog.vcproj
deleted file mode 100644
index 7a61e5d402..0000000000
--- a/tools/Changelog/Changelog.vcproj
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="Changelog"
- ProjectGUID="{05525588-A93C-4220-8C26-A93FBCE525BD}"
- Keyword="Win32Proj">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../guilib/tinyxml"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
- BasicRuntimeChecks="3"
- RuntimeLibrary="5"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/Changelog.exe"
- LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/Changelog.pdb"
- SubSystem="1"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../guilib/tinyxml"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="4"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/Changelog.exe"
- LinkIncremental="1"
- GenerateDebugInformation="TRUE"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath=".\Changelog.cpp">
- </File>
- <File
- RelativePath="..\..\xbmc\utils\RegExp.cpp">
- </File>
- <File
- RelativePath=".\stdafx.cpp">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinystr.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxml.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxmlerror.cpp">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxmlparser.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath="..\..\xbmc\utils\RegExp.h">
- </File>
- <File
- RelativePath=".\stdafx.h">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinystr.h">
- </File>
- <File
- RelativePath="..\..\guilib\tinyXML\tinyxml.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
- <File
- RelativePath=".\ReadMe.txt">
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tools/Changelog/Makefile b/tools/Changelog/Makefile
deleted file mode 100644
index c2b5c94171..0000000000
--- a/tools/Changelog/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-Changelog: Changelog.cpp
- g++ -D_LINUX -I../../guilib/tinyXML -o Changelog Changelog.cpp ../../guilib/tinyXML/*.o ../../xbmc/utils/RegExp.o
diff --git a/tools/Changelog/stdafx.cpp b/tools/Changelog/stdafx.cpp
deleted file mode 100644
index 5cd322741d..0000000000
--- a/tools/Changelog/stdafx.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// stdafx.cpp : source file that includes just the standard includes
-// Changelog.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/tools/Changelog/stdafx.h b/tools/Changelog/stdafx.h
deleted file mode 100644
index 12f4e100cc..0000000000
--- a/tools/Changelog/stdafx.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005-2008 Team XBMC
- * http://www.xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-
-#include <iostream>
-#ifndef _LINUX
-#include <tchar.h>
-
-// TODO: reference additional headers your program requires here
-#include <windows.h>
-#endif