From cb07018bca0b5bbec1b3457d4aa2af5ff7837d5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 29 Jan 2016 21:40:39 +0100 Subject: [PATCH] Remove ChangeLog references from Makefile and .gitattribute --- .gitattributes | 1 - data/Makefile.am | 2 +- eglib/Makefile.am | 2 +- mcs/CodingStyle | 30 -- mcs/Makefile | 1 - mcs/class/Commons.Xml.Relaxng/Makefile | 2 - mcs/class/I18N/Makefile | 1 - .../Mainsoft.Web.Hosting/.gitattributes | 1 - .../Mainsoft.Web.Profile/.gitattributes | 1 - .../Mainsoft.Web.Security/.gitattributes | 1 - mcs/class/Mono.Data.Sqlite/Makefile | 1 - mcs/class/Mono.Directory.LDAP/.gitattributes | 1 - mcs/class/Mono.Security.Win32/Makefile | 2 +- mcs/class/System.Data/Makefile | 1 - .../Mono.Data.SqlExpressions/.gitattributes | 1 - .../System.DirectoryServices/.gitattributes | 1 - .../Test/DrawingTest/Test/.gitattributes | 1 - mcs/class/System.EnterpriseServices/Makefile | 2 - .../.gitattributes | 1 - .../Default/.gitattributes | 1 - .../Nice/.gitattributes | 1 - .../.gitattributes | 1 - .../.gitattributes | 1 - mcs/class/System.XML/Makefile | 15 +- mcs/class/System/Makefile | 1 - mcs/class/WindowsBase/.gitattributes | 1 - .../downloaded/.gitattributes | 1 - mcs/ilasm/Makefile | 3 - mcs/tools/pdb2mdb/.gitattributes | 1 - mono/arch/Makefile.am | 1 - mono/utils/Makefile.am | 2 +- scripts/commits-to-changelog.py | 287 ------------------ tools/monograph/Makefile.am | 1 - 33 files changed, 10 insertions(+), 360 deletions(-) delete mode 100755 scripts/commits-to-changelog.py diff --git a/.gitattributes b/.gitattributes index 5c4cb01ff15..3fbe928cd14 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,7 +9,6 @@ configure.ac crlf=input *.il crlf .gitattributes crlf -ChangeLog crlf *akefile* crlf *.sources crlf diff --git a/data/Makefile.am b/data/Makefile.am index b5b83fa69f1..8bd7f62a724 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -5,7 +5,7 @@ monolldbdir = $(libdir)/mono/lldb EXTRA_DIST = \ config.in \ - browscap.ini mono.supp mono.d README ChangeLog \ + browscap.ini mono.supp mono.d README \ mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \ mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \ mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\ diff --git a/eglib/Makefile.am b/eglib/Makefile.am index 84cc8353c99..c1121729bbf 100644 --- a/eglib/Makefile.am +++ b/eglib/Makefile.am @@ -16,4 +16,4 @@ endif endif endif -EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h +EXTRA_DIST = autogen.sh README NEWS AUTHORS winconfig.h diff --git a/mcs/CodingStyle b/mcs/CodingStyle index 6a3528e7c6a..9d2deb9122f 100644 --- a/mcs/CodingStyle +++ b/mcs/CodingStyle @@ -375,36 +375,6 @@ And examining the output. -* ChangeLogs - - ChangeLogs are the files that we use to track the project - history. ChangeLogs are found one per directory, or in small - projects, one per project. - - The format looks like this: - - 2004-11-19 Raja R Harinath - - * Makefile (%-profiles): Go through an intermediate - set of rules. Move body to ... - (profiles-do--%): ... this. - (profiles-do--run-test): Customized rule that usefully - runs with 'make -j' and 'make -k'. - (profiles-do--all, profile-do--%--all): Orchestrate - the bootstrap process. - - * file.cs (MainForm): Updated version. - - The date, author, email address in the first line. - - From that point on a list of changes in a file-by-file basis, - describing what changes were done. - - This information must be cut and pasted into your commit - message, so the information ends up in two places: in the - subversion repository metadata and also on the source code - distirbution (which does not have the Subversion metadata). - * Warnings Avoid commiting code with warnings to the repository, the use diff --git a/mcs/Makefile b/mcs/Makefile index f6127157641..e31193319f1 100644 --- a/mcs/Makefile +++ b/mcs/Makefile @@ -85,7 +85,6 @@ package := mcs-$(VERSION) DISTFILES = \ AUTHORS \ - ChangeLog \ COPYING \ COPYING.LIB \ INSTALL.txt \ diff --git a/mcs/class/Commons.Xml.Relaxng/Makefile b/mcs/class/Commons.Xml.Relaxng/Makefile index 88e3bfa6986..1bc0fd2f277 100644 --- a/mcs/class/Commons.Xml.Relaxng/Makefile +++ b/mcs/class/Commons.Xml.Relaxng/Makefile @@ -13,8 +13,6 @@ LIB_MCS_FLAGS = /r:$(corlib) \ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 EXTRA_DISTFILES = \ Commons.Xml.Relaxng.Rnc/RncParser.jay \ - Test/ChangeLog \ - Test/XmlFiles/ChangeLog \ $(wildcard Test/XmlFiles/*.rng) \ $(wildcard Test/XmlFiles/*.rnc) \ $(wildcard Test/XmlFiles/*.nvdl) \ diff --git a/mcs/class/I18N/Makefile b/mcs/class/I18N/Makefile index b7d4788608e..f27d56c2c5f 100644 --- a/mcs/class/I18N/Makefile +++ b/mcs/class/I18N/Makefile @@ -3,7 +3,6 @@ SUBDIRS = Common West MidEast Other Rare CJK include ../../build/rules.make DISTFILES = \ - Assembly/ChangeLog \ Assembly/AssemblyInfo.cs \ README \ README.mono \ diff --git a/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/.gitattributes b/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/.gitattributes index 6b4482bac76..2932b7b4b8a 100644 --- a/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/.gitattributes +++ b/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/.gitattributes @@ -4,7 +4,6 @@ /BaseFacesPageHandlerFactory.cs -crlf /BaseFacesStateManager.cs -crlf /BaseFacesViewHandler.cs -crlf -/ChangeLog -crlf /IExtendedViewHandler.cs -crlf /OutputStreamWrapper.cs -crlf /RequestParameterMap.cs -crlf diff --git a/mcs/class/Mainsoft.Web/Mainsoft.Web.Profile/.gitattributes b/mcs/class/Mainsoft.Web/Mainsoft.Web.Profile/.gitattributes index 9e4ea439ac6..4f3bf364d1b 100644 --- a/mcs/class/Mainsoft.Web/Mainsoft.Web.Profile/.gitattributes +++ b/mcs/class/Mainsoft.Web/Mainsoft.Web.Profile/.gitattributes @@ -1,4 +1,3 @@ -/ChangeLog -crlf /CloudscapeProfileProvider.cs -crlf /DerbyProfileHelper.cs -crlf /DerbyProfileProvider.cs -crlf diff --git a/mcs/class/Mainsoft.Web/Mainsoft.Web.Security/.gitattributes b/mcs/class/Mainsoft.Web/Mainsoft.Web.Security/.gitattributes index 43efedfcfae..dc336de8ef1 100644 --- a/mcs/class/Mainsoft.Web/Mainsoft.Web.Security/.gitattributes +++ b/mcs/class/Mainsoft.Web/Mainsoft.Web.Security/.gitattributes @@ -1,4 +1,3 @@ -/ChangeLog -crlf /CloudscapeMembershipProvider.cs -crlf /CloudscapeRoleProvider.cs -crlf /DerbyApplicationsHelper.cs -crlf diff --git a/mcs/class/Mono.Data.Sqlite/Makefile b/mcs/class/Mono.Data.Sqlite/Makefile index 6746daf26e6..a5453d47d27 100644 --- a/mcs/class/Mono.Data.Sqlite/Makefile +++ b/mcs/class/Mono.Data.Sqlite/Makefile @@ -19,7 +19,6 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) /nowarn:618 EXTRA_DISTFILES = Test/SqliteTest.cs \ Test/test.sql \ resources/SR.resx \ - resources/ChangeLog \ resources/DataTypes.xml \ resources/MetaDataCollections.xml \ $(PREBUILT) \ diff --git a/mcs/class/Mono.Directory.LDAP/.gitattributes b/mcs/class/Mono.Directory.LDAP/.gitattributes index 857147d9814..e69de29bb2d 100644 --- a/mcs/class/Mono.Directory.LDAP/.gitattributes +++ b/mcs/class/Mono.Directory.LDAP/.gitattributes @@ -1 +0,0 @@ -/ChangeLog -crlf diff --git a/mcs/class/Mono.Security.Win32/Makefile b/mcs/class/Mono.Security.Win32/Makefile index db182daf3e0..0797ae27094 100644 --- a/mcs/class/Mono.Security.Win32/Makefile +++ b/mcs/class/Mono.Security.Win32/Makefile @@ -4,7 +4,7 @@ include ../../build/rules.make LIBRARY = Mono.Security.Win32.dll LIB_MCS_FLAGS = /unsafe -EXTRA_DISTFILES = README Test/ChangeLog +EXTRA_DISTFILES = README ifneq (win32, $(PROFILE)) NO_TEST = yes diff --git a/mcs/class/System.Data/Makefile b/mcs/class/System.Data/Makefile index 7bc9ed64a03..99a6f3cde88 100644 --- a/mcs/class/System.Data/Makefile +++ b/mcs/class/System.Data/Makefile @@ -37,7 +37,6 @@ EXTRA_DISTFILES = \ $(wildcard Test/System.Data/*.xsd) \ $(wildcard Test/System.Xml/*.xml) \ $(wildcard Test/System.Xml/*.xsd) \ - Test/System.Data/schemas/ChangeLog \ $(wildcard Test/System.Data/schemas/*.xsd) \ app_test_net_4_x.config \ Test/System.Data/binserialize/*.bin \ diff --git a/mcs/class/System.Data/Test/Mono.Data.SqlExpressions/.gitattributes b/mcs/class/System.Data/Test/Mono.Data.SqlExpressions/.gitattributes index 6b8dedc7cf0..77a123a92d1 100644 --- a/mcs/class/System.Data/Test/Mono.Data.SqlExpressions/.gitattributes +++ b/mcs/class/System.Data/Test/Mono.Data.SqlExpressions/.gitattributes @@ -1,2 +1 @@ -/ChangeLog -crlf /DateComparisonTest.cs -crlf diff --git a/mcs/class/System.DirectoryServices/.gitattributes b/mcs/class/System.DirectoryServices/.gitattributes index e3ded8555b4..fece22d8b8f 100644 --- a/mcs/class/System.DirectoryServices/.gitattributes +++ b/mcs/class/System.DirectoryServices/.gitattributes @@ -1,4 +1,3 @@ /App.config -crlf -/ChangeLog -crlf /Secure.config -crlf /makefile.build -crlf diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/.gitattributes b/mcs/class/System.Drawing/Test/DrawingTest/Test/.gitattributes index 729d878e809..b7c3075b756 100644 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/.gitattributes +++ b/mcs/class/System.Drawing/Test/DrawingTest/Test/.gitattributes @@ -2,7 +2,6 @@ /Bitmap.cs -crlf /Brush.cs -crlf /Brushes.cs -crlf -/ChangeLog -crlf /Colors.cs -crlf /Enums.cs -crlf /Graphics.cs -crlf diff --git a/mcs/class/System.EnterpriseServices/Makefile b/mcs/class/System.EnterpriseServices/Makefile index 16a03ec702a..f0eac39bcdf 100644 --- a/mcs/class/System.EnterpriseServices/Makefile +++ b/mcs/class/System.EnterpriseServices/Makefile @@ -7,6 +7,4 @@ LIB_REFS = System.Transactions LIB_MCS_FLAGS = /nowarn:0168 /nowarn:0162 /r:$(corlib) NO_TEST = yes -EXTRA_DISTFILES = System.EnterpriseServices.Internal/ChangeLog - include ../../build/library.make diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/.gitattributes b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/.gitattributes index 23f7a31fe2e..fbce3a89035 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/.gitattributes +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/.gitattributes @@ -1,4 +1,3 @@ -/ChangeLog -crlf /ThemeElements.cs -crlf /ThemeElementsClearlooks.cs -crlf /ThemeElementsDefault.cs -crlf diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/.gitattributes b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/.gitattributes index cea6846f7b4..26a498d4448 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/.gitattributes +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/.gitattributes @@ -1,5 +1,4 @@ /ButtonPainter.cs -crlf -/ChangeLog -crlf /CheckBoxPainter.cs -crlf /RadioButtonPainter.cs -crlf /TabControlPainter.cs -crlf diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Nice/.gitattributes b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Nice/.gitattributes index a52b3ec83ca..344014718ba 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Nice/.gitattributes +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Nice/.gitattributes @@ -1,2 +1 @@ -/ChangeLog -crlf /TabControlPainter.cs -crlf diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.WebBrowserDialogs/.gitattributes b/mcs/class/System.Windows.Forms/System.Windows.Forms.WebBrowserDialogs/.gitattributes index 922c53b14f3..da9eacb25ee 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms.WebBrowserDialogs/.gitattributes +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.WebBrowserDialogs/.gitattributes @@ -1,5 +1,4 @@ /AlertCheck.cs -crlf -/ChangeLog -crlf /ConfirmCheck.cs -crlf /Generic.cs -crlf /Prompt.cs -crlf diff --git a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms.Layout/.gitattributes b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms.Layout/.gitattributes index 857147d9814..e69de29bb2d 100644 --- a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms.Layout/.gitattributes +++ b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms.Layout/.gitattributes @@ -1 +0,0 @@ -/ChangeLog -crlf diff --git a/mcs/class/System.XML/Makefile b/mcs/class/System.XML/Makefile index 9fd6276bcea..7ced04ee85e 100644 --- a/mcs/class/System.XML/Makefile +++ b/mcs/class/System.XML/Makefile @@ -36,20 +36,18 @@ endif LOCAL_MCS_FLAGS += -lib:$(bare_libdir) nist_dom_files = \ - ChangeLog ITest.cs readme.txt util.cs \ - fundamental/ChangeLog \ - files/ChangeLog files/noDTDXMLfile.xml files/otherDoc.xml files/staff.dtd files/staff.html files/staff.xml + ITest.cs readme.txt util.cs \ + files/noDTDXMLfile.xml files/otherDoc.xml files/staff.dtd files/staff.html files/staff.xml xmlfiles_files = \ - ChangeLog nested-included.dtd literal-data.xml nested-dtd-test.dtd nested-dtd-test.xml simple.xml \ - xsl/ChangeLog xsl/empty.xsl \ - XsdValidation/ChangeLog XsdValidation/1.xsd XsdValidation/2.xsd XsdValidation/3.xsd XsdValidation/4.xsd \ - xsd/ChangeLog xsd/1.xsd xsd/2.xsd xsd/3.xsd xsd/4.xsd xsd/5.xsd xsd/6.xsd xsd/xml.xsd xsd/81360.xsd xsd/81360inc1.xsd xsd/81360inc2.xsd + nested-included.dtd literal-data.xml nested-dtd-test.dtd nested-dtd-test.xml simple.xml \ + xsl/empty.xsl \ + XsdValidation/1.xsd XsdValidation/2.xsd XsdValidation/3.xsd XsdValidation/4.xsd \ + xsd/1.xsd xsd/2.xsd xsd/3.xsd xsd/4.xsd xsd/5.xsd xsd/6.xsd xsd/xml.xsd xsd/81360.xsd xsd/81360inc1.xsd xsd/81360inc2.xsd EXTRA_DISTFILES = \ $(wildcard System.Xml.Serialization/standalone_tests/*.cs) \ $(wildcard System.Xml.Serialization/standalone_tests/*.output) \ - Test/ChangeLog \ Test/Microsoft.Test.csproj \ Test/Mono.Test.csproj \ Test/MonoMicro.Test.csproj \ @@ -62,7 +60,6 @@ EXTRA_DISTFILES = \ $(wildcard Test/XmlFiles/xsl/*.xml) \ $(wildcard Test/XmlFiles/xsl/*.xsl) \ Test/XmlFiles/xsl/current-in-select.ref \ - Test/XmlFiles/xsl/ChangeLog \ $(xmlfiles_files:%=Test/XmlFiles/%) \ $(nist_dom_files:%=Test/System.Xml/nist_dom/%) diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile index 9fcb2397d1c..392e8c0651a 100644 --- a/mcs/class/System/Makefile +++ b/mcs/class/System/Makefile @@ -73,7 +73,6 @@ endif EXTRA_DISTFILES = \ Test/test-config-file \ Test/test-config-file-net-2.0 \ - Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog \ Test/System.Security.Cryptography.X509Certificates/pkits/Makefile \ Test/System.Security.Cryptography.X509Certificates/pkits/README \ Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs \ diff --git a/mcs/class/WindowsBase/.gitattributes b/mcs/class/WindowsBase/.gitattributes index 857147d9814..e69de29bb2d 100644 --- a/mcs/class/WindowsBase/.gitattributes +++ b/mcs/class/WindowsBase/.gitattributes @@ -1 +0,0 @@ -/ChangeLog -crlf diff --git a/mcs/class/corlib/Mono.Globalization.Unicode/downloaded/.gitattributes b/mcs/class/corlib/Mono.Globalization.Unicode/downloaded/.gitattributes index 857147d9814..e69de29bb2d 100644 --- a/mcs/class/corlib/Mono.Globalization.Unicode/downloaded/.gitattributes +++ b/mcs/class/corlib/Mono.Globalization.Unicode/downloaded/.gitattributes @@ -1 +0,0 @@ -/ChangeLog -crlf diff --git a/mcs/ilasm/Makefile b/mcs/ilasm/Makefile index 43cee29c15b..6b24d0d0536 100644 --- a/mcs/ilasm/Makefile +++ b/mcs/ilasm/Makefile @@ -10,9 +10,6 @@ CLEAN_FILES = parser/y.output EXTRA_DISTFILES = \ parser/ILParser.jay \ - parser/ChangeLog \ - scanner/ChangeLog \ - tests/ChangeLog \ $(wildcard tests/*.il) ILParser.cs: parser/ILParser.jay $(topdir)/jay/skeleton.cs diff --git a/mcs/tools/pdb2mdb/.gitattributes b/mcs/tools/pdb2mdb/.gitattributes index 857147d9814..e69de29bb2d 100644 --- a/mcs/tools/pdb2mdb/.gitattributes +++ b/mcs/tools/pdb2mdb/.gitattributes @@ -1 +0,0 @@ -/ChangeLog -crlf diff --git a/mono/arch/Makefile.am b/mono/arch/Makefile.am index 87416872f6e..5612361402d 100644 --- a/mono/arch/Makefile.am +++ b/mono/arch/Makefile.am @@ -7,5 +7,4 @@ if ARM SUBDIRS = $(arch_target) endif -EXTRA_DIST = ChangeLog diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am index c608c582b55..b62633307b4 100644 --- a/mono/utils/Makefile.am +++ b/mono/utils/Makefile.am @@ -230,4 +230,4 @@ libmonoutilsinclude_HEADERS = \ mono-dl-fallback.h \ mono-counters.h -EXTRA_DIST = ChangeLog mono-embed.h mono-embed.c +EXTRA_DIST = mono-embed.h mono-embed.c diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py deleted file mode 100755 index 6181c751ca9..00000000000 --- a/scripts/commits-to-changelog.py +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/python - -from __future__ import print_function -from optparse import OptionParser -import subprocess -import re -import os.path -import fnmatch -import os -import sys - -# subtract 8 for the leading tabstop -fill_column = 74 - 8 - -path_to_root = None - -all_changelogs = {} - -def git (command, *args): - popen = subprocess.Popen (["git", command] + list (args), stdout = subprocess.PIPE) - output = popen.communicate () [0] - if popen.returncode != 0: - print ("Error: git failed", file=sys.stderr) - exit (1) - return output - -def changelog_path (changelog): - global path_to_root - if not path_to_root: - path_to_root = git ("rev-parse", "--show-cdup").strip () - (pathname, filename) = changelog - return path_to_root + "./" + pathname + "/" + filename - -def changelog_for_file (filename): - while filename != "": - dirname = os.path.dirname (filename) - if dirname in all_changelogs: - return (dirname, all_changelogs [dirname]) - filename = dirname - assert False - -def changelogs_for_file_pattern (pattern, changed_files): - changelogs = set () - for filename in changed_files: - suffix = filename - while suffix != "": - # FIXME: fnmatch doesn't support the {x,y} pattern - if fnmatch.fnmatch (suffix, pattern): - changelogs.add (changelog_for_file (filename)) - (_, _, suffix) = suffix.partition ("/") - return changelogs - -def format_paragraph (paragraph): - lines = [] - words = paragraph.split () - if len (words) == 0: - return lines - current = words [0] - for word in words [1:]: - if len (current) + 1 + len (word) <= fill_column: - current += " " + word - else: - lines.append ("\t" + current) - current = word - lines.append ("\t" + current) - return lines - -def format_changelog_paragraph (files, paragraph): - files_string = "" - for (filename, entity) in files: - if len (files_string) > 0: - files_string += ", " - files_string += filename - if entity: - files_string += " (" + entity + ")" - return format_paragraph ("* " + files_string + ": " + paragraph) - -def append_paragraph (lines, paragraph): - if len (lines): - lines.append ("") - lines += paragraph - -def format_changelog_entries (commit, changed_files, prefix, file_entries, all_paragraphs): - changelogs = set () - for f in changed_files: - changelogs.add (changelog_for_file (f)) - marked_changelogs = set () - - author_line = git ("log", "-n1", "--date=short", "--format=%ad %an <%ae>", commit).strip () - - paragraphs = {} - for changelog in changelogs: - paragraphs [changelog] = [author_line] - - for (files, comments) in file_entries: - changelog_entries = {} - for (filename, entity) in files: - entry_changelogs = changelogs_for_file_pattern (filename, changed_files) - if len (entry_changelogs) == 0: - print ("Warning: could not match file {0} in commit {1}".format (filename, commit)) - for changelog in entry_changelogs: - if changelog not in changelog_entries: - changelog_entries [changelog] = [] - changelog_entries [changelog].append ((filename, entity)) - marked_changelogs.add (changelog) - - for (changelog, files) in changelog_entries.items (): - append_paragraph (paragraphs [changelog], format_changelog_paragraph (files, comments [0])) - for paragraph in comments [1:]: - append_paragraph (paragraphs [changelog], format_paragraph (paragraph)) - - unmarked_changelogs = changelogs - marked_changelogs - for changelog in unmarked_changelogs: - if len (prefix) == 0: - print ("Warning: empty entry in {0} for commit {1}".format (changelog_path (changelog), commit)) - insert_paragraphs = all_paragraphs - else: - insert_paragraphs = prefix - for paragraph in insert_paragraphs: - append_paragraph (paragraphs [changelog], format_paragraph (paragraph)) - - return paragraphs - -def debug_print_commit (commit, raw_message, prefix, file_entries, changed_files, changelog_entries): - print ("===================== Commit") - print (commit) - print ("--------------------- RAW") - print (raw_message) - print ("--------------------- Prefix") - for line in prefix: - print (line) - print ("--------------------- File entries") - for (files, comments) in file_entries: - files_str = "" - for (filename, entity) in files: - if len (files_str): - files_str = files_str + ", " - files_str = files_str + filename - if entity: - files_str = files_str + " (" + entity + ")" - print files_str - for line in comments: - print (" " + line) - print ("--------------------- Files touched") - for f in changed_files: - print (f) - print ("--------------------- ChangeLog entries") - for ((dirname, filename), lines) in changelog_entries.items (): - print ("{0}/{1}:".format (dirname, filename)) - for line in lines: - print (line) - -def process_commit (commit): - changed_files = map (lambda l: l.split () [2], git ("diff-tree", "--numstat", commit).splitlines () [1:]) - if len (filter (lambda f: re.search ("(^|/)Change[Ll]og$", f), changed_files)): - return None - raw_message = git ("log", "-n1", "--format=%B", commit) - # filter SVN migration message - message = re.sub ("(^|\n)svn path=[^\n]+revision=\d+(?=$|\n)", "", raw_message) - # filter ChangeLog headers - message = re.sub ("(^|\n)\d+-\d+-\d+[ \t]+((\w|[.-])+[ \t]+)+<[^\n>]+>(?=$|\n)", "", message) - # filter leading whitespace - message = re.sub ("^\s+", "", message) - # filter trailing whitespace - message = re.sub ("\s+$", "", message) - # paragraphize - first remove whitespace at beginnings and ends of lines - message = re.sub ("[ \t]*\n[ \t]*", "\n", message) - # paragraphize - now replace three or more consecutive newlines with two - message = re.sub ("\n\n\n+", "\n\n", message) - # paragraphize - replace single newlines with a space - message = re.sub ("(?" - parser = OptionParser (usage) - parser.add_option ("-r", "--root", dest = "root", help = "Root directory of the working tree to be changed") - (options, args) = parser.parse_args () - if len (args) != 1: - parser.error ("incorrect number of arguments") - start_commit = args [0] - - if options.root: - global path_to_root - path_to_root = options.root + "/" - - # MonkeyWrench uses a shared git repo but sets BUILD_REVISION, - # if present we use it instead of HEAD - HEAD = "HEAD" - if 'BUILD_REVISION' in os.environ: - HEAD = os.environ['BUILD_REVISION'] - - #see if git supports %B in --format - output = git ("log", "-n1", "--format=%B", HEAD) - if output.startswith ("%B"): - print ("Error: git doesn't support %B in --format - install version 1.7.2 or newer", file=sys.stderr) - exit (1) - - for filename in git ("ls-tree", "-r", "--name-only", HEAD).splitlines (): - if re.search ("(^|/)Change[Ll]og$", filename): - (path, name) = os.path.split (filename) - all_changelogs [path] = name - - commits = git ("rev-list", "--no-merges", HEAD, "^{0}".format (start_commit)).splitlines () - - touched_changelogs = {} - for commit in commits: - entries = process_commit (commit) - if entries == None: - continue - for (changelog, lines) in entries.items (): - if not os.path.exists (changelog_path (changelog)): - continue - if changelog not in touched_changelogs: - touched_changelogs [changelog] = start_changelog (changelog) - append_lines (touched_changelogs [changelog], lines) - for (changelog, file) in touched_changelogs.items (): - finish_changelog (changelog, file) - -if __name__ == "__main__": - main () diff --git a/tools/monograph/Makefile.am b/tools/monograph/Makefile.am index c2b1aa45095..123d63d2fb1 100644 --- a/tools/monograph/Makefile.am +++ b/tools/monograph/Makefile.am @@ -56,5 +56,4 @@ graphs: $(OUT) ./monograph -n -o $*.png corlib.dll $* convert -geometry '480x360>' $*.png $*.jpeg -EXTRA_DIST = ChangeLog -- 2.25.1