getversion.py

Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
autogen.sh: Support Python 3. All Python versions previously supported

remain supported.

Review by: rhuijben, brane

* build/generator/gen_base.py

(GeneratorBase.write_file_if_changed):

Convert str to bytes. Document argument type.

* build/getversion.py

(traceback): Import.

(svn_extractor, sqlite_extractor):

Rewrite 'except' statements in a syntax compatible with both Python 2.5

and Python 3. No functional change.

* gen-make.py:

Ditto.

* build/transform_sql.py

(Processor.process_file): Use dict.items() instead of dict.iteritems().

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

(test_svn_subst_translate_string2_null_encoding_helper):

Convert comment to ASCII.

  1. … 4 more files in changeset.
Comment out apparently-unused code.

* build/getversion.py

(extractors): Comment out the 'SQLITE': sqlite_extractor mapping.

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.
Cleanup trailing whitespace:

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

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

done

This should have been done before the 1.6.x branch, so I'm going to merge

it over there, to avoid merge conflicts in the future.

  1. … 83 more files in changeset.
Make configure a bit more flexible when is comes to SQLite:

* When given the --with-sqlite flag:

- check that the target is a sqlite installation that exists and meets

our minimum requirements

- check that the target is the sqlite amalgamation that exists and meets

our minimum requirements

* When not given the --with-sqlite flag:

- check for the shared library via pkg-config

- check for an appropriate amalgamation file in build/

INSTALL still needs to be updated, as does the code for including the

amalgamation file in -deps. Those commits will follow shortly.

This commit also reverts portions of r35241, which added initial support

for the amalgamation file (to the detriment of library installs).

* Makefile.in, build.conf:

Revert r35241.

* subversion/libsvn_subr/sqlite.c:

Conditionally include the amalgamation.

* subversion/libsvn_subr/sqlite3_c.h:

Remove.

* build/ac-macros/sqlite.m4

(SVN_LIB_SQLITE): Update config order as described above, and refactor to make

slightly more readable.

(SVN_SQLITE_PKG_CONFIG, SVN_SQLITE_DIR_CONFIG, SVN_SQLITE_FILE_CONFIG,

SVN_SQLITE_VERNUM_PARSE): New.

(SVN_DOWNLOAD_SQLITE): Update text.

* build/getversion.py

(svn_extractor, sqlite_extractor, extractors): New.

(usage_and_exit): Update.

(): Allow this file to parse SQLite version information as well as svn

version information.

* configure.ac

Partially revert r35241, and use a minimum version in place of an accepted

pattern for SQLite checking.

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

Update calls to print() in 'build' directory, 'gen-make.py' and 'win-tests.py'.

* build/generator/extractor.py:

* build/generator/gen_win.py:

* build/generator/swig/checkout_swig_header.py:

* build/generator/swig/external_runtime.py:

* build/generator/swig/header_wrappers.py:

* build/get-py-info.py:

* build/getversion.py:

* build/run_tests.py:

* build/strip-po-charset.py:

* build/win32/make_dist.py:

* gen-make.py:

* win-tests.py: Call print() or file.write().

  1. … 11 more files in changeset.
* build/buildcheck.sh:

* build/PrintPath:

* build/getversion.py:

* build/install-sh:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/log_tests.py:

* subversion/tests/cmdline/trans_tests.py:

* subversion/tests/cmdline/svnlook_tests.py:

* subversion/tests/cmdline/switch_tests.py:

* subversion/tests/cmdline/externals_tests.py:

* subversion/tests/cmdline/diff_tests.py:

* subversion/tests/cmdline/copy_tests.py:

* subversion/tests/cmdline/stat_tests.py:

* subversion/tests/cmdline/svnversion_tests.py:

* subversion/tests/cmdline/prop_tests.py:

* subversion/tests/cmdline/basic_tests.py:

* subversion/tests/cmdline/update_tests.py:

* subversion/tests/cmdline/utf8_tests.py:

* subversion/tests/cmdline/commit_tests.py:

* subversion/tests/cmdline/schedule_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/getopt_tests.py:

* contrib/client-side/svn_all_diffs.pl:

* contrib/client-side/search-svnlog.pl:

* contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in:

