~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-19 19:15:58 UTC
  • mfrom: (6388 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6404.
  • Revision ID: jelmer@canonical.com-20111219191558-p1k7cvhjq8l6v2gm
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
WorkingTree.open(dir).
23
23
"""
24
24
 
 
25
from __future__ import absolute_import
 
26
 
25
27
from cStringIO import StringIO
26
28
import os
27
29
import sys
476
478
            return False # Missing entries are not executable
477
479
        return entry[1][0][3] # Executable?
478
480
 
479
 
    if not osutils.supports_executable():
480
 
        def is_executable(self, file_id, path=None):
481
 
            """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.
482
483
 
483
 
            Note: The caller is expected to take a read-lock before calling this.
484
 
            """
 
484
        Note: The caller is expected to take a read-lock before calling this.
 
485
        """
 
486
        if not self._supports_executable():
485
487
            entry = self._get_entry(file_id=file_id, path=path)
486
488
            if entry == (None, None):
487
489
                return False
488
490
            return entry[1][0][3]
489
 
 
490
 
        _is_executable_from_path_and_stat = \
491
 
            _is_executable_from_path_and_stat_from_basis
492
 
    else:
493
 
        def is_executable(self, file_id, path=None):
494
 
            """Test if a file is executable or not.
495
 
 
496
 
            Note: The caller is expected to take a read-lock before calling this.
497
 
            """
 
491
        else:
498
492
            self._must_be_locked()
499
493
            if not path:
500
494
                path = self.id2path(file_id)