610
610
self.tree1 = BzrDir.create_standalone_workingtree('b1')
611
611
self.b1 = self.tree1.branch
612
612
tt = TreeTransform(self.tree1)
613
tt.new_file('file', tt.root, '\x00\xff', 'binary-1')
614
tt.new_file('file2', tt.root, '\x00\xff', 'binary-2')
615
tt.new_file('file', tt.root, '\x00\n\x00\r\x01\n\x02\r\xff', 'binary-1')
616
tt.new_file('file2', tt.root, '\x01\n\x02\r\x03\n\x04\r\xff', 'binary-2')
616
618
self.tree1.commit('add binary', rev_id='b@cset-0-1')
617
619
self.get_valid_bundle(None, 'b@cset-0-1')
618
622
tt = TreeTransform(self.tree1)
619
623
trans_id = tt.trans_id_tree_file_id('binary-1')
620
624
tt.delete_contents(trans_id)
622
626
self.tree1.commit('delete binary', rev_id='b@cset-0-2')
623
627
self.get_valid_bundle('b@cset-0-1', 'b@cset-0-2')
624
630
tt = TreeTransform(self.tree1)
625
631
trans_id = tt.trans_id_tree_file_id('binary-2')
626
632
tt.adjust_path('file3', tt.root, trans_id)
627
633
tt.delete_contents(trans_id)
628
tt.create_file('filecontents\x00', trans_id)
634
tt.create_file('file\rcontents\x00\n\x00', trans_id)
630
636
self.tree1.commit('rename and modify binary', rev_id='b@cset-0-3')
631
637
self.get_valid_bundle('b@cset-0-2', 'b@cset-0-3')
632
640
tt = TreeTransform(self.tree1)
633
641
trans_id = tt.trans_id_tree_file_id('binary-2')
634
642
tt.delete_contents(trans_id)
635
tt.create_file('\x00filecontents', trans_id)
643
tt.create_file('\x00file\rcontents', trans_id)
637
645
self.tree1.commit('just modify binary', rev_id='b@cset-0-4')
638
646
self.get_valid_bundle('b@cset-0-3', 'b@cset-0-4')
649
self.get_valid_bundle(None, 'b@cset-0-4')
640
651
def test_last_modified(self):
641
652
self.tree1 = BzrDir.create_standalone_workingtree('b1')
642
653
self.b1 = self.tree1.branch
769
780
# Now test a complet roll-up
770
781
bundle = self.get_valid_bundle(None, 'white-4')
783
def test_alt_timezone_bundle(self):
784
self.tree1 = self.make_branch_and_tree('b1')
785
self.b1 = self.tree1.branch
787
self.build_tree(['b1/newfile'])
788
self.tree1.add(['newfile'])
790
# Asia/Colombo offset = 5 hours 30 minutes
791
self.tree1.commit('non-hour offset timezone', rev_id='tz-1',
792
timezone=19800, timestamp=1152544886.0)
794
bundle = self.get_valid_bundle(None, 'tz-1')
796
rev = bundle.revisions[0]
797
self.assertEqual('Mon 2006-07-10 20:51:26.000000000 +0530', rev.date)
798
self.assertEqual(19800, rev.timezone)
799
self.assertEqual(1152544886.0, rev.timestamp)
773
802
class MungedBundleTester(TestCaseWithTransport):