diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-01-31 15:11:50 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-31 04:40:07 +0000 |
commit | 45d65c6733bdf9703ac818b7f0d8c4d4b6548372 (patch) | |
tree | 4b86117a9e4ab512c0bdf7ed7541e4e087e0d283 | |
parent | 1733e9fc7f2a2327522dfbd85a83777030b49b9b (diff) | |
download | mongo-45d65c6733bdf9703ac818b7f0d8c4d4b6548372.tar.gz |
Import wiredtiger: 5a05d846966df259cf48567f09b2b7632e394319 from branch mongodb-master
ref: a28f4bb045..5a05d84696
for: 5.3.0
WT-7195 Remove non-ASCII input and paired typos in any source file
12 files changed, 26 insertions, 37 deletions
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen/__init__.py b/src/third_party/wiredtiger/bench/workgen/workgen/__init__.py index 4c7fa829ce9..8d397cc55a5 100644 --- a/src/third_party/wiredtiger/bench/workgen/workgen/__init__.py +++ b/src/third_party/wiredtiger/bench/workgen/workgen/__init__.py @@ -31,7 +31,7 @@ # import os, sys -# After importing the SWIG-generated file, copy all symbols from from it +# After importing the SWIG-generated file, copy all symbols from it # to this module so they will appear in the workgen namespace. me = sys.modules[__name__] sys.path.append(os.path.dirname(__file__)) # needed for Python3 diff --git a/src/third_party/wiredtiger/dist/s_docs b/src/third_party/wiredtiger/dist/s_docs index 03a1b6b47a5..55c30985b14 100755 --- a/src/third_party/wiredtiger/dist/s_docs +++ b/src/third_party/wiredtiger/dist/s_docs @@ -90,20 +90,6 @@ structurechk() } } -asciichk() -{ - # Make sure there are only ASCII characters in the input files. - # Odd characters can cause our Python filter to fail. - (cd ../src/docs && LC_ALL=C grep -n '[^[:print:] ]' *.dox | cat -v) > $t - test -s $t && { - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo 'Non-ASCII content in src/docs/*.dox files is not allowed.' - sed -e 's/^/ /' < $t - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - e=1 - } -} - spellchk() { # If aspell has been installed, run a spell check. @@ -238,7 +224,6 @@ changelog wtperf_config # Spell and structure check the documentation. -asciichk spellchk structurechk glossarychk diff --git a/src/third_party/wiredtiger/dist/s_style b/src/third_party/wiredtiger/dist/s_style index e8cac692300..dfee7284c38 100755 --- a/src/third_party/wiredtiger/dist/s_style +++ b/src/third_party/wiredtiger/dist/s_style @@ -17,8 +17,9 @@ if [ $# -ne 1 ]; then cd .. find bench examples ext src test \ - -name '*.[chsy]' -o -name '*.in' -o -name '*.dox' | + -name '*.[chsy]' -o -name '*.in' -o -name '*.dox' -o -name '*.cxx' -o -name '*.py' -o -name '*.cmake' -o -name '*.i' | sed -e '/Makefile.in/d' \ + -e '/test\/3rdparty/d' \ -e '/build_win\/wiredtiger_config.h/d' \ -e '/checksum\/power8/d' \ -e '/checksum\/zseries/d' | @@ -48,7 +49,16 @@ else fi fi - egrep -w 'a a|an an|and and|are are|be be|by by|for for|from from|if if|in in[^-]|is is|it it|of of|the the|this this|to to|was was|were were|when when|with with|a an|an a|a the|the a' $f > $t + # Remove non-ascii characters and substitute some expressions with accepted version. + tr -cd '[:alnum:][:space:][:punct:]' < $f | + sed -e '/for /!s/;;$/;/' \ + -e 's/(EOPNOTSUPP)/(ENOTSUP)/' \ + -e 's/(unsigned)/(u_int)/' \ + -e 's/hazard reference/hazard pointer/' >$t + + cmp $t $f > /dev/null 2>&1 || (echo "modifying $f" && cp $t $f) + + egrep -w 'a a|an an|and and|are are|be be|by by|for for|from from|if if|in in[[:space:]]|is is|it it|of of|the the|this this|to to|was was|were were|when when|with with|a an|an a|a the|the a' $f > $t test -s $t && { echo "paired typo" echo "============================" @@ -127,6 +137,7 @@ else fi if ! expr "$f" : 'examples/c/*' > /dev/null && + ! expr "$f" : '.*cxx' > /dev/null && ! expr "$f" : 'ext/*' > /dev/null && ! expr "$f" : 'src/os_posix/os_snprintf.c' > /dev/null && egrep '[^a-z_]snprintf\(|[^a-z_]vsnprintf\(' $f > $t; then @@ -190,6 +201,7 @@ else ! expr "$f" : 'test/csuite/.*' > /dev/null && ! expr "$f" : 'examples/.*' > /dev/null && ! expr "$f" : 'ext/.*' > /dev/null && + ! expr "$f" : '.*py' > /dev/null && ! expr "$f" : 'src/include/ctype.i' > /dev/null; then if egrep '(#include.*["</]ctype.h[">]|\b(is(alnum|alpha|cntrl|digit|graph|lower|print|punct|space|upper|xdigit)|to(lower|toupper))\()' $f > $t; then test -s $t && { @@ -198,14 +210,6 @@ else } fi fi - - tr -cd '[:alnum:][:space:][:punct:]' < $f | - sed -e '/for /!s/;;$/;/' \ - -e 's/(EOPNOTSUPP)/(ENOTSUP)/' \ - -e 's/(unsigned)/(u_int)/' \ - -e 's/hazard reference/hazard pointer/' >$t - - cmp $t $f > /dev/null 2>&1 || (echo "modifying $f" && cp $t $f) fi exit 0 diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 7ab93ddd4b2..1edd5ac5058 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "a28f4bb045e277499ae003d564c7a849e540af2e" + "commit": "5a05d846966df259cf48567f09b2b7632e394319" } diff --git a/src/third_party/wiredtiger/lang/python/wiredtiger/init.py b/src/third_party/wiredtiger/lang/python/wiredtiger/init.py index bb8d80b06f2..cc0f97e2e8c 100755 --- a/src/third_party/wiredtiger/lang/python/wiredtiger/init.py +++ b/src/third_party/wiredtiger/lang/python/wiredtiger/init.py @@ -42,7 +42,7 @@ if sys.version_info[0] <= 2: print('WiredTiger requires Python version 3.0 or above') sys.exit(1) -# After importing the SWIG-generated file, copy all symbols from from it +# After importing the SWIG-generated file, copy all symbols from it # to this module so they will appear in the wiredtiger namespace. me = sys.modules[__name__] sys.path.append(os.path.dirname(__file__)) diff --git a/src/third_party/wiredtiger/test/suite/suite_subprocess.py b/src/third_party/wiredtiger/test/suite/suite_subprocess.py index ed1305c72dd..6cd61ce1e9a 100755 --- a/src/third_party/wiredtiger/test/suite/suite_subprocess.py +++ b/src/third_party/wiredtiger/test/suite/suite_subprocess.py @@ -182,8 +182,8 @@ class suite_subprocess: WiredTigerTestCase.prout(out) # Run a method as a subprocess using the run.py machinery. - # Return the process exit status and the the WiredTiger - # home directory used by the subprocess. + # Return the process exit status and the WiredTiger home + # directory used by the subprocess. def run_subprocess_function(self, directory, funcname): testparts = funcname.split('.') if len(testparts) != 3: diff --git a/src/third_party/wiredtiger/test/suite/test_cursor13.py b/src/third_party/wiredtiger/test/suite/test_cursor13.py index d9708d58fde..861a17b8740 100755 --- a/src/third_party/wiredtiger/test/suite/test_cursor13.py +++ b/src/third_party/wiredtiger/test/suite/test_cursor13.py @@ -284,8 +284,8 @@ class test_cursor13_reopens(test_cursor13_base): # reopen the second cached cursor, see the data handle now # open and will succeed the reopen. # - # This test checks that reopens of cursor using a an - # already reopened data handle will work. + # This test checks that reopens of cursor using an already + # reopened data handle will work. c = self.session.open_cursor(self.uri) ds.check() c.close() diff --git a/src/third_party/wiredtiger/test/suite/test_prepare08.py b/src/third_party/wiredtiger/test/suite/test_prepare08.py index 6acbe49cb9b..c0df31d1bca 100644 --- a/src/third_party/wiredtiger/test/suite/test_prepare08.py +++ b/src/third_party/wiredtiger/test/suite/test_prepare08.py @@ -286,7 +286,7 @@ class test_prepare08(wttest.WiredTigerTestCase): # Checkpoint self.session.checkpoint() - # Remove the updates from a prepare session and and keep it open. + # Remove the updates from a prepare session and keep it open. session_p = self.conn.open_session() cursor_p = session_p.open_cursor(uri_1) session_p.begin_transaction() diff --git a/src/third_party/wiredtiger/test/suite/test_search_near04.py b/src/third_party/wiredtiger/test/suite/test_search_near04.py index 4080ae82449..70417bcd0bd 100644 --- a/src/third_party/wiredtiger/test/suite/test_search_near04.py +++ b/src/third_party/wiredtiger/test/suite/test_search_near04.py @@ -53,7 +53,7 @@ class test_search_near04(wttest.WiredTigerTestCase): self.session.create(uri, 'key_format={},value_format=S'.format(self.key_format)) # Make the keys big enough to span over multiple pages. - # key_size can be set to to a lower value so only one page is used and search_near works. + # key_size can be set to a lower value so only one page is used and search_near works. key_size = 200 cursor = self.session.open_cursor(uri) diff --git a/src/third_party/wiredtiger/test/suite/test_stat01.py b/src/third_party/wiredtiger/test/suite/test_stat01.py index 4cc962add0e..8fa2249e59a 100755 --- a/src/third_party/wiredtiger/test/suite/test_stat01.py +++ b/src/third_party/wiredtiger/test/suite/test_stat01.py @@ -62,7 +62,7 @@ class test_stat01(wttest.WiredTigerTestCase): parts = str.rpartition('(') return int(parts[2].rstrip(')')) - # Do a quick check of the entries in the the stats cursor, the "lookfor" + # Do a quick check of the entries in the stats cursor, the "lookfor" # string should appear with a minimum value of least "min". def check_stats(self, statcursor, min, lookfor): stringclass = ''.__class__ diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp14.py b/src/third_party/wiredtiger/test/suite/test_timestamp14.py index 8e93885b3a7..f0540963785 100644 --- a/src/third_party/wiredtiger/test/suite/test_timestamp14.py +++ b/src/third_party/wiredtiger/test/suite/test_timestamp14.py @@ -361,7 +361,7 @@ class test_timestamp14(wttest.WiredTigerTestCase, suite_subprocess): # Create a read session. session1.begin_transaction('read_timestamp=2') - # Confirm oldest reader is 2 and the the value we read is 1. + # Confirm oldest reader is 2 and the value we read is 1. self.assertTimestampsEqual( self.conn.query_timestamp('get=oldest_reader'), "2") diff --git a/src/third_party/wiredtiger/test/syscall/syscall.py b/src/third_party/wiredtiger/test/syscall/syscall.py index 796e6407677..09f6474fe1f 100755 --- a/src/third_party/wiredtiger/test/syscall/syscall.py +++ b/src/third_party/wiredtiger/test/syscall/syscall.py @@ -526,7 +526,7 @@ class Runner: return False return True - # func(args); is shorthand for for ASSERT_EQ(func(args), xxx); + # func(args); is shorthand for ASSERT_EQ(func(args), xxx); # where xxx may be 0 or may be derived from one of the args. def call_compare(self, callname, result, eargs, errline): if callname in calls_returning_zero: |