po-merge.py

Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

* subversion/bindings/javahl/native/StateReporter.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

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

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_client/client-test.c

* subversion/tests/libsvn_client/mtcc-test.c

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_fs/locks-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

* subversion/tests/libsvn_ra/ra-test.c

* subversion/tests/libsvn_subr/cache-test.c

* subversion/tests/libsvn_subr/checksum-test.c

* subversion/tests/libsvn_subr/config-test.c

* subversion/tests/libsvn_subr/io-test.c

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

* subversion/tests/libsvn_subr/sqlite-test.c

* subversion/tests/libsvn_subr/string-test.c

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_subr/x509-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

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

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Make sure msgstr is not None before do iteration.

Obvious fix.

* tools/dev/po-merge.py

Since parse_translation maybe return (comments, None, None, None),

we should not do iteration without check msgstr is not None. Otherwise,

we may encounter the following TypeError:

Traceback (most recent call last):

File "../../../../trunk/tools/dev/po-merge.py", line 196, in <module>

main(sys.argv)

File "../../../../trunk/tools/dev/po-merge.py", line 181, in main

for m in msgstr:

TypeError: 'NoneType' object is not iterable

make po-merge.py count fuzzy strings

* tools/dev/po-merge.py

(main): count and print number of fuzzy strings

Approved by: danielsh

When long msgid break to several lines, it still is the same msgid.

Obvious fix.

* dev/po-merge.py: Merge msgid which break to several lines, and

update comments.

Update every occurence of the Subversion repository URL to apache.org,

except in CHANGES (for sentimental reasons, I guess).

* contrib/cgi/mirror_dir_through_svn.README,

* contrib/client-side/emacs/psvn.el,

* contrib/client-side/svnmerge/svnmerge_test.py,

* contrib/hook-scripts/commit-email.pl.in,

* contrib/server-side/svn-fast-backup,

* contrib/server-side/svnmirror.sh,

* contrib/server-side/svnmirror-test.sh,

* doc/user/cvs-crossover-guide.html,

* notes/fs_dumprestore.txt,

* notes/http-and-webdav/webdav-usage.html,

* notes/interactive-conflict-resolution.txt,

* notes/merge-tracking/func-spec.html,

* notes/merge-tracking/requirements.html,

* notes/merge-tracking/summit.html,

* notes/object-model.txt,

* notes/obliterate/hooks/post-obliterate.tmpl,

* notes/obliterate/hooks/pre-obliterate.tmpl,

* notes/obliterate/plan-milestones.html,

* notes/subversion-design.html,

* notes/variance-adjusted-patching.html,

* packages/windows-innosetup/Pre.rtf,

* packages/windows-WiX/BuildSubversion/WixDialog/loc/en-us/Pre.rtf,

* subversion/bindings/javahl/native/JNIUtil.cpp,

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java,

* subversion/bindings/javahl/src/org/apache/subversion/javahl/Version.java,

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java,

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java,

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java,

* subversion/bindings/swig/perl/native/Client.pm,

* subversion/libsvn_repos/repos.c,

* subversion/libsvn_wc/wc_db.h,

* subversion/tests/cmdline/merge_tests.py,

* subversion/tests/libsvn_subr/path-test.c,

* tools/buildbot/slaves/README,

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

* tools/client-side/svn-graph.pl,

* tools/client-side/svn-viewspec.py,

* tools/dev/contribulyze.py,

* tools/dev/po-merge.py,

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

* tools/dist/gen_nightly_ann.py: Update Subversion repository URL to apache.

  1. … 40 more files in changeset.
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. … 175 more files in changeset.
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.
po-merge.py: Fix traceback which occurs when obsolete messages are found:

Traceback (most recent call last):

File "../../tools/dev/po-merge.py", line 171, in <module>

main(sys.argv)

File "../../tools/dev/po-merge.py", line 160, in main

for m in msgstr:

TypeError: 'NoneType' object is not iterable

* tools/dev/po-merge.py

(parse_translation): Ignore obsolete messages.

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.
Follow-up to r34141:

* tools/dev/po-merge.py

(parse_translation, main): Support msgid_plural and msgstr[\d+].

* tools/dev/po-merge.py: Fix typo in po-merge.py usage string.

Patch by: Marcel Gosselin <marcel.gosselin@polymtl.ca>

Set svn:eol-style='native' on some text files that were lacking it.

  1. … 44 more files in changeset.
Make the po-merge tool overwrite translations from the source because

the source is authorative, and also avoid updating the header.

* tools/dev/po-merge.py

(main): Just do it, and rename a couple of local variables

to improve code readability.

Add a new development tool to merge strings from one po file to another

to be used when merging translations from trunk to branches.

* tools/dev/po-merge.py: New file.