]> git.proxmox.com Git - ovs.git/commitdiff
checkpatch: Don't allow Gerrit Change-Ids.
authorIlya Maximets <i.maximets@samsung.com>
Fri, 14 Jul 2017 10:57:21 +0000 (13:57 +0300)
committerRussell Bryant <russell@ovn.org>
Wed, 26 Jul 2017 20:41:58 +0000 (16:41 -0400)
Local Gerrit Change-Ids are not welcome in common repository.
Inspired by checkpatch.pl from Linux Kernel.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
utilities/checkpatch.py

index 65d188d607f1bc11f84c2f244e7252ef7dc90af7..fe266ac50cf47144ec3327f1c73a2cddd8508bf1 100755 (executable)
@@ -320,6 +320,8 @@ def ovs_checkpatch_parse(text, filename):
                               re.I | re.M | re.S)
     is_co_author = re.compile(r'(\s*(Co-authored-by: )(.*))$',
                               re.I | re.M | re.S)
+    is_gerrit_change_id = re.compile(r'(\s*(change-id: )(.*))$',
+                                     re.I | re.M | re.S)
 
     for line in text.split('\n'):
         if current_file != previous_file:
@@ -357,6 +359,10 @@ def ovs_checkpatch_parse(text, filename):
             elif is_co_author.match(line):
                 m = is_co_author.match(line)
                 co_authors.append(m.group(3))
+            elif is_gerrit_change_id.match(line):
+                print_error(
+                    "Remove Gerrit Change-Id's before submitting upstream.")
+                print("%d: %s\n" % (lineno, line))
         elif parse == 2:
             newfile = hunks.match(line)
             if newfile: