Allow only ignored files in ChangeLog entries.
authorMartin Liska <mliska@suse.cz>
Mon, 25 May 2020 07:49:09 +0000 (09:49 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 25 May 2020 07:49:54 +0000 (09:49 +0200)
* gcc-changelog/git_commit.py: Add trailing '/'
for libdruntime.  Allow empty changelog for
only ignored files.
* gcc-changelog/test_email.py: New test for go
patch in ignored location.
* gcc-changelog/test_patches.txt: Add test.

contrib/ChangeLog
contrib/gcc-changelog/git_commit.py
contrib/gcc-changelog/test_email.py
contrib/gcc-changelog/test_patches.txt

index 64a0db18e58ffd16951d5bb64d9ff48bd3d59cae..8d3e2929d6a6f25a7655bfc71fc63aff2b6e6f10 100644 (file)
@@ -1,3 +1,12 @@
+2020-05-25  Martin Liska  <mliska@suse.cz>
+
+       * gcc-changelog/git_commit.py: Add trailing '/'
+       for libdruntime.  Allow empty changelog for
+       only ignored files.
+       * gcc-changelog/test_email.py: New test for go
+       patch in ignored location.
+       * gcc-changelog/test_patches.txt: Add test.
+
 2020-05-22  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc-changelog/git_commit.py: Add trailing / to
index 8c5fa2c0fc935d9fab8466f059fcf81a2539960d..2cfdbc83d096441f818409e36d9ecc16379d61aa 100755 (executable)
@@ -130,7 +130,7 @@ ignored_prefixes = [
     'gcc/go/gofrontend/',
     'gcc/testsuite/go.test/test/',
     'libgo/',
-    'libphobos/libdruntime',
+    'libphobos/libdruntime/',
     'libphobos/src/',
     'libsanitizer/',
     ]
@@ -233,7 +233,8 @@ class GitCommit:
 
         project_files = [f for f in self.modified_files
                          if self.is_changelog_filename(f[0])
-                         or f[0] in misc_files]
+                         or f[0] in misc_files
+                         or self.in_ignored_location(f[0])]
         if len(project_files) == len(self.modified_files):
             # All modified files are only MISC files
             return
index d522e6ef7e301e08edf13269b84f5943015c5502..aa516c6e6d11cfb0f52710108f29d421f6f18e3e 100755 (executable)
@@ -276,3 +276,7 @@ class TestGccChangelog(unittest.TestCase):
     def test_dr_entry(self):
         email = self.from_patch_glob('0001-c-C-20-DR-2237.patch')
         assert email.changelog_entries[0].prs == ['DR 2237']
+
+    def test_changes_only_in_ignored_location(self):
+        email = self.from_patch_glob('0001-go-in-ignored-location.patch')
+        assert not email.errors
index 3445c3d9f117c64db77714580d8980aa17981e01..58fd81c85c99a6b0dfdd2bd28a24a7090d4ea477 100644 (file)
@@ -2568,3 +2568,46 @@ index a6a5d975af3..a8082d39aca 100644
 @@ -1 +1,2 @@
 
 +
+
+=== 0001-go-in-ignored-location.patch ===
+From 81994eab700da7fea6644541c163aa0f0f3b8cf1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot.c@gmail.com>
+Date: Tue, 19 May 2020 16:03:54 +0200
+Subject: libgo: update x/sys/cpu after gccgo support added
+
+Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234597
+---
+ gcc/go/gofrontend/MERGE                       |  2 +-
+ .../sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go}  |  2 +-
+ .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 27 +++++++++++++++++++
+ 3 files changed, 29 insertions(+), 2 deletions(-)
+ rename libgo/go/golang.org/x/sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go} (96%)
+ create mode 100644 libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+
+diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
+index bc9c1f07eda..284374820b0 100644
+--- a/gcc/go/gofrontend/MERGE
++++ b/gcc/go/gofrontend/MERGE
+@@ -1 +1,2 @@
+
++
+diff --git a/libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go b/libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+similarity index 96%
+rename from libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go
+rename to libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+index b0ede112d4e..02d03129e50 100644
+--- a/libgo/go/golang.org/x/sys/cpu/cpu_aix_ppc64.go
++++ b/libgo/go/golang.org/x/sys/cpu/cpu_aix.go
+@@ -1 +1,2 @@
+
++
+diff --git a/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+new file mode 100644
+index 00000000000..2609cc49ae7
+--- /dev/null
++++ b/libgo/go/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+@@ -0,0 +1 @@
++
+
+-- 
+2.27.0.rc0.183.gde8f92d652-goog