~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Patch Queue Manager
  • Date: 2011-12-19 17:39:35 UTC
  • mfrom: (6379.7.4 per-wt-executable)
  • Revision ID: pqm@pqm.ubuntu.com-20111219173935-49wnc1pb71e653iz
(jelmer) Make the check to see whether executable bits are supported
 per-workingtree, rather than global. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
            return False # Missing entries are not executable
479
479
        return entry[1][0][3] # Executable?
480
480
 
481
 
    if not osutils.supports_executable():
482
 
        def is_executable(self, file_id, path=None):
483
 
            """Test if a file is executable or not.
 
481
    def is_executable(self, file_id, path=None):
 
482
        """Test if a file is executable or not.
484
483
 
485
 
            Note: The caller is expected to take a read-lock before calling this.
486
 
            """
 
484
        Note: The caller is expected to take a read-lock before calling this.
 
485
        """
 
486
        if not self._supports_executable():
487
487
            entry = self._get_entry(file_id=file_id, path=path)
488
488
            if entry == (None, None):
489
489
                return False
490
490
            return entry[1][0][3]
491
 
 
492
 
        _is_executable_from_path_and_stat = \
493
 
            _is_executable_from_path_and_stat_from_basis
494
 
    else:
495
 
        def is_executable(self, file_id, path=None):
496
 
            """Test if a file is executable or not.
497
 
 
498
 
            Note: The caller is expected to take a read-lock before calling this.
499
 
            """
 
491
        else:
500
492
            self._must_be_locked()
501
493
            if not path:
502
494
                path = self.id2path(file_id)