~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/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:
748
748
                target.close()
749
749
        finally:
750
750
            source.close()
751
 
        if not allow_write:
752
 
            osutils.make_readonly(full_path)
753
751
        try:
754
752
            mtime = tree.get_file_mtime(file_id)
755
753
        except errors.FileTimestampUnavailable:
 
754
            # GZ 2010-04-13: Zero is a bad 'unavailable' time as it predates
 
755
            #                the earliest allowable date on FAT filesystems
756
756
            mtime = 0
757
757
        os.utime(full_path, (mtime, mtime))
 
758
        if not allow_write:
 
759
            osutils.make_readonly(full_path)
758
760
        return full_path
759
761
 
760
762
    def _prepare_files(self, file_id, old_path, new_path, force_temp=False,