Follow up to r1880967: swig-py: Restore return value type of svn.fs.commit_txn On r1880967 we reverted a "wrong" behavior of svn.fs.commit_txn, that it returned always a 2-tuple of None and new_rev if it didn't raise Exception. However we reconsidered that it is more important to keep compatibility on existing program codes. To keep code simple, we adjust return value on Python code rather than SWIG typemap. * subversion/bindings/swig/python/svn/fs.py (): rename the wrapper function svn_fs_commit_txn imported from libsvn.fs module into internal name '_svn_fs_commit_txn'. (svn_fs_commit_txn): New function to wrap _svn_fs_commit_txn to adjust return value type. Index: subversion/bindings/swig/python/svn/fs.py =================================================================== --- subversion/bindings/swig/python/svn/fs.py (revision 1884802) +++ subversion/bindings/swig/python/svn/fs.py (working copy) @@ -24,6 +24,14 @@ ###################################################################### from libsvn.fs import * + +# For API compatibility we should replace wrapper function entity before +# adding alternative names. +_svn_fs_commit_txn = svn_fs_commit_txn +def svn_fs_commit_txn(*args): + r"""svn_fs_commit_txn(svn_fs_txn_t txn, apr_pool_t pool) -> svn_error_t""" + return None, _svn_fs_commit_txn(*args) + from svn.core import _unprefix_names, Pool, _as_list _unprefix_names(locals(), 'svn_fs_') _unprefix_names(locals(), 'SVN_FS_')