~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Robert Collins
  • Date: 2005-09-23 09:25:16 UTC
  • mto: (1092.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050923092516-e2c3c0f31288669d
Merge what applied of Alexander Belchenko's win32 patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import patch
19
19
import stat
20
20
from bzrlib.trace import mutter
 
21
from bzrlib.osutils import rename
21
22
 
22
23
# XXX: mbp: I'm not totally convinced that we should handle conflicts
23
24
# as part of changeset application, rather than only in the merge
353
354
        status = patch.diff3(new_file, filename, base, other)
354
355
        if status == 0:
355
356
            os.chmod(new_file, os.stat(filename).st_mode)
356
 
            os.rename(new_file, filename)
 
357
            rename(new_file, filename)
357
358
            return
358
359
        else:
359
360
            assert(status == 1)
831
832
            if src_path is not None:
832
833
                src_path = os.path.join(dir, src_path)
833
834
                try:
834
 
                    os.rename(src_path, to_name)
 
835
                    rename(src_path, to_name)
835
836
                    temp_name[entry.id] = to_name
836
837
                except OSError, e:
837
838
                    if e.errno != errno.ENOENT:
874
875
            if old_path is None:
875
876
                continue
876
877
            try:
877
 
                os.rename(old_path, new_path)
 
878
                rename(old_path, new_path)
878
879
                changed_inventory[entry.id] = new_tree_path
879
880
            except OSError, e:
880
881
                raise Exception ("%s is missing" % new_path)