[Python-checkins] cpython (2.7): Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.

terry.reedy python-checkins at python.org
Mon Jul 22 03:14:59 CEST 2013


http://hg.python.org/cpython/rev/13950a33f889
changeset:   84775:13950a33f889
branch:      2.7
parent:      84772:23b0164b9c82
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sun Jul 21 20:57:44 2013 -0400
summary:
  Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.

files:
  Misc/NEWS                   |   2 ++
  Tools/scripts/patchcheck.py |  11 ++++++-----
  2 files changed, 8 insertions(+), 5 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -137,6 +137,8 @@
 - Issue #17844: Refactor a documentation of Python specific encodings.
   Add links to encoders and decoders for binary-to-binary codecs.
 
+- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
+
 
 What's New in Python 2.7.5?
 ===========================
diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -144,13 +144,13 @@
 @status("Misc/ACKS updated", modal=True)
 def credit_given(file_paths):
     """Check if Misc/ACKS has been changed."""
-    return 'Misc/ACKS' in file_paths
+    return os.path.join('Misc', 'ACKS') in file_paths
 
 
 @status("Misc/NEWS updated", modal=True)
 def reported_news(file_paths):
     """Check if Misc/NEWS has been changed."""
-    return 'Misc/NEWS' in file_paths
+    return os.path.join('Misc', 'NEWS') in file_paths
 
 
 def main():
@@ -158,7 +158,8 @@
     python_files = [fn for fn in file_paths if fn.endswith('.py')]
     c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
     doc_files = [fn for fn in file_paths if fn.startswith('Doc')]
-    special_files = {'Misc/ACKS', 'Misc/NEWS'} & set(file_paths)
+    misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
+            & set(file_paths)
     # PEP 8 whitespace rules enforcement.
     normalize_whitespace(python_files)
     # C rules enforcement.
@@ -168,9 +169,9 @@
     # Docs updated.
     docs_modified(doc_files)
     # Misc/ACKS changed.
-    credit_given(special_files)
+    credit_given(misc_files)
     # Misc/NEWS changed.
-    reported_news(special_files)
+    reported_news(misc_files)
 
     # Test suite run and passed.
     if python_files or c_files:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list