more hash order fixes
This commit is contained in:
parent
b9a743cd23
commit
f787d3dc53
@ -1,10 +1,69 @@
|
||||
|
||||
http://svn.apache.org/viewvc?rev=1293602&view=rev
|
||||
1.7.x branch:
|
||||
|
||||
http://svn.apache.org/viewvc?rev=1293811&view=rev
|
||||
http://svn.apache.org/viewvc?rev=1293812&view=rev
|
||||
|
||||
trunk:
|
||||
|
||||
http://svn.apache.org/viewvc?rev=1292260&view=rev
|
||||
http://svn.apache.org/viewvc?rev=1292296&view=rev
|
||||
http://svn.apache.org/viewvc?rev=1292322&view=rev
|
||||
|
||||
|
||||
--- subversion-1.7.3/subversion/bindings/swig/python/tests/repository.py.hashorder
|
||||
+++ subversion-1.7.3/subversion/bindings/swig/python/tests/repository.py
|
||||
@@ -170,9 +170,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):
|
||||
--- subversion-1.7.3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py.hashorder
|
||||
+++ subversion-1.7.3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
|
||||
@@ -278,16 +278,27 @@ class SubversionRepositoryTestCase(unitt
|
||||
@@ -264,30 +264,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)
|
||||
|
Loading…
Reference in New Issue
Block a user