~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/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:
798
798
                target.close()
799
799
        finally:
800
800
            source.close()
 
801
        try:
 
802
            mtime = tree.get_file_mtime(file_id)
 
803
        except errors.FileTimestampUnavailable:
 
804
            pass
 
805
        else:
 
806
            os.utime(full_path, (mtime, mtime))
801
807
        if not allow_write:
802
808
            osutils.make_readonly(full_path)
803
 
        try:
804
 
            mtime = tree.get_file_mtime(file_id)
805
 
        except errors.FileTimestampUnavailable:
806
 
            mtime = 0
807
 
        os.utime(full_path, (mtime, mtime))
808
809
        return full_path
809
810
 
810
811
    def _prepare_files(self, file_id, old_path, new_path, force_temp=False,