/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

  • Committer: Martin
  • Date: 2010-04-14 00:11:32 UTC
  • mto: This revision was merged to the branch mainline in revision 5164.
  • Revision ID: gzlist@googlemail.com-20100414001132-6m1ru11mbfu87x6m
Fix os.utime test failures, three on FAT filesystems and one with readonly files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1366
1366
        self.build_tree_contents([('tree/oldname2', 'oldcontent2')])
1367
1367
        tree.add('oldname', 'file-id')
1368
1368
        tree.add('oldname2', 'file2-id')
1369
 
        tree.commit('old tree', timestamp=0)
 
1369
        # Earliest allowable date on FAT32 filesystems is 1980-01-01
 
1370
        tree.commit('old tree', timestamp=315532800)
1370
1371
        tree.rename_one('oldname', 'newname')
1371
1372
        tree.rename_one('oldname2', 'newname2')
1372
1373
        self.build_tree_contents([('tree/newname', 'newcontent')])
1384
1385
        old_path, new_path = diff_obj._prepare_files('file-id', 'oldname',
1385
1386
                                                     'newname')
1386
1387
        self.assertContainsRe(old_path, 'old/oldname$')
1387
 
        self.assertEqual(0, os.stat(old_path).st_mtime)
 
1388
        self.assertEqual(315532800, os.stat(old_path).st_mtime)
1388
1389
        self.assertContainsRe(new_path, 'tree/newname$')
1389
1390
        self.assertFileEqual('oldcontent', old_path)
1390
1391
        self.assertFileEqual('newcontent', new_path)