comparison tests/test_externals.py @ 215:b5ef9a404f5d

Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk. Fixed a bunch of tests as a result. This likely will make new conversions of some repos have new revisions in them.
author Augie Fackler <durin42@gmail.com>
date Fri, 27 Mar 2009 16:56:07 -0500
parents 906d3f302b45
children a360ddc97719
comparison
equal deleted inserted replaced
214:1416429584b2 215:b5ef9a404f5d
8 def test_externalsfile(self): 8 def test_externalsfile(self):
9 f = svnexternals.externalsfile() 9 f = svnexternals.externalsfile()
10 f['t1'] = 'dir1 -r10 svn://foobar' 10 f['t1'] = 'dir1 -r10 svn://foobar'
11 f['t 2'] = 'dir2 -r10 svn://foobar' 11 f['t 2'] = 'dir2 -r10 svn://foobar'
12 f['t3'] = ['dir31 -r10 svn://foobar', 'dir32 -r10 svn://foobar'] 12 f['t3'] = ['dir31 -r10 svn://foobar', 'dir32 -r10 svn://foobar']
13 13
14 refext = """\ 14 refext = """[t 2]
15 [t 2]
16 dir2 -r10 svn://foobar 15 dir2 -r10 svn://foobar
17 [t1] 16 [t1]
18 dir1 -r10 svn://foobar 17 dir1 -r10 svn://foobar
19 [t3] 18 [t3]
20 dir31 -r10 svn://foobar 19 dir31 -r10 svn://foobar
30 self.assertEqual(f[t], f2[t]) 29 self.assertEqual(f[t], f2[t])
31 30
32 def test_externals(self, stupid=False): 31 def test_externals(self, stupid=False):
33 repo = self._load_fixture_and_fetch('externals.svndump', stupid=stupid) 32 repo = self._load_fixture_and_fetch('externals.svndump', stupid=stupid)
34 33
35 ref0 = """\ 34 ref0 = """[.]
36 [.]
37 ^/externals/project1 deps/project1 35 ^/externals/project1 deps/project1
38 """ 36 """
39 self.assertEqual(ref0, repo[0]['.hgsvnexternals'].data()) 37 self.assertEqual(ref0, repo[0+2]['.hgsvnexternals'].data())
40 ref1 = """\ 38 ref1 = """[.]
41 [.]
42 ^/externals/project1 deps/project1 39 ^/externals/project1 deps/project1
43 ^/externals/project2 deps/project2 40 ^/externals/project2 deps/project2
44 """ 41 """
45 self.assertEqual(ref1, repo[1]['.hgsvnexternals'].data()) 42 self.assertEqual(ref1, repo[1+2]['.hgsvnexternals'].data())
46 43
47 ref2 = """\ 44 ref2 = """[.]
48 [.]
49 ^/externals/project2 deps/project2 45 ^/externals/project2 deps/project2
50 [subdir] 46 [subdir]
51 ^/externals/project1 deps/project1 47 ^/externals/project1 deps/project1
52 [subdir2] 48 [subdir2]
53 ^/externals/project1 deps/project1 49 ^/externals/project1 deps/project1
54 """ 50 """
55 self.assertEqual(ref2, repo[2]['.hgsvnexternals'].data()) 51 actual = repo[2+2]['.hgsvnexternals'].data()
52 self.assertEqual(ref2, actual)
56 53
57 ref3 = """\ 54 ref3 = """[.]
58 [.]
59 ^/externals/project2 deps/project2 55 ^/externals/project2 deps/project2
60 [subdir] 56 [subdir]
61 ^/externals/project1 deps/project1 57 ^/externals/project1 deps/project1
62 """ 58 """
63 self.assertEqual(ref3, repo[3]['.hgsvnexternals'].data()) 59 self.assertEqual(ref3, repo[3+2]['.hgsvnexternals'].data())
64 60
65 ref4 = """\ 61 ref4 = """[subdir]
66 [subdir]
67 ^/externals/project1 deps/project1 62 ^/externals/project1 deps/project1
68 """ 63 """
69 self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data()) 64 self.assertEqual(ref4, repo[4+2]['.hgsvnexternals'].data())
70 65
71 ref5 = """\ 66 ref5 = """[.]
72 [.]
73 ^/externals/project2 deps/project2 67 ^/externals/project2 deps/project2
74 [subdir2] 68 [subdir2]
75 ^/externals/project1 deps/project1 69 ^/externals/project1 deps/project1
76 """ 70 """
77 self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data()) 71 self.assertEqual(ref5, repo[5+2]['.hgsvnexternals'].data())
78 72
79 ref6 = """\ 73 ref6 = """[.]
80 [.]
81 ^/externals/project2 deps/project2 74 ^/externals/project2 deps/project2
82 """ 75 """
83 self.assertEqual(ref6, repo[6]['.hgsvnexternals'].data()) 76 self.assertEqual(ref6, repo[6+2]['.hgsvnexternals'].data())
84 77
85 def test_externals_stupid(self): 78 def test_externals_stupid(self):
86 self.test_externals(True) 79 self.test_externals(True)
87 80
88 81
94 self.wc_path) 87 self.wc_path)
95 88
96 def test_push_externals(self, stupid=False): 89 def test_push_externals(self, stupid=False):
97 # Add a new reference on an existing and non-existing directory 90 # Add a new reference on an existing and non-existing directory
98 changes = [ 91 changes = [
99 ('.hgsvnexternals', '.hgsvnexternals', 92 ('.hgsvnexternals', '.hgsvnexternals',
100 """\ 93 """[dir]
101 [dir]
102 ../externals/project2 deps/project2 94 ../externals/project2 deps/project2
103 [subdir1] 95 [subdir1]
104 ../externals/project1 deps/project1 96 ../externals/project1 deps/project1
105 [subdir2] 97 [subdir2]
106 ../externals/project2 deps/project2 98 ../externals/project2 deps/project2
113 self.assertchanges(changes, self.repo['tip']) 105 self.assertchanges(changes, self.repo['tip'])
114 106
115 # Remove all references from one directory, add a new one 107 # Remove all references from one directory, add a new one
116 # to the other (test multiline entries) 108 # to the other (test multiline entries)
117 changes = [ 109 changes = [
118 ('.hgsvnexternals', '.hgsvnexternals', 110 ('.hgsvnexternals', '.hgsvnexternals',
119 """\ 111 """[subdir1]
120 [subdir1]
121 ../externals/project1 deps/project1 112 ../externals/project1 deps/project1
122 ../externals/project2 deps/project2 113 ../externals/project2 deps/project2
123 """), 114 """),
124 # This removal used to trigger the parent directory removal 115 # This removal used to trigger the parent directory removal
125 ('subdir1/a', None, None), 116 ('subdir1/a', None, None),