From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id 784DE39540E8; Sat, 22 Aug 2020 21:35:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 784DE39540E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598132108; bh=v9boSJy39+pRDxu7vzBY6fLDNjndCx3GsQosEHMjdbI=; h=From:To:Subject:Date:From; b=XTMY0ZYVuwjFOJiR/OrC/ypo3TFEfiYbsIHB1KwaMHsvHI4+esQFdXqUJxL0lu49N 1q8vwwByCavm75+oZysDV/leKdwN5OObssJnWrjMrxl5iaADBpM36LZtTd1paAUjbA rXE024K5aPPh51DGZ0N+eGbl4vil78piWoWuorME= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/autopar_devel] Allow ChangeLog entries for ignored location. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/devel/autopar_devel X-Git-Oldrev: 7e8eccad127be7150f856fe44f82c7151753ce72 X-Git-Newrev: 6599701321512d26c92446ed40ea6fa12af8d6c7 Message-Id: <20200822213508.784DE39540E8@sourceware.org> Date: Sat, 22 Aug 2020 21:35:08 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2020 21:35:08 -0000 https://gcc.gnu.org/g:6599701321512d26c92446ed40ea6fa12af8d6c7 commit 6599701321512d26c92446ed40ea6fa12af8d6c7 Author: Martin Liska Date: Tue May 26 09:01:41 2020 +0200 Allow ChangeLog entries for ignored location. We should be able to generate ChangeLog entries for commits like b3d566f570f4416299240b51654b70c74f6cba6a. I'm going to install the patch. contrib/ChangeLog: * gcc-changelog/git_commit.py: Parse changelog entries for ignored locations. * gcc-changelog/test_email.py: Add new test for it. * gcc-changelog/test_patches.txt: Likewise. Diff: --- contrib/gcc-changelog/git_commit.py | 16 +++++++++----- contrib/gcc-changelog/test_email.py | 5 +++++ contrib/gcc-changelog/test_patches.txt | 40 ++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 2cfdbc83d09..edd8834b898 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -233,8 +233,9 @@ 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 self.in_ignored_location(f[0])] + or f[0] in misc_files] + ignored_files = [f for f in self.modified_files + if self.in_ignored_location(f[0])] if len(project_files) == len(self.modified_files): # All modified files are only MISC files return @@ -244,7 +245,9 @@ class GitCommit: 'separately from normal commits')) return - self.parse_lines() + all_are_ignored = (len(project_files) + len(ignored_files) + == len(self.modified_files)) + self.parse_lines(all_are_ignored) if self.changes: self.parse_changelog() self.deduce_changelog_locations() @@ -292,7 +295,7 @@ class GitCommit: modified_files.append((parts[2], 'A')) return modified_files - def parse_lines(self): + def parse_lines(self, all_are_ignored): body = self.lines for i, b in enumerate(body): @@ -303,8 +306,9 @@ class GitCommit: or dr_regex.match(b) or author_line_regex.match(b)): self.changes = body[i:] return - self.errors.append(Error('cannot find a ChangeLog location in ' - 'message')) + if not all_are_ignored: + self.errors.append(Error('cannot find a ChangeLog location in ' + 'message')) def parse_changelog(self): last_entry = None diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index aa516c6e6d1..bf028a3d40a 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -280,3 +280,8 @@ class TestGccChangelog(unittest.TestCase): def test_changes_only_in_ignored_location(self): email = self.from_patch_glob('0001-go-in-ignored-location.patch') assert not email.errors + + def test_changelog_for_ignored_location(self): + email = self.from_patch_glob('0001-Update-merge.sh-to-reflect.patch') + assert (email.changelog_entries[0].lines[0] + == '\t* LOCAL_PATCHES: Use git hash instead of SVN id.') diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt index 58fd81c85c9..84d4b81d818 100644 --- a/contrib/gcc-changelog/test_patches.txt +++ b/contrib/gcc-changelog/test_patches.txt @@ -2611,3 +2611,43 @@ index 00000000000..2609cc49ae7 -- 2.27.0.rc0.183.gde8f92d652-goog +=== 0001-Update-merge.sh-to-reflect.patch === +From b3d566f570f4416299240b51654b70c74f6cba6a Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 25 May 2020 20:55:29 +0200 +Subject: [PATCH] Update merge.sh to reflect usage of git. + +After switching to GIT, we should use it in libsanitizer +merge script. I'll do merge from master as soon as +PR95311 gets fixed. + +I'm going to install the patch. + +libsanitizer/ChangeLog: + + * LOCAL_PATCHES: Use git hash instead of SVN id. + * merge.sh: Use git instead of VCS. Update paths + relative to upstream git repository. +--- + libsanitizer/LOCAL_PATCHES | 2 +- + libsanitizer/merge.sh | 10 ++++------ + 2 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/libsanitizer/LOCAL_PATCHES b/libsanitizer/LOCAL_PATCHES +index 292b7a6e489..7732de3d436 100644 +--- a/libsanitizer/LOCAL_PATCHES ++++ b/libsanitizer/LOCAL_PATCHES +@@ -1 +1,2 @@ + ++ +diff --git a/libsanitizer/merge.sh b/libsanitizer/merge.sh +index dfa7bf3d196..3f4f1629a22 100755 +--- a/libsanitizer/merge.sh ++++ b/libsanitizer/merge.sh +@@ -1 +1,2 @@ + ++ + +-- +2.26.2 +