Commit 65ba0686 authored by Stefano Rivera's avatar Stefano Rivera

Imported Upstream version 1.7.10

parent d60b8440
MAJOR=1
MINOR=7
PATCH=8
PATCH=10
BUILD=0
......@@ -6,13 +6,16 @@ VCBUILD_OPT=/useenv /nologo /nocolor "/info:Info: " "/error:Error: " "/warning:W
build: all test kit
all:
cd ..\Source & $(PYTHON) setup.py configure vcbuild /rebuild $(VCBUILD_OPT) pysvn-for-svn-$(SVN_VER_MAJ_DASH_MIN)-msvc90.sln "Release|Win32"
cd ..\Source & $(PYTHON) setup.py configure --verbose --platform=win32 --svn-root-dir=$(TARGET)\svn-win32-%SVN_VER% --pycxx-dir=$(PYCXX)
cd ..\Source & $(MAKE)
test:
cd ..\Tests & $(MAKE)
clean:
cd ..\Source & vcbuild /clean $(VCBUILD_OPT) pysvn-for-svn-$(SVN_VER_MAJ_DASH_MIN)-msvc90.sln "Release|Win32"
cd ..\Source & if exist makefile $(MAKE) clean
cd ..\Source & if exist sept del sept
cd ..\Tests & $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=$(SVN_VER_MAJ_MIN) clean
cd ..\Tests & if exist makefile $(MAKE) clean
cd ..\kit\Win32-$(SVN_VER_MAJ_MIN) & $(MAKE) clean
kit:
......@@ -20,6 +23,3 @@ kit:
install:
..\kit\Win32\tmp\output\setup.exe
test:
cd ..\Tests & $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=$(SVN_VER_MAJ_MIN) KNOWN_GOOD_VERSION=py$(PY_MAJ)-svn$(SVN_VER_MAJ_MIN)
......@@ -535,43 +535,43 @@ It is passed the conflict_description and must return a conflict_choice, merge_f
</tr>
<tr>
<td><a href="#pysvn_client_move">move</a></td>
<td><span class="svn_1005000"><a href="#pysvn_client_copy2">copy2</a></span></td>
<td><span class="svn_1005000"><a href="#pysvn_client_move2">move2</a></span></td>
<td><span class="svn_1007000"><a href="#pysvn_client_patch">patch</a></span></td>
<td><a href="#pysvn_client_propdel">propdel</a></td>
<td><a href="#pysvn_client_propget">propget</a></td>
<td><a href="#pysvn_client_proplist">proplist</a></td>
<td><a href="#pysvn_client_propset">propset</a></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><a href="#pysvn_client_propset">propset</a></td>
<td><a href="#pysvn_client_relocate">relocate</a></td>
<td><a href="#pysvn_client_remove">remove</a></td>
<td><span class="svn_1005000"><a href="#pysvn_client_remove_from_changelists">remove_from_changelists</a></span></td>
<td><a href="#pysvn_client_resolved">resolved</a></td>
<td><a href="#pysvn_client_revert">revert</a></td>
<td><a href="#pysvn_client_revpropdel">revpropdel</a></td>
</tr>
<tr>
<td><a href="#pysvn_client_revpropdel">revpropdel</a></td>
<td><a href="#pysvn_client_revpropget">revpropget</a></td>
<td><a href="#pysvn_client_revproplist">revproplist</a></td>
<td><a href="#pysvn_client_revpropset">revpropset</a></td>
<td><span class="svn_1005000"><a href="#pysvn_client_root_url_from_path">root_url_from_path</a></span></td>
<td><span class="svn_1003000"><a href="#pysvn_client_set_adm_dir">set_adm_dir</a></span></td>
<td><a href="#pysvn_client_set_auth_cache">set_auth_cache</a></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><a href="#pysvn_client_set_auth_cache">set_auth_cache</a></td>
<td><a href="#pysvn_client_set_auto_props">set_auto_props</a></td>
<td><a href="#pysvn_client_set_default_password">set_default_password</a></td>
<td><a href="#pysvn_client_set_default_username">set_default_username</a></td>
<td><a href="#pysvn_client_set_interactive">set_interactive</a></td>
<td><a href="#pysvn_client_set_store_passwords">set_store_passwords</a></td>
<td><a href="#pysvn_client_status">status</a></td>
</tr>
<tr>
<td><a href="#pysvn_client_status">status</a></td>
<td><a href="#pysvn_client_switch">switch</a></td>
<td><span class="svn_1002000"><a href="#pysvn_client_unlock">unlock</a></span></td>
<td><a href="#pysvn_client_update">update</a></td>
<td><span class="svn_1007000"><a href="#pysvn_client_upgrade">upgrade</a></span></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
......@@ -1652,6 +1652,61 @@ callback must be implemented to return a log message.
</p>
</div>
<div class="svn_1005000">
<h4><a name="pysvn_client_patch"><a href="#pysvn_module">pysvn</a>.<a href="#pysvn_client">Client</a>.patch</a></h4>
<pre>
svn_client_patch(patch_abspath,
wc_dir_abspath,
dry_run=False,
strip_count=0,
reverse=False,
ignore_whitespace=False,
remove_tempfiles=False)
</pre>
<p>
Apply a unidiff patch that's located at absolute path
patch_abspath to the working copy directory at wc_dir_abspath.
</p>
<p>
This function makes a best-effort attempt at applying the patch.
It might skip patch targets which cannot be patched (e.g. targets
that are outside of the working copy). It will also reject hunks
which cannot be applied to a target in case the hunk's context
does not match anywhere in the patch target.
</p>
<p>
If dry_run is True, the patching process is carried out, and full
notification feedback is provided, but the working copy is not modified.
</p>
<p>
strip_count specifies how many leading path components should be
stripped from paths obtained from the patch. It is an error if a
negative strip count is passed.
</p>
<p>
If reverse is True, apply patches in reverse, deleting lines
the patch would add and adding lines the patch would delete.
</p>
<p>
If ignore_whitespace is True, allow patches to be applied if they
only differ from the target by whitespace.
</p>
<p>
If remove_tempfiles is True, lifetimes of temporary files created
during patching will be managed internally. Otherwise, the caller should
take ownership of these files, the names of which can be obtained by
passing a patch_func callback.
</p>
<p>
If notify_func is not None, invoke notify_func
as patching progresses.
</p>
<p>
If cancel_func is not None, invoke it at various places during the operation.
</p>
</div>
<h4><a name="pysvn_client_propdel"><a href="#pysvn_module">pysvn</a>.<a href="#pysvn_client">Client</a>.propdel</a></h4>
<pre>
rev = \
......@@ -1666,10 +1721,10 @@ propdel( prop_name,
</pre>
<p>Delete the property prop_name from url_or_path.
</p>
<p><span class="svn_1002000">If skip_checks is true, do no validity checking. But if
<p><span class="svn_1002000">If skip_checks is true, do no validity checking. But if
skip_checks is false, and propname is not a valid property for
target, return an error, either SVN_ERR_ILLEGAL_TARGET (if the
property is not appropriate for target), or
target, return an error, either SVN_ERR_ILLEGAL_TARGET (if the
property is not appropriate for target), or
SVN_ERR_BAD_MIME_TYPE (if propname is "svn:mime-type", but
propval is not a valid mime-type).</span>
</p>
......
......@@ -741,9 +741,13 @@ class SvnCommand:
recurse=recurse, dry_run=dry_run, notice_ancestry=notice_ancestry )
def cmd_mkdir( self, args ):
msg = args.getOptionalValue( '--message', '' )
if msg == '':
msg = self.getLogMessage()
if args.haveOption( '--message' ):
msg = args.getOptionalValue( '--message', '' )
if msg == '':
msg = self.getLogMessage()
else:
msg = ''
self.client.mkdir( args.getPositionalArgs( 1, 1 )[0], msg )
......@@ -752,6 +756,22 @@ class SvnCommand:
self.client.move( positional_args[0], positional_args[1] )
cmd_mv = cmd_move
def cmd_patch( self, args ):
dry_run = args.getBooleanOption( '--dry-run', True )
reverse = args.getBooleanOption( '--reverse', True )
ignore_whitespace = args.getBooleanOption( '--ignore-whitespace', True )
remove_tempfiles = not args.getBooleanOption( '--no-remove-tempfiles', True )
patch_path, wc_dir_path = args.getPositionalArgs( 2, 2 )
abs_patch_path = os.path.abspath( patch_path )
abs_wc_dir_path = os.path.abspath( wc_dir_path )
self.client.patch( abs_patch_path, abs_wc_dir_path,
dry_run=dry_run,
reverse=reverse,
ignore_whitespace=ignore_whitespace,
remove_tempfiles=remove_tempfiles )
def key_props_by_path( self, a ):
return a[0]
......@@ -1053,6 +1073,7 @@ long_opt_info = {
'--no-auto-props': 0, # disable automatic properties
'--no-diff-deleted': 0, # do not print differences for deleted files
'--no-ignore': 0, # disregard default and svn:ignore property ignores
'--no-remove-tempfiles': 0, # do not remove temp files
'--non-interactive': 0, # do no interactive prompting
'--notice-ancestry': 0, # notice ancestry when calculating differences
'--old': 1, # use ARG as the older target
......@@ -1269,7 +1290,7 @@ class SvnArguments:
def getPositionalArgs( self, min_args, max_args=0 ):
# check min and max then return the list
if len(self.positional_args) < min_args:
raise CommandError( 'too few arguments - need atlease %d' % min_args )
raise CommandError( 'too few arguments - need at least %d' % min_args )
if max_args != 0 and len(self.positional_args) > max_args:
raise CommandError( 'too many arguments - need no more then %d' % max_args )
......
setlocal
call setup-msvc90
c:\python27.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all
c:\python32.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all
endlocal
......@@ -1130,7 +1130,7 @@ namespace Py
// TMM: added this seqref ctor for use with STL algorithms
seqref (Object& obj)
: s(dynamic_cast< SeqBase<T>&>(obj))
, offset( NULL )
, offset( 0 )
, the_item(s.getItem(offset))
{}
~seqref()
......@@ -2909,7 +2909,8 @@ namespace Py
// Queries
List keys () const
{
return List(PyMapping_Keys(ptr()), true);
static char keys[] = {'k', 'e', 'y', 's', 0};
return List(PyObject_CallMethod( ptr(), keys, NULL ), true );
}
List values () const
......
......@@ -121,7 +121,8 @@ namespace Py
virtual Object number_power( const Object &, const Object & );
// Buffer
// QQQ need to add py3 interface
virtual int buffer_get( Py_buffer *, int flags );
virtual int buffer_release( Py_buffer *buf );
public:
// helper functions to call function fn_name with 0 to 9 args
......
......@@ -413,7 +413,7 @@ namespace Py
{
}
virtual bool accepts( PyObject *pyob )
virtual bool accepts( PyObject *pyob ) const
{
return pyob == NULL;
}
......@@ -1105,7 +1105,7 @@ namespace Py
// TMM: added this seqref ctor for use with STL algorithms
seqref( Object &obj )
: s( dynamic_cast< SeqBase<T>&>( obj ) )
, offset( NULL )
, offset( 0 )
, the_item( s.getItem( offset ) )
{}
......
......@@ -40,7 +40,7 @@
#define PYCXX_VERSION_MAJOR 6
#define PYCXX_VERSION_MINOR 2
#define PYCXX_VERSION_PATCH 4
#define PYCXX_VERSION_PATCH 6
#define PYCXX_MAKEVERSION( major, minor, patch ) ((major<<16)|(minor<<8)|(patch))
#define PYCXX_VERSION PYCXX_MAKEVERSION( PYCXX_VERSION_MAJOR, PYCXX_VERSION_MINOR, PYCXX_VERSION_PATCH )
#endif
......@@ -57,4 +57,15 @@
// pull in python definitions
#include <Python.h>
// fix issue with Python assuming that isspace, toupper etc are macros
#if defined(isspace)
#undef isspace
#undef isupper
#undef islower
#undef isalnum
#undef isalpha
#undef toupper
#undef tolower
#endif
#endif
......@@ -124,8 +124,6 @@ void test_String()
void test_boolean()
{
bool passed = true;
Py::Object o;
Py::Boolean pb1;
Py::Boolean pb2;
......@@ -783,10 +781,11 @@ private:
}
catch( Py::TypeError &e )
{
e.clear();
std::cout << "PASSED: Correctly caught " << Py::type(e) << std::endl;
std::cout << "PASSED: Py::Exception value: " << Py::value(e) << std::endl;
std::cout << "PASSED: Py::Exception traceback: " << Py::trace(e) << std::endl;
e.clear();
}
try
......
<html>
<head>
<title>PyCXX README</title>
......@@ -32,22 +31,22 @@ p.param {background-color: #eeeeee; border-top: lightskyblue solid 4}
<h3>Windows Installation and Demo</h3>
<ol>
<li>Fetch <a href="http://prdownloads.sourceforge.net/cxx/pycxx-6.2.3.tar.gz">
http://prdownloads.sourceforge.net/cxx/pycxx-6.2.3.tar.gz</a></li>
<li>Fetch <a href="http://prdownloads.sourceforge.net/cxx/pycxx-6.2.6.tar.gz">
http://prdownloads.sourceforge.net/cxx/pycxx-6.2.6.tar.gz</a></li>
<li>Expand the archive into a directory of your choosing C:\ for example.
Note: WinZip can expand .tar.gz files.</li>
<li>Install the PyCXX files:
<ol>
<li><pre>C:> cd \pycxx-6.2.3</pre></li>
<li><pre>C:\pycxx-6.2.3> python setup.py install</pre></li>
<li><pre>C:> cd \pycxx-6.2.6</pre></li>
<li><pre>C:\pycxx-6.2.6> python setup.py install</pre></li>
</ol>
</li>
<li>Build and run the demo extensions:
<ol>
<li><pre>C:> cd \pycxx-6.2.3</pre></li>
<li><pre>C:\pycxx-6.2.3> python setup_makefile.py win32 win32.mak </pre></li>
<li><pre>C:\pycxx-6.2.3> nmake -f win32.mak clean test</pre></li>
<li><pre>C:> cd \pycxx-6.2.6</pre></li>
<li><pre>C:\pycxx-6.2.6> python setup_makefile.py win32 win32.mak </pre></li>
<li><pre>C:\pycxx-6.2.6> nmake -f win32.mak clean test</pre></li>
</ol>
</li>
</ol>
......@@ -57,18 +56,18 @@ p.param {background-color: #eeeeee; border-top: lightskyblue solid 4}
<p>Note: distutils is not available for Python 1.5.2</p>
<ol>
<li>Fetch <a href="http://prdownloads.sourceforge.net/cxx/pycxx-6.2.3.tar.gz">
http://prdownloads.sourceforge.net/cxx/pycxx-6.2.3.tar.gz</a>
<li>Fetch <a href="http://prdownloads.sourceforge.net/cxx/pycxx-6.2.6.tar.gz">
http://prdownloads.sourceforge.net/cxx/pycxx-6.2.6.tar.gz</a>
<li>Login as root. root access is typically needed on Unix systems to install the PyCXX files into the Python directories.
<li>Expand the archive into a directory of your choosing ~\ for example.
<li>Install the PyCXX files:
<ol>
<li><pre># cd ~\pycxx-6.2.3</pre>
<li><pre># cd ~\pycxx-6.2.6</pre>
<li><pre># python setup.py install</pre>
</ol>
<li>Build and run the demo extensions:
<ol>
<li><pre># cd ~\pycxx-6.2.3\Demo\Python2</pre></li>
<li><pre># cd ~\pycxx-6.2.6\Demo\Python2</pre></li>
<li><pre># python setup_makefile.py linux linux.mak</pre></li>
<li><pre># make -f linux.mak clean test</pre></li>
</ol>
......@@ -77,10 +76,19 @@ p.param {background-color: #eeeeee; border-top: lightskyblue solid 4}
<h2>Revision History</h2>
<h3>Version 6.2.3 (6-Feb-2011)</h3>
<h3>Version 6.2.6 (18-Aug-2013)</h3>
<p>Fix build issue with GCC 4.2.1 on FreeBSD and Mac OS X (stop python defining isspace as a macro).</p>
<p>Remove support for python 3.1 (API's are unstable).</p>
<p>Add Python 3.3 support.</p>
<p>Patch from Michael Droettboom to fix compilation issues.</p>
<p>Patch from Michael Droettboom to add buffer interface for python3.</p>
<h3>Version 6.2.4 (3-Mar-2012)</h3>
<p>Fix memory leak in string encode and decode functions</p>
<p>Fix indirect python loading on windows - Bool_type was missing</p>
<h3>Version 6.2.3 (11-Mar-2011)</h3>
<h3>Version 6.2.2 (26-Dec-2010)</h3>
<p>Fix problem compiling against Python 3.1.3</p>
......
......@@ -52,7 +52,23 @@ and <a href="PyCXX-Python2.html">Python 2</a> versions. The Python 3 documentati
<p>Latest PyCXX <a href="README.html">README</a> file.</p>
<hr />
<h2>Version 6.2.3 (6-Feb-2011)</h2>
<h3>Version 6.2.6 (4-Jan-2015)</h3>
<p>Fix various compiler warning.</p>
<p>Fix incorrect use of NULL.</p>
<p>Fix conversion from (const char *) to (char *) is deprecated warning.</p>
<h3>Version 6.2.5 (18-Aug-2013)</h3>
<p>Fix build issue with GCC 4.2.1 on FreeBSD and Mac OS X (stop python defining isspace as a macro).</p>
<p>Remove support for python 3.1 (API's are unstable).</p>
<p>Add Python 3.3 support.</p>
<p>Patch frm Michael Droettboom to fix compilation issues.</p>
<p>Patch frm Michael Droettboom to add buffer interface for python3.</p>
<h3>Version 6.2.4 (3-Mar-2012)</h3>
<p>Fix memory leak in string encode and decode functions</p>
<p>Fix indirect python loading on windows - Bool_type was missing</p>
<h2>Version 6.2.3 (11-mar-2011)</h2>
<p>Fix memory leak in string encode and decode functions</p>
<p>Fix indirect python loading on windows - Bool_type was missing</p>
......
......@@ -261,7 +261,9 @@ extern "C"
static int setattr_handler( PyObject *, char *, PyObject * );
static PyObject *getattro_handler( PyObject *, PyObject * );
static int setattro_handler( PyObject *, PyObject *, PyObject * );
#if defined( PYCXX_PYTHON_2TO3 )
static int compare_handler( PyObject *, PyObject * );
#endif
static PyObject *rich_compare_handler( PyObject *, PyObject *, int );
static PyObject *repr_handler( PyObject * );
static PyObject *str_handler( PyObject * );
......@@ -723,6 +725,7 @@ extern "C" int setattro_handler( PyObject *self, PyObject *name, PyObject *value
}
}
#if defined( PYCXX_PYTHON_2TO3 )
extern "C" int compare_handler( PyObject *self, PyObject *other )
{
try
......@@ -735,6 +738,7 @@ extern "C" int compare_handler( PyObject *self, PyObject *other )
return -1; // indicate error
}
}
#endif
#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 1)
extern "C" PyObject *rich_compare_handler( PyObject *self, PyObject *other, int op )
......
......@@ -262,7 +262,8 @@ extern "C"
static PyObject *number_power_handler( PyObject *, PyObject *, PyObject * );
// Buffer
// QQQ
static int buffer_get_handler( PyObject *, Py_buffer *, int );
static void buffer_release_handler( PyObject *, Py_buffer * );
}
extern "C" void standard_dealloc( PyObject *p )
......@@ -345,8 +346,8 @@ PythonType &PythonType::supportBufferType()
buffer_table = new PyBufferProcs;
memset( buffer_table, 0, sizeof( PyBufferProcs ) ); // ensure new fields are 0
table->tp_as_buffer = buffer_table;
// QQQ bf_getbuffer
// QQQ bf_releasebuffer
buffer_table->bf_getbuffer = buffer_get_handler;
buffer_table->bf_releasebuffer = buffer_release_handler;
}
return *this;
}
......@@ -1099,6 +1100,25 @@ extern "C" PyObject *number_power_handler( PyObject *self, PyObject *x1, PyObjec
}
// Buffer
extern "C" int buffer_get_handler( PyObject *self, Py_buffer *buf, int flags )
{
try
{
PythonExtensionBase *p = getPythonExtensionBase( self );
return p->buffer_get( buf, flags );
}
catch( Py::Exception & )
{
return -1; // indicate error
}
}
extern "C" void buffer_release_handler( PyObject *self, Py_buffer *buf )
{
PythonExtensionBase *p = getPythonExtensionBase( self );
p->buffer_release( buf );
// NOTE: No way to indicate error to Python
}
//================================================================================
//
......@@ -1454,7 +1474,18 @@ Py::Object PythonExtensionBase::number_power( const Py::Object &, const Py::Obje
// Buffer
// QQQ
int PythonExtensionBase::buffer_get( Py_buffer *buf, int flags )
{
missing_method( buffer_get );
return -1;
}
int PythonExtensionBase::buffer_release( Py_buffer *buf )
{
/* This method is optional and only required if the buffer's
memory is dynamic. */
return 0;
}
//--------------------------------------------------------------------------------
//
......
setlocal
call setup-msvc90
c:\python27.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python27-build.log
nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python27-test.log
c:\python32.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python32-build.log
nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python32-test.log
c:\python33.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python33-build.log
nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python33-test.log
c:\python34.win32\python setup_makefile.py win32 win32.mak
nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python34-build.log
nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python34-test.log
endlocal
......@@ -3,12 +3,11 @@ set -e
OS=${1:-macosx}
for PYTHON in \
python2.4 \
python2.5 \
python2.6 \
python2.7 \
python3.1 \
python3.2 \
python3.3 \
python3.4 \
;
do
if which $PYTHON >/dev/null
......
......@@ -11,7 +11,7 @@ How to release PyCXX
3. Select File
4. Create New Folder
5. Name the Folder PyCXX V<maj>.<min>.<patch> e.g. PyCXX V6.1.1
7. Upload the source kit and its PyCXX-Release-Notes-readme.txt
7. Upload the source kit and its PyCXX-Release-Notes-readme.txt (as README.txt)
9. Click on the source kit (i) icon and choose Select All platforms
4. Add news about release
1. Click Develop
......
......@@ -12,18 +12,18 @@ sources = (glob( os.path.join( "Src", "*.cxx" ) )
class my_install (install):
def finalize_options (self):
if not self.install_data or (len(self.install_data) < 8) :
self.install_data = "$base/share/python$py_version_short"
if not self.install_data or (len(self.install_data) < 8) :