~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Martin Pool
  • Date: 2010-04-21 11:27:04 UTC
  • mto: This revision was merged to the branch mainline in revision 5189.
  • Revision ID: mbp@canonical.com-20100421112704-zijso22b6pdevrxy
Simplify various code to use user_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import difflib
18
18
import os
19
19
import re
 
20
import shutil
20
21
import string
21
22
import sys
22
23
 
797
798
                target.close()
798
799
        finally:
799
800
            source.close()
 
801
        if not allow_write:
 
802
            osutils.make_readonly(full_path)
800
803
        try:
801
804
            mtime = tree.get_file_mtime(file_id)
802
805
        except errors.FileTimestampUnavailable:
803
 
            pass
804
 
        else:
805
 
            os.utime(full_path, (mtime, mtime))
806
 
        if not allow_write:
807
 
            osutils.make_readonly(full_path)
 
806
            mtime = 0
 
807
        os.utime(full_path, (mtime, mtime))
808
808
        return full_path
809
809
 
810
810
    def _prepare_files(self, file_id, old_path, new_path, force_temp=False,