~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

(lifeless) When writing temporary files for external diff do not set the file utime if we don't know when the in-tree file was last modified. (Martin [gz])

Show diffs side-by-side

added added

removed removed

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