~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Aaron Bentley
  • Date: 2005-10-03 19:50:36 UTC
  • mfrom: (1399)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: abentley@panoramicfeedback.com-20051003195036-28dbd56f0e852b08
Merged latest from Robert Collins

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import stat
20
20
from bzrlib.trace import mutter
21
21
from bzrlib.osutils import rename
 
22
import bzrlib
22
23
 
23
24
# XXX: mbp: I'm not totally convinced that we should handle conflicts
24
25
# as part of changeset application, rather than only in the merge
863
864
            continue
864
865
        new_path = os.path.join(dir, new_tree_path)
865
866
        old_path = changed_inventory.get(entry.id)
866
 
        if os.path.exists(new_path):
 
867
        if bzrlib.osutils.lexists(new_path):
867
868
            if conflict_handler.target_exists(entry, new_path, old_path) == \
868
869
                "skip":
869
870
                continue
1384
1385
 
1385
1386
        if cs_entry is None:
1386
1387
            return None
 
1388
 
 
1389
        full_path_a = self.tree_a.readonly_path(id)
 
1390
        full_path_b = self.tree_b.readonly_path(id)
 
1391
        stat_a = self.lstat(full_path_a)
 
1392
        stat_b = self.lstat(full_path_b)
 
1393
 
 
1394
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
 
1395
 
1387
1396
        if id in self.tree_a and id in self.tree_b:
1388
1397
            a_sha1 = self.tree_a.get_file_sha1(id)
1389
1398
            b_sha1 = self.tree_b.get_file_sha1(id)
1390
1399
            if None not in (a_sha1, b_sha1) and a_sha1 == b_sha1:
1391
1400
                return cs_entry
1392
1401
 
1393
 
        full_path_a = self.tree_a.readonly_path(id)
1394
 
        full_path_b = self.tree_b.readonly_path(id)
1395
 
        stat_a = self.lstat(full_path_a)
1396
 
        stat_b = self.lstat(full_path_b)
1397
 
        
1398
 
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
1399
1402
        cs_entry.contents_change = self.make_contents_change(full_path_a,
1400
1403
                                                             stat_a, 
1401
1404
                                                             full_path_b,