You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/09/11 14:56:44 UTC
svn commit: r1383390 - in
/subversion/branches/1.6.x-testsuite-apr-hash-order: ./
subversion/bindings/swig/python/tests/repository.py
subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
Author: stsp
Date: Tue Sep 11 12:56:43 2012
New Revision: 1383390
URL: http://svn.apache.org/viewvc?rev=1383390&view=rev
Log:
On the 1.6.x-testsuite-apr-hash-order branch, merge the following revisions
from trunk: r1292255, r1292260, r1292296, and r1292322 (clean merge).
Allows the swig-py tests to run with APR 1.4.6
Modified:
subversion/branches/1.6.x-testsuite-apr-hash-order/ (props changed)
subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/repository.py
subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
Propchange: subversion/branches/1.6.x-testsuite-apr-hash-order/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1292255,1292260,1292296,1292322
Modified: subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/repository.py?rev=1383390&r1=1383389&r2=1383390&view=diff
==============================================================================
--- subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/repository.py Tue Sep 11 12:56:43 2012
@@ -133,9 +133,11 @@ class SubversionRepositoryTestCase(unitt
repos.dir_delta(prev_root, '', '', this_root, '', e_ptr, e_baton,
_authz_callback, 1, 1, 0, 0)
- # Check results
- self.assertEqual(editor.textdeltas[0].new_data, "This is a test.\n")
- self.assertEqual(editor.textdeltas[1].new_data, "A test.\n")
+ # Check results.
+ # Ignore the order in which the editor delivers the two sibling files.
+ self.assertEqual(set([editor.textdeltas[0].new_data,
+ editor.textdeltas[1].new_data]),
+ set(["This is a test.\n", "A test.\n"]))
self.assertEqual(len(editor.textdeltas),2)
def test_retrieve_and_change_rev_prop(self):
Modified: subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py?rev=1383390&r1=1383389&r2=1383390&view=diff
==============================================================================
--- subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py (original)
+++ subversion/branches/1.6.x-testsuite-apr-hash-order/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py Tue Sep 11 12:56:43 2012
@@ -224,30 +224,50 @@ class SubversionRepositoryTestCase(unitt
def test_diff_dir_different_revs(self):
diffs = self.repos.get_deltas('trunk', 4, 'trunk', 8)
- self._cmp_diff((None, ('trunk/dir1/dir2', 8),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('trunk/dir1/dir3', 8),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('trunk/README2.txt', 6),
- (Node.FILE, Changeset.ADD)), diffs.next())
- self._cmp_diff((('trunk/dir2', 4), None,
- (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
- self._cmp_diff((('trunk/dir3', 4), None,
- (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
+ expected = [
+ (None, ('trunk/README2.txt', 6),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('trunk/dir1/dir2', 8),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('trunk/dir1/dir3', 8),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (('trunk/dir2', 4), None,
+ (Node.DIRECTORY, Changeset.DELETE)),
+ (('trunk/dir3', 4), None,
+ (Node.DIRECTORY, Changeset.DELETE)),
+ ]
+ actual = [diffs.next() for i in range(5)]
+ actual = sorted(actual,
+ key=lambda diff: ((diff[0] or diff[1]).path,
+ (diff[0] or diff[1]).rev))
+ self.assertEqual(len(expected), len(actual))
+ for e,a in zip(expected, actual):
+ self._cmp_diff(e,a)
self.assertRaises(StopIteration, diffs.next)
def test_diff_dir_different_dirs(self):
diffs = self.repos.get_deltas('trunk', 1, 'branches/v1x', 12)
- self._cmp_diff((None, ('branches/v1x/dir1', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/dir1/dir2', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/dir1/dir3', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/README.txt', 12),
- (Node.FILE, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/README2.txt', 12),
- (Node.FILE, Changeset.ADD)), diffs.next())
+ expected = [
+ (None, ('branches/v1x/README.txt', 12),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('branches/v1x/README2.txt', 12),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('branches/v1x/dir1', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('branches/v1x/dir1/dir2', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('branches/v1x/dir1/dir3', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ ]
+ actual = [diffs.next() for i in range(5)]
+ actual = sorted(actual, key=lambda diff: (diff[1].path, diff[1].rev))
+ # for e,a in zip(expected, actual):
+ # t.write("%r\n" % (e,))
+ # t.write("%r\n" % ((None, (a[1].path, a[1].rev), (a[2], a[3])),) )
+ # t.write('\n')
+ self.assertEqual(len(expected), len(actual))
+ for e,a in zip(expected, actual):
+ self._cmp_diff(e,a)
self.assertRaises(StopIteration, diffs.next)
def test_diff_dir_no_change(self):