Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1640795 is being indexed.

Remove bashism in mailer.py test suite

* mailer/tests/mailer-init.sh

Change echo -e to more portable printf

Patch by: Oleksandr Chumachenko <ledest@gmail.com>

Approved by: philip

Fix an old header encoding buglet in mailer.py.

* tools/hook-scripts/mailer/mailer.py

(MailedOutput._rfc2047_encode): New function.

(MailedOutput.mail_headers): Use _rfc2047_encode() to properly

encode the From:, To:, and Subject: headers

Patch by: Igor Galić <i.galic{_AT_}brainsware.org>

(Scope expanded by me.)

* **/**

Run tools/dev/remove-trailing-whitespace.sh to remove all trailing whitespace

before we branch 1.8, like we did before creating previous branches.

No functional changes.

  1. … 199 more files in changeset.
Add a Date header and a Message-ID header to the mail generated by mailer.py.

* tools/hook-scripts/mailer/mailer.py

(MailedOutput.mail_headers): Add a Date and Message-Id header to the output.

Patch by: Nick Peelman <nick{_AT_}peelman.us>

(Tweaked by me to remove revision from Message-ID)

Fix problems with the mailer.py test suite and fix mailer.py not showing

directories with property deletions as being modified.

When using svn.repos.replay() property deletions don't show up in the

returned changelist from editor.get_changes().items() since the

changed_dir_prop function on the delta editor never gets called. This

could be a bug in the Python bindings or our C code. Setting send_deltas

to true and calling svn.repos.replay2() resolves the problem.

Some of the failures were simply that the group output is in a different

order than it was in the file. I suspect that the order of output from

mailer.py is not determinate, so long term this test setup will likely

have to be rewritten.

* mailer/mailer.py

(Commit.__init__): Switch to using svn.repos.replay2() and pass 1 for

send_deltas.

* mailer/tests/mailer-init.sh

Use --force when setting the svn:new_svn_prop since we reject properties

starting with svn: when we don't know about them. Set the mime-type

when adding a binary file since we only check for binary files by the

mime-type.

* mailer/tests/mailer-t1.output

Reorder some of the output to match the generated output (at least for me)

Follow-up to r1439592:

* tools/hook-scripts/mailer/mailer.py

(main): Fix a copy-paste error in r1439592.

Patch by: Nick Peelman <nick@peelman.us>

mailer.py: provide a "repos_dir basename" substitution variable.

Patch by: Janos Gyerik <janos.gyerik@gmail.com>

(log message by me)

Review by: breser

cmpilato

danielsh

* tools/hook-scripts/mailer/mailer.py

(main): Define 'repos_basename' for substitution.

* tools/hook-scripts/mailer/mailer.conf.example

(SUBSTITUTIONS): Document "%(repos_basename)s".

Add license headers where possible, or exclude the file in rat-excludes.

* build/config.guess : Added to rat-excludes

* build/config.sub : Added to rat-excludes

* subversion/bindings/swig/python/tests/trac/versioncontrol/__init__.py :

Added to rat-excludes

* subversion/tests/cmdline/dav-mirror-autocheck.sh : Added a License

* subversion/tests/cmdline/svntest/err.py Added to rat-excludes

* subversion/tests/manual/tree-conflicts-add-vs-add.py : Added a License

* tools/buildbot/master/public_html/buildbot.css : Added to rat-excludes

* tools/client-side/svn-ssl-fingerprints.sh : Added a License

* tools/dev/iz/defect.dem : Added to rat-excludes

* tools/dev/iz/ff2csv.command : Added to rat-excludes

* tools/dev/unix-build/Makefile.svn : Added a License

* tools/dev/wc-format.py : Added a License

* tools/dev/wc-ng/bump-to-19.py : Added a License

* tools/dev/wc-ng/populate-pristine.py : Added a License

* tools/dev/windows-build/Makefile : Added a License

* tools/dev/windows-build/document-version.pl : Added a License

* tools/examples/svnlog2html.rb : Added a License

* tools/hook-scripts/commit-email.rb : Added a License

* tools/hook-scripts/mailer/tests/mailer-t1.output : Added to rat-excludes

* tools/hook-scripts/mailer/tests/mailer.conf : Added a License

Approved by: rhuijben

  1. … 12 more files in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

  1. … 166 more files in changeset.
If diff command fails then use difflib.unified_diff() to generate diff.

* tools/hook-scripts/mailer/mailer.py

(DiffGenerator.__getitem__): Fall back to difflib.unified_diff()

if native 'diff' fails.

(_classify_diff_line): New function taken from DiffContent.__getitem__()

for reuse by the new class DifflibDiffContent.__getitem__().

(DifflibDiffContent): New diff generator using difflib.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

Suggested by: me

Tweaked by: me (Refactored some duplicate code).

Move character-coding declaration lines in Python files back to the beginning

of the file where they need to be, after a licence message was inserted

before them in r882257. This fixes a failure to run the Python tests under

Python 2.5, which I noticed on the macosx buildbot.

* tools/hook-scripts/mailer/mailer.py

* tools/hook-scripts/svnperms.py

* subversion/bindings/swig/python/tests/trac/test.py

Move the "coding" line back to the beginning, just after the she-bang line.

  1. … 2 more files in changeset.
Extend "mailer.py" with an option "search_logmsg=REGEXP" to allow filtering

based on matching expressions in the log message such as bug id's.

Patch by: Justin Vallon <justin.vallon{_AT_}deshaw.com>

* tools/hook-scripts/mailer/mailer.conf.example

Add documentation and an example of the new configuration options.

* tools/hook-scripts/mailer/mailer.py

(Commit): Pass the log message to the which_groups() call.

(PropChange, Lock): Pass no log message to the which_groups() call.

(Config): Parse the new option and extend the which_groups() function

to include groups specified through matching the log message.

* tools/hook-scripts/mailer/tests/mailer.conf

(bugtracker): New section with the new configuration options.

* tools/hook-scripts/mailer/tests/mailer-init.sh

Put some example bug id's into some of the commit messages.

* tools/hook-scripts/mailer/tests/mailer-t1.output

Adjust for the additions and changes to the expected output.

Apply ASF license headers to a number of files included under that license

but lacking said header.

Patch by: Niall Pemberton <niallp{_AT_}apache.org>

  1. … 172 more files in changeset.
Add four X-* headers to mailer.py generated emails to allow clients to

filter on them.

* tools/hook-scripts/mailer/mailer.py:

(MailedOutput.mail_headers):

Add four headers:

X-Svn-Commit-Project: the matching group name

X-Svn-Commit-Author: the author

X-Svn-Commit-Revision: the revision

X-Svn-Commit-Repository: the basename of the repository

Patch by: J Robert Ray <jrobertray@gmail.com>

Tweaked by: me

Use 'while True' instead of 'while 1'.

* build/generator/ezt.py:

* build/generator/gen_base.py:

* subversion/bindings/swig/python/svn/core.py:

* subversion/bindings/swig/python/svn/fs.py:

* subversion/tests/cmdline/info_tests.py:

* subversion/tests/cmdline/log_tests.py:

* subversion/tests/cmdline/svntest/tree.py:

* tools/bdb/skel.py:

* tools/dev/normalize-dump.py:

* tools/dev/po-merge.py:

* tools/dev/svn-merge-revs.py:

* tools/dev/verify-history.py:

* tools/dev/which-error.py:

* tools/examples/blame.py:

* tools/examples/getfile.py:

* tools/examples/svnlook.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/verify-po.py: Use 'while True' instead of 'while 1'.

  1. … 18 more files in changeset.
Python 3 compatibility:

Don't use deprecated members of types module.

* build/generator/ezt.py:

* subversion/bindings/swig/python/tests/client.py:

* subversion/bindings/swig/python/tests/wc.py:

* subversion/tests/cmdline/svntest/wc.py:

* tools/bdb/skel.py: Don't use deprecated members of types module.

* tools/hook-scripts/mailer/mailer.py: Don't import types module.

  1. … 5 more files in changeset.
* build/generator/gen_vcnet_vcproj.py

(Generator.makeguid): Delete code used only by Python 1.*.

* subversion/bindings/ctypes-python/README

(BUILDING CSVN): Update.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

(): Don't define Py_RETURN_NONE.

* subversion/tests/cmdline/info_tests.py

(match_xml_element): Directly compare dictionaries.

(same_dict): Delete.

* tools/client-side/server-version.py: Delete probably outdated comment.

* tools/hook-scripts/mailer/mailer.py: Delete code used only by Python <2.3.

  1. … 5 more files in changeset.
Use sorted() to simplify some code.

* build/generator/gen_base.py:

* build/generator/gen_make.py:

* build/generator/gen_vcnet_vcproj.py:

* build/win32/make_dist.py:

* doc/tools/bin/find-xsl.py:

* gen-make.py:

* subversion/bindings/swig/python/tests/mergeinfo.py:

* subversion/bindings/swig/python/tests/ra.py:

* subversion/tests/cmdline/changelist_tests.py:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/svnlook_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* subversion/tests/cmdline/svntest/tree.py:

* tools/bdb/svn-bdb-view.py:

* tools/dev/contribulyze.py:

* tools/dev/gen-javahl-errors.py:

* tools/dev/normalize-dump.py:

* tools/dev/which-error.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/po/l10n-report.py: Use sorted() to simplify some code.

  1. … 20 more files in changeset.
Delete code used only by Python <2.4.

* build/generator/util/executable.py:

* subversion/bindings/swig/python/svn/fs.py:

* subversion/tests/cmdline/svntest/main.py:

* subversion/tests/cmdline/update_tests.py:

* tools/backup/hot-backup.py.in:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/verify-po.py: Delete code used only by Python <2.4.

  1. … 6 more files in changeset.
Follow-up to r34959:

* tools/hook-scripts/mailer/mailer.py

(OutputBase.run): Try to use subprocess module.

Python 3 compatibility:

Don't assing values to True/False keywords.

* build/generator/gen_make.py:

* build/generator/gen_msvc_dsp.py:

* build/generator/gen_vcnet_vcproj.py:

* subversion/bindings/swig/python/svn/repos.py:

* subversion/tests/cmdline/svntest/__init__.py:

* tools/client-side/change-svn-wc-format.py:

* tools/dev/contribulyze.py:

* tools/hook-scripts/log-police.py:

* tools/hook-scripts/mailer/mailer.py: Don't assing values to True/False keywords.

  1. … 8 more files in changeset.
Python 3 compatibility:

Try to use urllib.parse.* and urllib.request.* instead of urllib.* and urllib2.*.

* subversion/tests/cmdline/svntest/main.py:

* tools/dev/contribulyze.py:

* tools/dev/mlpatch.py:

* tools/dist/post-to-tigris.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/server-side/svn_server_log_parse.py:

* tools/server-side/test_svn_server_log_parse.py: Try to use urllib.parse.* and

urllib.request.* instead of urllib.* and urllib2.*.

  1. … 6 more files in changeset.
Python 3 compatibility:

Try to use subprocess module in 'tools' directory.

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/verify-po.py: Try to use subprocess module.

* tools/backup/hot-backup.py.in: Fix a typo.

  1. … 2 more files in changeset.
Python 3 compatibility:

Import io.StringIO when using Python 3.

* build/generator/gen_win.py:

* subversion/bindings/ctypes-python/test/wc.py:

* subversion/bindings/swig/python/tests/delta.py:

* subversion/bindings/swig/python/tests/mergeinfo.py:

* subversion/bindings/swig/python/tests/ra.py:

* subversion/bindings/swig/python/tests/repository.py:

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py:

* subversion/bindings/swig/python/tests/wc.py:

* subversion/tests/cmdline/svntest/tree.py:

* tools/hook-scripts/mailer/mailer.py: Import io.StringIO when using Python 3.

  1. … 9 more files in changeset.
* tools/backup/hot-backup.py.in:

* tools/dev/which-error.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/svn2feed.py:

* tools/hook-scripts/svnperms.py: Declare UTF-8 encoding.

  1. … 4 more files in changeset.
Python 3 compatibility:

Update calls to print() in 'tools' directory.

* tools/backup/hot-backup.py.in:

* tools/bdb/erase-all-text-data.py:

* tools/bdb/svn-bdb-view.py:

* tools/bdb/whatis-rep.py:

* tools/client-side/change-svn-wc-format.py:

* tools/client-side/server-version.py:

* tools/dev/check-license.py:

* tools/dev/contribulyze.py:

* tools/dev/datecheck.py:

* tools/dev/gen-javahl-errors.py:

* tools/dev/graph-dav-servers.py:

* tools/dev/iz/ff2csv.py:

* tools/dev/iz/find-fix.py:

* tools/dev/mlpatch.py:

* tools/dev/normalize-dump.py:

* tools/dev/po-merge.py:

* tools/dev/random-commits.py:

* tools/dev/scramble-tree.py:

* tools/dev/svn-merge-revs.py:

* tools/dev/verify-history.py:

* tools/dev/which-error.py:

* tools/dist/gen_nightly_ann.py:

* tools/dist/getsigs.py:

* tools/dist/post-to-tigris.py:

* tools/dist/write-announcement.py:

* tools/examples/blame.py:

* tools/examples/check-modified.py:

* tools/examples/dumpprops.py:

* tools/examples/getfile.py:

* tools/examples/get-location-segments.py:

* tools/examples/geturl.py:

* tools/examples/putfile.py:

* tools/examples/revplist.py:

* tools/examples/svnlook.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/tests/mailer-tweak.py:

* tools/hook-scripts/svn2feed.py:

* tools/po/l10n-report.py:

* tools/server-side/fsfs-reshard.py:

* tools/server-side/svn-backup-dumps.py: Call print() or file.write().

  1. … 39 more files in changeset.
Python 3 compatibility:

Use dict.keys(), dict.values() and dict.items() instead of dict.iterkeys(),

dict.itervalues() and dict.iteritems().

Use list(dict.keys()), list(dict.values()) and list(dict.items()) instead of

dict.keys(), dict.values() and dict.items(). Function calls with 'for', 'in' or

len() weren't updated.

* build/generator/ezt.py:

* build/generator/gen_base.py:

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

* build/win32/make_dist.py:

* gen-make.py:

* subversion/bindings/ctypes-python/csvn/types.py:

* subversion/bindings/ctypes-python/examples/log.py:

* subversion/bindings/ctypes-python/examples/trunkify.py:

* subversion/bindings/swig/python/tests/mergeinfo.py:

* subversion/bindings/swig/python/tests/ra.py:

* subversion/bindings/swig/python/tests/wc.py:

* subversion/tests/cmdline/externals_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* tools/bdb/svn-bdb-view.py:

* tools/dev/contribulyze.py:

* tools/dev/gen-javahl-errors.py:

* tools/dev/normalize-dump.py:

* tools/dev/trails.py:

* tools/dev/which-error.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/svnperms.py: Use dict.keys(), dict.values() and

dict.items() instead of dict.iterkeys(), dict.itervalues() and

dict.iteritems(). Use list(dict.keys()), list(dict.values()) and

list(dict.items()) instead of dict.keys(), dict.values() and dict.items().

  1. … 22 more files in changeset.
Python 3 compatibility:

Use list comprehensions or list(filter()) instead of filter().

* build/generator/gen_win.py:

* build/run_tests.py:

* subversion/tests/cmdline/changelist_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* subversion/tests/cmdline/svntest/main.py:

* subversion/tests/cmdline/svntest/wc.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* win-tests.py: Use list comprehensions or list(filter()) instead of filter().

  1. … 8 more files in changeset.
Python 3 compatibility:

Use list comprehensions or list(map()) instead of map().

* build/generator/gen_base.py:

* build/generator/gen_make.py:

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

* build/generator/swig/header_wrappers.py:

* build/run_tests.py:

* subversion/tests/cmdline/changelist_tests.py:

* subversion/tests/cmdline/checkout_tests.py:

* subversion/tests/cmdline/getopt_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* subversion/tests/cmdline/svntest/main.py:

* subversion/tests/cmdline/svntest/verify.py:

* subversion/tests/cmdline/tree_conflict_tests.py:

* tools/bdb/skel.py:

* tools/dev/iz/find-fix.py:

* tools/dev/svn-merge-revs.py:

* tools/dist/write-announcement.py:

* tools/hook-scripts/mailer/mailer.py:

* win-tests.py: Use list comprehensions or list(map()) instead of map().

  1. … 20 more files in changeset.
Python 3 compatibility:

Use str.join() instead of string.join().

* build/generator/gen_base.py:

* build/generator/gen_make.py:

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

* build/generator/swig/header_wrappers.py:

* subversion/libsvn_subr/genctype.py:

* subversion/tests/cmdline/commit_tests.py:

* tools/dev/iz/find-fix.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/mailer/tests/mailer-t1.sh: Use str.join() instead of

string.join().

  1. … 9 more files in changeset.