Commit 5ca41ef4 authored by Josué Ortega's avatar Josué Ortega

Import pysvn_1.9.5.orig.tar.gz

parent fdbb6c2a
MAJOR=1
MINOR=9
PATCH=4
PATCH=5
BUILD=0
......@@ -926,10 +926,10 @@ pysvn.Revision( opt_revision_kind.working ).
working copy (WC) path or URL:
</p>
<ul>
<li>WC -&rt; WC: copy and schedule for addition (with history)</li>
<li>WC -&rt; URL: immediately commit a copy of WC to URL</li>
<li>URL -&rt; WC: check out URL into WC, schedule for addition</li>
<li>URL -&rt; URL: complete server-side copy; used to branch and tag</li>
<li>WC -&gt; WC: copy and schedule for addition (with history)</li>
<li>WC -&gt; URL: immediately commit a copy of WC to URL</li>
<li>URL -&gt; WC: check out URL into WC, schedule for addition</li>
<li>URL -&gt; URL: complete server-side copy; used to branch and tag</li>
</ul>
<p>If the destination is a URL the <a href="#pysvn_client_callback_get_log_message">client_get_log_message</a>
callback must be implemented to return a log message.
......@@ -1504,7 +1504,7 @@ entries_list = \
list( url_or_path,
peg_revision=pysvn.Revision( opt_revision_kind.unspecified ) )
revision=pysvn.Revision( opt_revision_kind.head ),
recurse=True,
recurse=False,
dirent_fields=pysvn.SVN_DIRENT_ALL,
fetch_locks=False<span class="svn_1005000">,
depth=depth</span> )
......@@ -1521,7 +1521,7 @@ defaults to opt_revision_kind.head for URLs or
opt_revision_kind.working for WC targets.
</p>
<div class="svn_1005000">
<p>The depth can be used as in place of recurse. depth is one of the pysvn.depth enums.
<p>The depth can be used in place of recurse. depth is one of the pysvn.depth enums.
</p>
</div>
......
......@@ -219,6 +219,7 @@ class SvnCommand:
self.notify_message_list = []
self.pysvn_testing = False
self.debug_enabled = False
self.next_log_message = None
def debug( self, msg, args=() ):
if self.debug_enabled:
......@@ -309,10 +310,15 @@ class SvnCommand:
while save_password.lower() not in ['y','ye','yes','n', 'no','']:
sys.stdout.write( 'Save password? [y/n] ' )
save_password = sys.stdin.readline().strip()
return 1, username, password, save_password in ['y','ye','yes']
def getLogMessage( self ):
if self.next_log_message is not None:
message = self.next_log_message
self.next_log_message = None
return message
sys.stdout.write( 'Log message\n' )
sys.stdout.write( '--- -------\n' )
message = sys.stdin.read()
......@@ -469,7 +475,7 @@ class SvnCommand:
positional_args.append( '.' )
if msg == '':
msg = self.getLogMessage()
commit_info = self.client.checkin( positional_args, msg, recurse=recurse )
rev = commit_info["revision"]
self.printNotifyMessages()
......@@ -800,7 +806,6 @@ class SvnCommand:
path2, rev2 = self.parsePathWithRevision( positional_args[1] )
wcpath = positional_args[2]
self.client.merge( path1, revision1, path2, revision2, wcpath,
recurse=recurse, dry_run=dry_run, notice_ancestry=notice_ancestry )
......@@ -952,6 +957,8 @@ class SvnCommand:
self.client.propdel_local( positional_args[0], positional_args[1] )
def cmd_propset_remote( self, args ):
self.next_log_message = args.getOptionalValue( '--message', None )
skip_checks = args.getBooleanOption( '--skip-checks', True )
revision = args.getOptionalRevision( '--revision', '0' )
positional_args = args.getPositionalArgs( 3, 3 )
......@@ -963,6 +970,8 @@ class SvnCommand:
self.client.propset_remote( positional_args[0], positional_args[1], positional_args[2], skip_checks=skip_checks )
def cmd_propdel_remote( self, args ):
self.next_log_message = args.getOptionalValue( '--message', None )
revision = args.getOptionalRevision( '--revision', '0' )
positional_args = args.getPositionalArgs( 2, 2 )
......
//-----------------------------------------------------------------------------
//
// Copyright (c) 1998 - 2007, The Regents of the University of California
// Produced at the Lawrence Livermore National Laboratory
// All rights reserved.
//
// This file is part of PyCXX. For details,see http://cxx.sourceforge.net/. The
// full copyright notice is contained in the file COPYRIGHT located at the root
// of the PyCXX distribution.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the disclaimer below.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the disclaimer (as noted below) in the
// documentation and/or materials provided with the distribution.
// - Neither the name of the UC/LLNL nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
// CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//-----------------------------------------------------------------------------
#ifndef __CXX_Exception_h
#define __CXX_Exception_h
#include "CXX/WrapPython.h"
#include "CXX/Version.hxx"
#include "CXX/Config.hxx"
#include "CXX/IndirectPythonInterface.hxx"
#include <string>
#include <iostream>
// This mimics the Python structure, in order to minimize confusion
namespace Py
{
class ExtensionExceptionType;
class Object;
class Exception
{
public:
Exception( ExtensionExceptionType &exception, const std::string& reason );
Exception( ExtensionExceptionType &exception, Object &reason );
explicit Exception ()
{}
Exception (const std::string& reason)
{
PyErr_SetString (Py::_Exc_RuntimeError(), reason.c_str());
}
Exception (PyObject* exception, const std::string& reason)
{
PyErr_SetString (exception, reason.c_str());
}
Exception (PyObject* exception, Object &reason);
void clear() // clear the error
// technically but not philosophically const
{
PyErr_Clear();
}
};
// Abstract
class StandardError: public Exception
{
protected:
explicit StandardError()
{}
};
class LookupError: public StandardError
{
protected:
explicit LookupError()
{}
};
class ArithmeticError: public StandardError
{
protected:
explicit ArithmeticError()
{}
};
class EnvironmentError: public StandardError
{
protected:
explicit EnvironmentError()
{}
};
// Concrete
class TypeError: public StandardError
{
public:
TypeError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_TypeError(),reason.c_str());
}
};
class IndexError: public LookupError
{
public:
IndexError (const std::string& reason)
: LookupError()
{
PyErr_SetString (Py::_Exc_IndexError(), reason.c_str());
}
};
class AttributeError: public StandardError
{
public:
AttributeError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_AttributeError(), reason.c_str());
}
};
class NameError: public StandardError
{
public:
NameError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_NameError(), reason.c_str());
}
};
class RuntimeError: public StandardError
{
public:
RuntimeError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_RuntimeError(), reason.c_str());
}
};
class NotImplementedError: public StandardError
{
public:
NotImplementedError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_NotImplementedError(), reason.c_str());
}
};
class SystemError: public StandardError
{
public:
SystemError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_SystemError(),reason.c_str());
}
};
class KeyError: public LookupError
{
public:
KeyError (const std::string& reason)
: LookupError()
{
PyErr_SetString (Py::_Exc_KeyError(),reason.c_str());
}
};
class ValueError: public StandardError
{
public:
ValueError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_ValueError(), reason.c_str());
}
};
class OverflowError: public ArithmeticError
{
public:
OverflowError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString (Py::_Exc_OverflowError(), reason.c_str());
}
};
class ZeroDivisionError: public ArithmeticError
{
public:
ZeroDivisionError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString (Py::_Exc_ZeroDivisionError(), reason.c_str());
}
};
class FloatingPointError: public ArithmeticError
{
public:
FloatingPointError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString (Py::_Exc_FloatingPointError(), reason.c_str());
}
};
class MemoryError: public StandardError
{
public:
MemoryError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_MemoryError(), reason.c_str());
}
};
class SystemExit: public StandardError
{
public:
SystemExit (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_SystemExit(),reason.c_str());
}
};
}// Py
#endif
//-----------------------------------------------------------------------------
//
// Copyright (c) 1998 - 2007, The Regents of the University of California
// Produced at the Lawrence Livermore National Laboratory
// All rights reserved.
//
// This file is part of PyCXX. For details,see http://cxx.sourceforge.net/. The
// full copyright notice is contained in the file COPYRIGHT located at the root
// of the PyCXX distribution.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the disclaimer below.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the disclaimer (as noted below) in the
// documentation and/or materials provided with the distribution.
// - Neither the name of the UC/LLNL nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
// CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//-----------------------------------------------------------------------------
#ifndef __CXX_Exception_h
#define __CXX_Exception_h
#include "CXX/WrapPython.h"
#include "CXX/Version.hxx"
#include "CXX/Python3/Config.hxx"
#include "CXX/Python3/CxxDebug.hxx"
#include "CXX/Python3/IndirectPythonInterface.hxx"
#include <string>
#include <iostream>
// This mimics the Python structure, in order to minimize confusion
namespace Py
{
class ExtensionExceptionType;
class Object;
class Exception
{
public:
Exception( ExtensionExceptionType &exception, const std::string &reason );
Exception( ExtensionExceptionType &exception, Object &reason );
explicit Exception ()
{}
Exception (const std::string &reason)
{
PyErr_SetString( Py::_Exc_RuntimeError(), reason.c_str() );
}
Exception( PyObject *exception, const std::string &reason )
{
PyErr_SetString( exception, reason.c_str() );
}
Exception( PyObject *exception, Object &reason );
void clear() // clear the error
// technically but not philosophically const
{
PyErr_Clear();
}
};
// Abstract
class StandardError: public Exception
{
protected:
explicit StandardError()
{}
};
class LookupError: public StandardError
{
protected:
explicit LookupError()
{}
};
class ArithmeticError: public StandardError
{
protected:
explicit ArithmeticError()
{}
};
class EnvironmentError: public StandardError
{
protected:
explicit EnvironmentError()
{}
};
// Concrete
class TypeError: public StandardError
{
public:
TypeError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_TypeError(),reason.c_str() );
}
};
class IndexError: public LookupError
{
public:
IndexError (const std::string& reason)
: LookupError()
{
PyErr_SetString( Py::_Exc_IndexError(), reason.c_str() );
}
};
class AttributeError: public StandardError
{
public:
AttributeError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_AttributeError(), reason.c_str() );
}
};
class NameError: public StandardError
{
public:
NameError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_NameError(), reason.c_str() );
}
};
class RuntimeError: public StandardError
{
public:
RuntimeError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_RuntimeError(), reason.c_str() );
}
};
class NotImplementedError: public StandardError
{
public:
NotImplementedError (const std::string& reason)
: StandardError()
{
PyErr_SetString (Py::_Exc_NotImplementedError(), reason.c_str());
}
};
class SystemError: public StandardError
{
public:
SystemError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_SystemError(),reason.c_str() );
}
};
class KeyError: public LookupError
{
public:
KeyError (const std::string& reason)
: LookupError()
{
PyErr_SetString( Py::_Exc_KeyError(),reason.c_str() );
}
};
class ValueError: public StandardError
{
public:
ValueError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_ValueError(), reason.c_str() );
}
};
class OverflowError: public ArithmeticError
{
public:
OverflowError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString( Py::_Exc_OverflowError(), reason.c_str() );
}
};
class ZeroDivisionError: public ArithmeticError
{
public:
ZeroDivisionError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString( Py::_Exc_ZeroDivisionError(), reason.c_str() );
}
};
class FloatingPointError: public ArithmeticError
{
public:
FloatingPointError (const std::string& reason)
: ArithmeticError()
{
PyErr_SetString( Py::_Exc_FloatingPointError(), reason.c_str() );
}
};
class MemoryError: public StandardError
{
public:
MemoryError (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_MemoryError(), reason.c_str() );
}
};
class SystemExit: public StandardError
{
public:
SystemExit (const std::string& reason)
: StandardError()
{
PyErr_SetString( Py::_Exc_SystemExit(),reason.c_str() );
}
};
}// Py
#endif
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PyCXX: Write Python Extensions in C++</title>
</head>
<body>
<center><b>PyCXX: Write Python Extensions in C++</b>
<p><b>Barry Scott, barry@barrys-emacs.org</b>
</center>
<p><b>The <a href="http://sourceforge.net/project/?group_id=3180">CXX
Project Page</a> at&nbsp;<a href="http://sourceforge.net"><img SRC="http://sourceforge.net/sflogo.php?group_id=3180&type=1" alt="SourceForge Home" nosave height="31" width="88" align="abscenter"></a>
gives you access to the releases, the Subversion repository, and more.</b>
<p>
<h1>PyCXX is designed to make it easier to extend Python with C++</h1>
<p>
CXX/Objects is a set of C++ facilities to make it easier
to write Python extensions. The chief way in which PyCXX makes it easier
to write Python extensions is that it greatly increases the probability
that your program will not make a reference-counting error and will not
have to continually check error returns from the Python C API. CXX/Objects
integrates Python with C++ in these ways:
<p>
<ul>
<li>
C++ exception handling is relied on to detect errors
and clean up. In a complicated function this is often a tremendous problem
when writing in C. With PyCXX, we let the compiler keep track of what objects
need to be dereferenced when an error occurs.</li>
<li>
The Standard Template Library (STL) and its many algorithms
plug and play with Python containers such as lists and tuples.
</li>
<li>
The optional CXX/Extensions facility allows you to replace the clumsy C tables with objects
and method calls that define your modules and extension objects.
</li>
</ul>
<hr />
<p>PyCXX documentation is split into <a href="PyCXX-Python3.html">Python 3</a>
and <a href="PyCXX-Python2.html">Python 2</a> versions. The Python 3 documentation is the most accurate.</p>
<p>Latest PyCXX <a href="README.html">README</a> file.</p>
<hr />
<h3>Version 6.2.8 (10-May-2016)</h3>
<p>Fix crash when a member function is called via callMemberFunction() and that function raises an expection.</p>
<p>Found in comment on StackOverFlow. Fix memory size allocated for new objects. It used the wrong size calculation, but was big enough to avoid problems.</p>
<h3>Version 6.2.7 (28-Apr-2016)</h3>
<p>Fix missing ptr__Unicode_Type.</p>
<p>Fixes from learn0more@gmail.com make python2 also remember the m_module and add accessor functions.</p>
<p>Fix for indirection issues from Vivian De Smedt.</p>