Jelmer Vernooij [Thu, 21 Nov 2013 02:05:10 +0000 (02:05 +0000)]
Use subprocess.Popen() over os.popen3() and check GCC exit status
The os.popen3() functions is gone in Python 3.
Before this change it looks like is_keychain_provider_available() would
always indicate success, even if the GCC command failed. Python 2’s
os.popen3() function appears to only return normal file objects, whose
close() methods do not return anything.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Patch by Martin Panter.
Jelmer Vernooij [Thu, 21 Nov 2013 02:22:22 +0000 (02:22 +0000)]
Use exception handler target variable to avoid reference cycle
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Patch by Martin Panter.
Jelmer Vernooij [Sun, 8 Dec 2013 19:37:53 +0000 (19:37 +0000)]
Add travis config.
Jelmer Vernooij [Wed, 4 Dec 2013 02:29:32 +0000 (02:29 +0000)]
Use https in homepage URL.
Jelmer Vernooij [Wed, 4 Dec 2013 02:28:41 +0000 (02:28 +0000)]
Use https URL.
Jelmer Vernooij [Wed, 4 Dec 2013 01:32:56 +0000 (01:32 +0000)]
Update author info.
Jelmer Vernooij [Wed, 20 Nov 2013 12:33:21 +0000 (12:33 +0000)]
Fix raising deferred socket exception
Python 3 deletes the exception variable at the end of the exception handler,
so we have to explicitly save it in another variable. Make sure that variable
is eventually deleted to avoid the traceback causing a reference cycle.
Verified by running the code
subvertpy.ra_svn.SVNClient("svn://wbr")
where “wbr” is in my “/etc/hosts” file but is not connectable.
This also breaks an import dependency cycle between “subvertpy.ra” and
“subvertpy.ra_svn”, because Python 3 is less forgiving than Python 2.
Patch by Martin Panter
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Tue, 3 Sep 2013 02:27:04 +0000 (02:27 +0000)]
Hint about how to stop the torrent of deprecation warnings
Patch by Martin Panter.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Sat, 9 Nov 2013 14:17:59 +0000 (14:17 +0000)]
Fix use of print().
Jelmer Vernooij [Sat, 9 Nov 2013 00:47:46 +0000 (00:47 +0000)]
Credits for Python3 port.
Jelmer Vernooij [Fri, 8 Nov 2013 23:51:39 +0000 (23:51 +0000)]
Remove unnecessary HAVE_ITER.
Jelmer Vernooij [Tue, 24 Sep 2013 12:51:34 +0000 (12:51 +0000)]
Style fixes in and near recent changes
Patch by Martin Panter.
Jelmer Vernooij [Fri, 13 Sep 2013 05:23:05 +0000 (05:23 +0000)]
Fix TXDELTA_TARGET action and use more explicit extend() and append() methods
Patch by Martin Panter.
Jelmer Vernooij [Fri, 13 Sep 2013 05:18:54 +0000 (05:18 +0000)]
Excercise all kinds of delta operations in test
Should catch broken byte indexing in TXDELTA_TARGET handling.
Patch by Martin Panter.
Jelmer Vernooij [Sun, 8 Sep 2013 04:28:49 +0000 (04:28 +0000)]
Rename and comment string_to_utf8(), string_to_canonical_path(), etc
Patch by Martin Panter.
Jelmer Vernooij [Sun, 8 Sep 2013 02:55:38 +0000 (02:55 +0000)]
Remove unnecessary code
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 11:27:51 +0000 (11:27 +0000)]
Check PyBytes_AsStringAndSize return value(); also fix reference counting
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 01:55:10 +0000 (01:55 +0000)]
string_path_canonicalize() for using svn_path_canonicalize() on str() object
Patch by Martin Panter.
Jelmer Vernooij [Tue, 3 Sep 2013 04:42:12 +0000 (04:42 +0000)]
Port more PyString_AsString() calls by allocating APR pool memory
Encode the string to a UTF-8 bytes() object and copy the data into a buffer
so that the bytes() object can be dereferenced before Subversion has finished
using the buffer. This also adds more exception checking.
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 06:36:10 +0000 (06:36 +0000)]
Port PyString_AsString() calls
Need to keep track of new intermediate bytes() object.
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 12:03:31 +0000 (12:03 +0000)]
Add py_to_svn_string() to help check errors and avoid buffer deallocation
Patch by Martin Panter.
Jelmer Vernooij [Mon, 2 Sep 2013 03:54:49 +0000 (03:54 +0000)]
Add string_dict_to_hash(); check for errors; ensure buffers not freed
Temporary buffers are allocated in the APR pool to hold the strings because
the original objects may be freed before the Subversion call is finished.
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 03:27:00 +0000 (03:27 +0000)]
string_pmemdup() to use str() objects as null terminated APR hash keys
Patch by Martin Panter.
Jelmer Vernooij [Sun, 1 Sep 2013 14:27:11 +0000 (14:27 +0000)]
Add string_pstrdup(): error checking, avoid buffer deallocation
Patch by Martin Panter.
Jelmer Vernooij [Sun, 1 Sep 2013 13:27:46 +0000 (13:27 +0000)]
Use PyUnicode_CompareWithASCIIString() for strcmp() with PyString_AsString()
Also adds a type check that wasn’t present before.
Patch by Martin Panter.
Jelmer Vernooij [Sun, 1 Sep 2013 08:24:30 +0000 (08:24 +0000)]
Use PyUnicode_FSConverter() for file names
This function was only added in Python 3.1.
The open_tmp_file() change was only tested by artificially calling the
callback, because I could not find an easy way to trigger it in normal usage.
Patch by Martin Panter.
Jelmer Vernooij [Wed, 28 Aug 2013 04:26:20 +0000 (04:26 +0000)]
Set Python interpreter commands to “python3”
Patch by Martin Panter.
Jelmer Vernooij [Wed, 28 Aug 2013 05:15:44 +0000 (05:15 +0000)]
Write bytes to stdout in subvertpy-fast-export and example
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 04:01:40 +0000 (04:01 +0000)]
Document Python 3.1 dependency
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 14:32:00 +0000 (14:32 +0000)]
Use text character instead of byte string for log action
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 14:28:31 +0000 (14:28 +0000)]
Use new print() function syntax, with help from “2to3”
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 08:46:35 +0000 (08:46 +0000)]
Use byte strings in marshall
Patch by Martin Panter.
Yonggang Luo [Thu, 18 Oct 2012 17:11:18 +0000 (01:11 +0800)]
Handle str() type change in marshall; use isinstance()
Jelmer Vernooij [Mon, 26 Aug 2013 16:34:16 +0000 (16:34 +0000)]
Use byte strings rather than character strings in “delta” module
* Use bytearray() rather than a list of chunks when building up a buffer
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 12:03:34 +0000 (12:03 +0000)]
Use bytes for file data
Patch by Martin Panter.
Jelmer Vernooij [Wed, 28 Aug 2013 10:27:45 +0000 (10:27 +0000)]
range() is renamed in Python 3
Patch by Martin Panter.
Yonggang Luo [Thu, 18 Oct 2012 15:45:16 +0000 (23:45 +0800)]
“socketserver” is renamed in Python 3
Yonggang Luo [Thu, 18 Oct 2012 15:29:01 +0000 (23:29 +0800)]
Adapt to Python 3’s dictionary view methods
Yonggang Luo [Thu, 18 Oct 2012 11:11:25 +0000 (19:11 +0800)]
Adapt to splitup of “urllib” in Python 3
Jelmer Vernooij [Wed, 28 Aug 2013 09:19:31 +0000 (09:19 +0000)]
Remove compatibility workarounds for Python < 3
Patch by Martin Panter.
Yonggang Luo [Thu, 18 Oct 2012 04:04:27 +0000 (12:04 +0800)]
Use BytesIO instead of StringIO
Yonggang Luo [Sat, 20 Oct 2012 08:24:09 +0000 (16:24 +0800)]
Partially port C modules to Python 3.1; drop Python 2 compatibility
py_stream_read and py_stream_write should operate on bytes because Subversion
accepts raw data.
Jelmer Vernooij [Wed, 4 Sep 2013 03:38:32 +0000 (03:38 +0000)]
Add missing exception handling for PyString_FromString() calls
In Python 3 these will all involve UTF-8 decoding, which can easily trigger
exceptions for invalid UTF-8 data. For instance this happened when running
the tests and a commit was made with the “svn:log” string accidentally not
terminated. The string had random non UTF-8 data appended to it.
Patch by Martin Panter.
Jelmer Vernooij [Mon, 2 Sep 2013 01:20:54 +0000 (01:20 +0000)]
Factor common error cleanup code with goto
Should fix numerous leaks of APR pools, Python object references, and the RA
busy flag.
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 07:31:08 +0000 (07:31 +0000)]
Factor out ra_get_log_prepare() to share with get_log() and iter_log()
Patch by Martin Panter.
Jelmer Vernooij [Wed, 4 Sep 2013 05:01:18 +0000 (05:01 +0000)]
Factor common svn_log_message_receiver_t code into pyify_log_message()
Patch by Martin Panter.
Yonggang Luo [Wed, 17 Oct 2012 15:19:47 +0000 (23:19 +0800)]
Line endings from diff() depend on the platform.
On Windows this test would fail because the computed diff has CRLF line
endings.
Jelmer Vernooij [Tue, 27 Aug 2013 03:17:17 +0000 (03:17 +0000)]
Test that delta.apply_txdelta_window() and friends work
Patch by Martin Panter.
Yonggang Luo [Sun, 28 Oct 2012 03:08:35 +0000 (11:08 +0800)]
Python 3 doesn’t have these file objects
Yonggang Luo [Fri, 19 Oct 2012 09:40:25 +0000 (17:40 +0800)]
Use int instead of long; use new octal literal syntax
Jelmer Vernooij [Tue, 27 Aug 2013 12:14:17 +0000 (12:14 +0000)]
Use new exception handling syntax
Patch by Martin Panter.
Yonggang Luo [Wed, 24 Oct 2012 02:13:34 +0000 (10:13 +0800)]
Streams should be compared to bytes
Yonggang Luo [Fri, 19 Oct 2012 08:53:08 +0000 (16:53 +0800)]
Use single parameter instead of tuple.
Yonggang Luo [Thu, 18 Oct 2012 17:15:54 +0000 (01:15 +0800)]
Use the next() function in test_ra
Yonggang Luo [Wed, 24 Oct 2012 01:50:47 +0000 (09:50 +0800)]
Convert URL from bytes to str for RemoteAccess
Yonggang Luo [Fri, 19 Oct 2012 09:36:33 +0000 (17:36 +0800)]
Make sure delta.py handles streams in binary string mode, so we can always use BytesIO
Jelmer Vernooij [Tue, 27 Aug 2013 04:02:01 +0000 (04:02 +0000)]
Remove compatibility workarounds for Python < 2.6
Patch by Martin Panter.
Jelmer Vernooij [Wed, 30 Oct 2013 01:15:51 +0000 (01:15 +0000)]
Make sure trunk path starts with a forward slash.
Patch by Martin Panter.
Jelmer Vernooij [Fri, 25 Oct 2013 08:40:14 +0000 (09:40 +0100)]
Use generator expressions rather than list comprehensions
Generator expressions added in Python 2.4
Patch from Martin Panter.
Jelmer Vernooij [Mon, 26 Aug 2013 16:43:05 +0000 (16:43 +0000)]
Use constant from “errno” module
Patch from Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 14:29:24 +0000 (14:29 +0000)]
Consistent quote signs in error message
Patch by Martin Panter.
Jelmer Vernooij [Fri, 23 Aug 2013 08:38:50 +0000 (08:38 +0000)]
Clarify microseconds for timestamp
Patch by Martin Panter.
Jelmer Vernooij [Wed, 9 Oct 2013 00:46:05 +0000 (00:46 +0000)]
Document get_log() and iter_log() default arguments
Patch by Martin Panter.
Jelmer Vernooij [Tue, 27 Aug 2013 14:30:33 +0000 (14:30 +0000)]
Make _ra.CredentialsIter a proper iterator in Python < 3
This allows Python 2.6’s next() built-in function to be used. Previously
only calling the next() method would work.
Patch from Martin Panter.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Tue, 27 Aug 2013 03:17:17 +0000 (03:17 +0000)]
Test that delta.apply_txdelta_window() and friends work
Patch from Martin Panter.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Yonggang Luo [Mon, 22 Oct 2012 03:26:36 +0000 (11:26 +0800)]
Get setup.py can running unittest from build directory.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Wed, 28 Aug 2013 07:38:16 +0000 (07:38 +0000)]
Fix errors with the contents of changed_paths from a log call
Patch by Martin Panter.
Jelmer Vernooij [Wed, 28 Aug 2013 05:23:00 +0000 (05:23 +0000)]
Use “key in dict” syntax rather than dict.has_key()
Introduced in Python 2.2
Patch by Martin Panter
Jelmer Vernooij [Tue, 27 Aug 2013 08:42:56 +0000 (08:42 +0000)]
Encode the number of UTF-8 bytes in subvertpy.marshall.marshall()
Patch by Martin Panter
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Martin Panter [Sun, 4 Aug 2013 05:38:12 +0000 (05:38 +0000)]
Document some callback functions, and a RemoteAccess.iter_log() quirk
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Martin Panter [Sun, 4 Aug 2013 04:25:29 +0000 (04:25 +0000)]
Documentation corrections
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Martin Panter [Fri, 2 Aug 2013 07:59:54 +0000 (07:59 +0000)]
Fix function name for Reporter.link_path()
Previously, calling “reporter.link_path()” would say
TypeError: kink_path() takes at least 4 arguments (0 given)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Mitsuhiro Koga [Wed, 8 May 2013 22:12:29 +0000 (23:12 +0100)]
Support failing server certification check.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Mon, 6 May 2013 22:55:11 +0000 (23:55 +0100)]
Start on 0.9.2.
Jelmer Vernooij [Mon, 6 May 2013 22:46:09 +0000 (23:46 +0100)]
Release 0.9.1.
Jelmer Vernooij [Mon, 6 May 2013 22:23:59 +0000 (23:23 +0100)]
Update NEWS.
Yonggang Luo [Mon, 6 May 2013 22:18:04 +0000 (23:18 +0100)]
Use PyObject_AsFileDescriptor instead of PyFile_AsFile and fileno.
So that apr_file_from_object works under Win32.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Sat, 4 May 2013 15:39:59 +0000 (16:39 +0100)]
For the moment, disable subvertpy.wc.WorkingCopy when used with Subversion 1.7.
Subversion 1.7 has some significant changes in the behaviour of
the working copy API because of the WC-NG rewrite.
Support for the WC API in newer versions of Subversion will be re-added later
(help welcome), but since most users (bzr-svn is the only I'm aware of)
don't seem to actually rely on it, it seemed better to disable it and
support 1.7 than to prevent use of newer svn versions altogether.
Jelmer Vernooij [Sat, 27 Oct 2012 13:56:26 +0000 (05:56 -0800)]
gitignore: Ignore .pyc and .so files.
Yonggang Luo [Wed, 17 Oct 2012 15:52:52 +0000 (23:52 +0800)]
From subvertpy import.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Yonggang Luo [Fri, 19 Oct 2012 12:46:13 +0000 (20:46 +0800)]
addCleanup for file close.
Conflicts:
subvertpy/tests/test_client.py
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Yonggang Luo [Fri, 19 Oct 2012 13:27:04 +0000 (21:27 +0800)]
Use self.assertEqual instead self.assertEquals
Use self.assertTrue instead self.assert_
Conflicts:
subvertpy/tests/test_client.py
subvertpy/tests/test_delta.py
subvertpy/tests/test_ra.py
subvertpy/tests/test_repos.py
subvertpy/tests/test_wc.py
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Yonggang Luo [Sat, 20 Oct 2012 21:37:25 +0000 (14:37 -0700)]
os.tmpfile need administrator permission on Win7 and Vista
use tempfile.TemporaryFile instead.
http://stackoverflow.com/questions/
7807855/os-tmpfile-doesnt-work-under-windows
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Sat, 20 Oct 2012 21:32:22 +0000 (14:32 -0700)]
Fix running TestClient.test_info against Subversion 1.6.
Bug: https://bugs.launchpad.net/subvertpy/+bug/
1062247
Yonggang Luo [Tue, 16 Oct 2012 12:40:24 +0000 (20:40 +0800)]
Fix typo in README.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Jelmer Vernooij [Sun, 8 Jul 2012 12:23:49 +0000 (14:23 +0200)]
Add git ignore file.
Jelmer Vernooij [Sun, 8 Jul 2012 12:18:26 +0000 (14:18 +0200)]
Start on 0.9.1.
Jelmer Vernooij [Sun, 8 Jul 2012 12:15:01 +0000 (14:15 +0200)]
Release 0.9.0.
Jelmer Vernooij [Sun, 13 May 2012 02:00:36 +0000 (04:00 +0200)]
Update FSF address.
Jelmer Vernooij [Fri, 4 May 2012 18:36:10 +0000 (20:36 +0200)]
Fix compilation error.
Jelmer Vernooij [Thu, 3 May 2012 11:36:46 +0000 (13:36 +0200)]
Add working copy example.
Jelmer Vernooij [Thu, 3 May 2012 11:14:23 +0000 (13:14 +0200)]
In Client.checkout, default to HEAD revision.
Jelmer Vernooij [Thu, 3 May 2012 11:13:50 +0000 (13:13 +0200)]
Add another docstring.
Jelmer Vernooij [Mon, 26 Mar 2012 09:44:03 +0000 (11:44 +0200)]
Add constant ERR_WC_UPGRADE_REQUIRED.
Jelmer Vernooij [Mon, 12 Mar 2012 17:27:31 +0000 (18:27 +0100)]
Fix compilation against svn 1.7.
Jelmer Vernooij [Mon, 12 Mar 2012 17:14:35 +0000 (18:14 +0100)]
Merge fix for test URLs on Windows from Yonggang Luo.
Yonggang Luo [Mon, 12 Mar 2012 16:32:02 +0000 (00:32 +0800)]
path to url should call pathname2url, so that the URL is consistent.
Yonggang Luo [Mon, 12 Mar 2012 01:26:46 +0000 (09:26 +0800)]
path to url should call pathname2url, so that the URL is consistent.
Yonggang Luo [Sun, 11 Mar 2012 15:27:06 +0000 (23:27 +0800)]
Create temp file with correct filename under Windows OS.
Jelmer Vernooij [Sun, 11 Mar 2012 03:45:45 +0000 (04:45 +0100)]
Merge fix from Yonggang Luo for skipping test that requires tzset on Windows.