~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Vincent Ladeuil
  • Date: 2010-04-15 06:47:06 UTC
  • mto: (5158.2.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5159.
  • Revision ID: v.ladeuil+lp@free.fr-20100415064706-gaonf6ydrgpx5fzh
Use the proper argument for the warning.

* bzrlib/mutabletree.py:
(MutableTree.warn_if_changed_or_out_of_date): Don't outsmart %.

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,