[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Merging python-bindings-improvements to trunk

From: David James <james82_at_gmail.com>
Date: 2005-08-01 04:38:55 CEST

I'd like to merge my changes from the python-bindings-improvements
branch to trunk. Please take a look and let me know what you think!

Here's a summary of the changes as of r15529.

- Automated Test Suite
  * Simple test suite for memory pools (r15396, r15462)
  * In-build-directory testing (r15478)
  * Nightly smoke tests (r15505)
- Automatic Memory Management
  * Autogenerated proxy classes for SVN structs (r15428)
  * Hand-written proxy classes for APR structs (r15484)
  * Real reference counting for Pool objects (r15489, r15495, r15500)
  * Optional Pool Arguments (r15370, r15529)
- Better documentation and error messages
  * Enabled SWIG autodoc feature (r15490)
  * Report assertion failures when variables are deleted prematurely
    (r15488, r15489, r15492)
  * Python argument numbers in error messages (r15460, r15493, r15525)
- Streamlined build process
  * Automatic dependency checking for SWIG files (r15381, r15405,
    r15426, r15429, r15430)
  * Makefile rule for clean-swig-py (r15476)
- Other changes
  * Compile-time type lookups for SWIG (r15397, r15407, r15408, r15409,
    r15412, r15417)
  * Move SWIG includes into include directory (r15407, r15408, r15413)
  * Refactoring (r15411, r15425, r15453, r15521, r15522, r15527)
  * Minor bugfixes (r15409, r15494, r15496, r15497, r15498, r15499,
    r15501, r15511, r15519, r15526)
  * Merges from trunk (r15414, r15418, r15461, r15491, r15506, r15528)

Here's some sample code which uses the automatic memory management feature:
  from svn import core, repos, fs

  # Return the youngest revision in a repository as an integer.
  # The pool used by this function is automatically cleaned up
  # when both the repos_ptr and fs_ptr variables go out of scope.
  def youngest_rev(path):
    repos_ptr = repos.open(path, core.Pool())
    fs_ptr = repos.fs(repos_ptr)
    return fs.youngest_rev(fs_ptr)

With this new code, you shouldn't need to worry about keeping pools in
scope -- the pool will stay in scope for as long as its variables are
in scope. You can still manage pools manually, if you like -- Python
will only destroy a pool if it is not deleted manually.

If, by some programming accident, you delete a pool manually, but still
try to use the variables inside it, Subversion will raise a Python
exception so that you can easily track down the error. These Python
exceptions are much easier to debug than segfaults.

I've attached a log of my changes to the branch.

Thanks for your help!

David

-- 
David James -- http://www.cs.toronto.edu/~james


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Aug 1 04:40:00 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.