~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.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:
763
763
 
764
764
    def _set_executability(self, path, trans_id):
765
765
        """Set the executability of versioned files """
766
 
        if supports_executable():
 
766
        if self._tree._supports_executable():
767
767
            new_executability = self._new_executability[trans_id]
768
768
            abspath = self._tree.abspath(path)
769
769
            current_mode = os.stat(abspath).st_mode
1233
1233
        finally:
1234
1234
            TreeTransformBase.finalize(self)
1235
1235
 
 
1236
    def _limbo_supports_executable(self):
 
1237
        """Check if the limbo path supports the executable bit."""
 
1238
        # FIXME: Check actual file system capabilities of limbodir
 
1239
        return osutils.supports_executable()
 
1240
 
1236
1241
    def _limbo_name(self, trans_id):
1237
1242
        """Generate the limbo name of a file"""
1238
1243
        limbo_name = self._limbo_files.get(trans_id)
2321
2326
            if kind == 'file':
2322
2327
                statval = os.lstat(limbo_name)
2323
2328
                size = statval.st_size
2324
 
                if not supports_executable():
 
2329
                if not tt._limbo_supports_executable():
2325
2330
                    executable = False
2326
2331
                else:
2327
2332
                    executable = statval.st_mode & S_IEXEC