contrib: Improve comments and error text

Message ID 20200601173024.GA3767841@redhat.com
State New
Headers show
Series
  • contrib: Improve comments and error text
Related show

Commit Message

Jakub Jelinek via Gcc-patches June 1, 2020, 5:30 p.m.
* gcc-changelog/git_commit.py (GitCommit.check_mentioned_files):
	Improve error text.

OK for master?
commit b0eb103fc6a8b12905ce8feea299e02048b7f820
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Jun 1 18:28:35 2020 +0100

    contrib: Improve comments and error text
    
            * gcc-changelog/git_commit.py (GitCommit.check_mentioned_files):
            Improve error text.

Comments

Martin Liška June 2, 2020, 6:39 a.m. | #1
On 6/1/20 7:30 PM, Jonathan Wakely wrote:
> 	* gcc-changelog/git_commit.py (GitCommit.check_mentioned_files):

> 	Improve error text.

> 

> OK for master?

> 


Yes, I've just pushed the patch with your authorship.

Martin

Patch

diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 4f82b58f64b..7fbc029408d 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -176,7 +176,7 @@  class Error:
 class ChangeLogEntry:
     def __init__(self, folder, authors, prs):
         self.folder = folder
-        # Python2 has not 'copy' function
+        # The 'list.copy()' function is not available before Python 3.3
         self.author_lines = list(authors)
         self.initial_prs = list(prs)
         self.prs = list(prs)
@@ -209,7 +209,7 @@  class ChangeLogEntry:
                     line = line[:line.index(':')]
                     in_location = False
 
-                # At this point, all that 's left is a list of filenames
+                # At this point, all that's left is a list of filenames
                 # separated by commas and whitespaces.
                 for file in line.split(','):
                     file = file.strip()
@@ -503,7 +503,7 @@  class GitCommit:
         mentioned_files = set()
         for entry in self.changelog_entries:
             if not entry.files:
-                msg = 'ChangeLog must contain a file entry'
+                msg = 'ChangeLog must contain at least one file entry'
                 self.errors.append(Error(msg, entry.folder))
             assert not entry.folder.endswith('/')
             for file in entry.files: