From 2f777ae867bcb4e3bfdab6e8732518ec2e7c5513 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sat, 28 Nov 2015 15:15:08 -0500 Subject: [PATCH] few more patterns --- commitmessage.py | 6 ++++++ docs.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/commitmessage.py b/commitmessage.py index 26a8717..a593181 100644 --- a/commitmessage.py +++ b/commitmessage.py @@ -96,6 +96,12 @@ def process_NEWS(file): if news[i].find(config.old_version) >= 0 and news[i].find("*** Changes in ") >= 0 and news[i - 1] == "": stop = i - 1 success = 1 + if news[i].find(config.old_version) >= 0 and news[i].find("201") >= 0 and news[i - 1] == "": + stop = i - 1 + success = 1 + if news[i].lower().find(tarball.name + " " + config.old_version) >= 0 and news[i - 1] == "": + stop = i - 1 + success = 1 if news[i].find(config.old_version) >= 0 and news[i].find("Version ") >= 0 and news[i - 1] == "": stop = i - 1 success = 1 diff --git a/docs.py b/docs.py index 9c62b1e..3e77636 100644 --- a/docs.py +++ b/docs.py @@ -22,6 +22,7 @@ import shutil import sys transforms = { + 'changes': 'ChangeLog', 'changelog.txt': 'ChangeLog', 'changelog': 'ChangeLog', 'changes.rst': 'ChangeLog', @@ -33,7 +34,7 @@ interests = transforms.keys() def scan_for_changes(download_path, dir): found = [] - for dirpath, dirnames, files in os.walk(dir): + for dirpath, dirnames, files in os.walk(dir, topdown=False): hits = [x for x in files if x.lower() in interests and x.lower() not in found] for item in hits: