~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: John Arbash Meinel
  • Date: 2006-06-26 18:32:10 UTC
  • mto: (1711.7.2 win32)
  • mto: This revision was merged to the branch mainline in revision 1822.
  • Revision ID: john@arbash-meinel.com-20060626183210-b38aadc3ede77477
Fix bug #45010 by always setting the executable bit on win32.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
import errno
19
19
from stat import S_ISREG
 
20
import sys
20
21
 
21
22
from bzrlib.errors import (DuplicateKey, MalformedTransform, NoSuchFile,
22
23
                           ReusingTransform, NotVersionedError, CantMoveRoot,
1010
1011
    entry = target_tree.inventory[file_id]
1011
1012
    has_contents, contents_mod, meta_mod, = _entry_changes(file_id, entry, 
1012
1013
                                                           working_tree)
 
1014
    executable = getattr(entry, 'executable', False)
1013
1015
    if contents_mod:
1014
1016
        mode_id = e_trans_id
1015
1017
        if has_contents:
1027
1029
        create_by_entry(tt, entry, target_tree, e_trans_id, mode_id=mode_id)
1028
1030
        create_entry_executability(tt, entry, e_trans_id)
1029
1031
 
1030
 
    elif meta_mod:
1031
 
        tt.set_executability(entry.executable, e_trans_id)
 
1032
    elif meta_mod or sys.platform == 'win32' and executable:
 
1033
        tt.set_executability(executable, e_trans_id)
1032
1034
    if tt.final_name(e_trans_id) != entry.name:
1033
1035
        adjust_path  = True
1034
1036
    else: