comparison tests/test_push_renames.py @ 329:235022089da6

merge with stable
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sat, 09 May 2009 12:36:17 +0200
parents 067914ecb4eb
children c421e6bf0d95
comparison
equal deleted inserted replaced
328:48ec2d62dc29 329:235022089da6
47 self.pushrevisions() 47 self.pushrevisions()
48 tip = self.repo['tip'] 48 tip = self.repo['tip']
49 # self._debug_print_copies(tip) 49 # self._debug_print_copies(tip)
50 self.assertchanges(changes, tip) 50 self.assertchanges(changes, tip)
51 51
52 def test_push_rename_tree(self):
53 repo = self.repo
54
55 changes = [
56 ('geek/alpha', 'geek/alpha', 'content',),
57 ('geek/beta', 'geek/beta', 'content',),
58 ('geek/delta', 'geek/delta', 'content',),
59 ('geek/gamma', 'geek/gamma', 'content',),
60 ('geek/later/pi', 'geek/later/pi', 'content geek/later/pi',),
61 ('geek/later/rho', 'geek/later/rho', 'content geek/later/rho', ),
62 ('geek/other/blah', 'geek/other/blah', 'content geek/other/blah', ),
63 ('geek/other/another/layer', 'geek/other/another/layer', 'content deep file', ),
64 ]
65
66 self.commitchanges(changes)
67 self.pushrevisions()
68 self.assertchanges(changes, self.repo['tip'])
69
70 changes = [
71 # rename (copy + remove) all of geek to greek
72 ('geek/alpha', 'greek/alpha', None, ),
73 ('geek/beta', 'greek/beta', None, ),
74 ('geek/delta', 'greek/delta', None, ),
75 ('geek/gamma', 'greek/gamma', None, ),
76 ('geek/later/pi', 'greek/later/pi', None, ),
77 ('geek/later/rho', 'greek/later/rho', None, ),
78 ('geek/other/blah', 'greek/other/blah', None, ),
79 ('geek/other/another/layer', 'greek/other/another/layer', None, ),
80
81 ('geek/alpha', None, None, ),
82 ('geek/beta', None, None, ),
83 ('geek/delta', None, None, ),
84 ('geek/gamma', None, None, ),
85 ('geek/later/pi', None, None, ),
86 ('geek/later/rho', None, None, ),
87 ('geek/other/blah', None, None, ),
88 ('geek/other/another/layer', None, None, ),
89 ]
90 self.commitchanges(changes)
91 self.pushrevisions()
92 # print '\n'.join(sorted(self.svnls('trunk')))
93 assert reduce(lambda x, y: x and y,
94 ('geek' not in f for f in self.svnls('trunk'))),(
95 'This failure means rename of an entire tree is broken.'
96 ' There is a print on the preceding line commented out '
97 'that should help you.')
98
99
52 def suite(): 100 def suite():
53 all = [unittest.TestLoader().loadTestsFromTestCase(TestPushRenames), 101 all = [unittest.TestLoader().loadTestsFromTestCase(TestPushRenames),
54 ] 102 ]
55 return unittest.TestSuite(all) 103 return unittest.TestSuite(all)