SERVER-59476: Allow for commit messages reverting wiredtiger imports

(cherry picked from commit 44ecd94334)
(cherry picked from commit 305a7571c8)
This commit is contained in:
David Bradford
2021-08-20 14:59:53 -04:00
committed by Evergreen Agent
parent b589595b1a
commit fc1151a689
2 changed files with 9 additions and 1 deletions

View File

@@ -47,6 +47,9 @@ COMMON_LINT_PATTERN = r'(?P<lint>Fix\slint)'
COMMON_IMPORT_PATTERN = r'(?P<imported>Import\s(wiredtiger|tools):\s.*)'
"""Common Import pattern format."""
COMMON_REVERT_IMPORT_PATTERN = r'Revert\s+[\"\']?(?P<imported>Import\s(wiredtiger|tools):\s.*)'
"""Common revert Import pattern format."""
COMMON_PRIVATE_PATTERN = r'''
((?P<revert>Revert)\s+[\"\']?)? # Revert (optional)
((?P<ticket>[A-Z]+-[0-9]+)[\"\']?\s*) # ticket identifier
@@ -100,6 +103,10 @@ VALID_PATTERNS = [
re.compile(old_patch_description(COMMON_LINT_PATTERN), re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(new_patch_description(COMMON_IMPORT_PATTERN), re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(old_patch_description(COMMON_IMPORT_PATTERN), re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(
new_patch_description(COMMON_REVERT_IMPORT_PATTERN), re.MULTILINE | re.DOTALL | re.VERBOSE),
re.compile(
old_patch_description(COMMON_REVERT_IMPORT_PATTERN), re.MULTILINE | re.DOTALL | re.VERBOSE),
]
"""valid public patterns."""