~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 19:06:55 UTC
  • mto: (1711.7.2 win32)
  • mto: This revision was merged to the branch mainline in revision 1822.
  • Revision ID: john@arbash-meinel.com-20060626190655-ab795ddd5442710e
Fix #45010 correctly. Don't forget the execute bit.

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