/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-17 17:03:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2918.
  • Revision ID: john@arbash-meinel.com-20071017170306-20w50sk1djh0i14k
Switch around to properly look up the executable bit in the basis.
We do this with a load-time switch around supports_executable(), rather than
a runtime if supports_executable() check.
It would be nice to inline the _is_executable_* check on platforms that support
executable, but we had a function call before, so we haven't degraded
performance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
612
612
            return self._inventory[file_id].executable
613
613
 
614
614
        _is_executable_from_path_and_stat = \
615
 
            _is_executable_from_path_and_stat_from_stat
 
615
            _is_executable_from_path_and_stat_from_basis
616
616
    else:
617
617
        def is_executable(self, file_id, path=None):
618
618
            if not path:
621
621
            return bool(stat.S_ISREG(mode) and stat.S_IEXEC & mode)
622
622
 
623
623
        _is_executable_from_path_and_stat = \
624
 
            _is_executable_from_path_and_stat_from_basis
 
624
            _is_executable_from_path_and_stat_from_stat
625
625
 
626
626
    @needs_tree_write_lock
627
627
    def _add(self, files, ids, kinds):