1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
Remaining fixes for APR hashorder issues.
--- subversion-1.7.4/subversion/bindings/swig/python/tests/repository.py.hashorder
+++ subversion-1.7.4/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.4/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py.hashorder
+++ subversion-1.7.4/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
@@ -264,16 +264,25 @@ 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):
--- subversion-1.7.4/subversion/bindings/swig/python/tests/wc.py.hashorder
+++ subversion-1.7.4/subversion/bindings/swig/python/tests/wc.py
@@ -216,8 +216,9 @@ class SubversionWorkingCopyTestCase(unit
def test_entries_read(self):
entries = wc.entries_read(self.wc, True)
-
- self.assertEqual(['', 'tags', 'branches', 'trunk'], list(entries.keys()))
+ keys = list(entries.keys())
+ keys.sort()
+ self.assertEqual(['', 'branches', 'tags', 'trunk'], keys)
def test_get_ignores(self):
self.assert_(isinstance(wc.get_ignores(None, self.wc), list))
|