~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Martin Pool
  • Date: 2005-10-04 02:27:27 UTC
  • mfrom: (1399)
  • mto: (1185.13.3)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: mbp@sourcefrog.net-20051004022727-aee7064c62e039a7
[merge] merge robertc's format5 integration

 - test status on specific files
 - track x bit
 - baz2bzr fixes
 - remotebranch fixes

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
862
863
            continue
863
864
        new_path = os.path.join(dir, new_tree_path)
864
865
        old_path = changed_inventory.get(entry.id)
865
 
        if os.path.exists(new_path):
 
866
        if bzrlib.osutils.lexists(new_path):
866
867
            if conflict_handler.target_exists(entry, new_path, old_path) == \
867
868
                "skip":
868
869
                continue
1383
1384
 
1384
1385
        if cs_entry is None:
1385
1386
            return None
 
1387
 
 
1388
        full_path_a = self.tree_a.readonly_path(id)
 
1389
        full_path_b = self.tree_b.readonly_path(id)
 
1390
        stat_a = self.lstat(full_path_a)
 
1391
        stat_b = self.lstat(full_path_b)
 
1392
 
 
1393
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
 
1394
 
1386
1395
        if id in self.tree_a and id in self.tree_b:
1387
1396
            a_sha1 = self.tree_a.get_file_sha1(id)
1388
1397
            b_sha1 = self.tree_b.get_file_sha1(id)
1389
1398
            if None not in (a_sha1, b_sha1) and a_sha1 == b_sha1:
1390
1399
                return cs_entry
1391
1400
 
1392
 
        full_path_a = self.tree_a.readonly_path(id)
1393
 
        full_path_b = self.tree_b.readonly_path(id)
1394
 
        stat_a = self.lstat(full_path_a)
1395
 
        stat_b = self.lstat(full_path_b)
1396
 
        
1397
 
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
1398
1401
        cs_entry.contents_change = self.make_contents_change(full_path_a,
1399
1402
                                                             stat_a, 
1400
1403
                                                             full_path_b,