~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Aaron Bentley
  • Date: 2005-10-13 17:03:20 UTC
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@panoramicfeedback.com-20051013170320-731d9d3efaeb81d6
Removed use of readonly path for executability test

Show diffs side-by-side

added added

removed removed

Lines of Context:
1380
1380
        stat_a = self.lstat(full_path_a)
1381
1381
        stat_b = self.lstat(full_path_b)
1382
1382
 
1383
 
        cs_entry.metadata_change = self.make_exec_flag_change(stat_a, stat_b)
 
1383
        cs_entry.metadata_change = self.make_exec_flag_change(id)
1384
1384
 
1385
1385
        if id in self.tree_a and id in self.tree_b:
1386
1386
            a_sha1 = self.tree_a.get_file_sha1(id)
1394
1394
                                                             stat_b)
1395
1395
        return cs_entry
1396
1396
 
1397
 
    def make_exec_flag_change(self, stat_a, stat_b):
 
1397
    def make_exec_flag_change(self, file_id):
1398
1398
        exec_flag_a = exec_flag_b = None
1399
 
        if stat_a is not None and not stat.S_ISLNK(stat_a.st_mode):
1400
 
            exec_flag_a = bool(stat_a.st_mode & 0111)
1401
 
        if stat_b is not None and not stat.S_ISLNK(stat_b.st_mode):
1402
 
            exec_flag_b = bool(stat_b.st_mode & 0111)
 
1399
        if file_id in self.tree_a and self.tree_a.kind(file_id) == "file":
 
1400
            exec_flag_a = self.tree_a.is_executable(file_id)
 
1401
 
 
1402
        if file_id in self.tree_b and self.tree_b.kind(file_id) == "file":
 
1403
            exec_flag_b = self.tree_b.is_executable(file_id)
 
1404
 
1403
1405
        if exec_flag_a == exec_flag_b:
1404
1406
            return None
1405
1407
        return ChangeExecFlag(exec_flag_a, exec_flag_b)