* contrib/cgi/mirror_dir_through_svn.cgi:

* tools/client-side/showchange.pl:

* tools/dist/dist.sh:

* tools/hook-scripts/commit-access-control.pl.in:

* tools/hook-scripts/svnperms.py:

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

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

* tools/hook-scripts/mailer/tests/mailer-t1.sh:

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

* tools/hook-scripts/commit-email.pl.in:

* tools/dev/stress.pl:

* tools/dev/gnuify-changelog.pl:

* tools/dev/prebuild-cleanup.sh:

* tools/examples/dumpprops.py:

* tools/examples/check-modified.py:

* tools/examples/svnlook.py:

* tools/examples/svnshell.py:

* tools/examples/geturl.py:

* tools/examples/putfile.py:

* tools/examples/revplist.py:

* tools/examples/getfile.py:

* tools/examples/blame.py:

* doc/tools/bin/run-fop.sh:

* autogen.sh:

* gen-make.py:

Set svn:executable property to "*".

  1. … 49 more files in changeset.
Perform argument validation.

* build/getversion.py

(__main__): Check arguments, and exit with error status and a usage

message if a sufficient number of them aren't provided, or if we

can't find/parse specified the header file.

(usage_and_exit): New helper routine which prints usage instructions

to stderr, and exits with error status.

Patch by: bhuvan

me

Fixed two inconsistencies in our versioning scheme:

-- We used to call the patch version number "SVN_VER_MICRO"; changed

that to "SVN_VER_PATCH".

-- The library version, SVN_VER_LIBRARY, is always the same as the

major version number, so actually made it that way.

* subversion/include/svn_version.h (SVN_VER_PATCH): Replaces SVN_VER_MICRO.

(SVN_VER_MICRO): Deprecate. Replace all uses with SVN_VER_PATCH.

(SVN_VER_LIBRARY): Deprecate. Replace all uses with SVN_VER_MAJOR.

(svn_version_t::patch): Renamed from 'micro', all uses updated.

* dist.sh: As an exception to the above, keep the SVN_VER_MICRO rewriting

logic, and add same for SVN_VER_PATCH, so that the script still works

on the 1.0.x branch.

(ver_patch): Renamed from ver_micro.

  1. … 14 more files in changeset.
* Just about everything else that wasn't test output, a binary file,

or already to set to CRLF: Set svn:eol-style to native.

  1. … 658 more files in changeset.
* autogen.sh: Ensure that build/getversion.py is executable.

* build/get-version.sh: Remove.

* build/getversion.py: Add a #! line, canonicalize line endings, and

make default extract and print the version from a header file.

* configure.in: Use getversion.py instead of get-version.sh.

  1. … 3 more files in changeset.
Just be glad you're not updating over libsvn_ra_pigeons...

* everywhere: Remove "local variables:" eval blocks.

* subversion/libsvn_repos/hooks.c: But leave the vim stuff here.

* tools/dev/svn-dev.el, doc/book/tools/svnbook.el:

Get rid of obsolete loading instructions.

* HACKING: Describe how to load the elisp files from .emacs.

* doc/book/HACKING: Add querulous comment.

  1. … 338 more files in changeset.
* build/getversion.py (__init__): Close the stream once it's been read.

(Local variables): Fix the path to svn-dev.el.

Remove dependencies on Python 2.x

* gen-make.py:

- tweak the option parsing (again). the += syntax is specific to

Python 2. converted to just use getopt.

* build/getversion.py:

- the xreadlines module wasn't even used (file.xreadlines was used

instead). but no need -- the .h file isn't *that* large, so just

suck in the entire file using .readlines()

- stylistic changes: never put code blocks on the same line --

always use a newline and indent.

  1. … 1 more file in changeset.
* build/getversion.py: Update the relative path to svn_version.h in the

example; this file was moved from build/win32.

* build/getversion.py (Parser.parse): Duh, there's no need to hack result's

__dict__ directly, use the built-in setattr() instead.

Convert gen_base.py to use the new C header parser.

* build/getversion.py: Renamed from build/win32/getversion.py.

* build/gen_base.py (__init__): Use getversion.Parser to find the lib version.

  1. … 2 more files in changeset.