~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

merge dirstate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1683
1683
        last_source_parent = [None, None, None]
1684
1684
        last_target_parent = [None, None, None]
1685
1685
 
 
1686
        use_filesystem_for_exec = (sys.platform != 'win32')
 
1687
 
1686
1688
        def _process_entry(entry, path_info):
1687
1689
            """Compare an entry and real disk to generate delta information.
1688
1690
 
1760
1762
                            # sha1 hash.
1761
1763
                            content_change = (link_or_sha1 != source_details[1])
1762
1764
                        # Target details is updated at update_entry time
1763
 
                        target_exec = bool(
1764
 
                            stat.S_ISREG(path_info[3].st_mode)
1765
 
                            and stat.S_IEXEC & path_info[3].st_mode)
 
1765
                        if use_filesystem_for_exec:
 
1766
                            # We don't need S_ISREG here, because we are sure
 
1767
                            # we are dealing with a file.
 
1768
                            target_exec = bool(stat.S_IEXEC & path_info[3].st_mode)
 
1769
                        else:
 
1770
                            target_exec = target_details[3]
1766
1771
                    elif target_kind == 'symlink':
1767
1772
                        if source_minikind != 'l':
1768
1773
                            content_change = True
1825
1830
                                                 path_utf8=entry[0][0])[0][2]
1826
1831
                    if parent_id == entry[0][2]:
1827
1832
                        parent_id = None
1828
 
                    target_exec = bool(
1829
 
                        stat.S_ISREG(path_info[3].st_mode)
1830
 
                        and stat.S_IEXEC & path_info[3].st_mode)
 
1833
                    if use_filesystem_for_exec:
 
1834
                        # We need S_ISREG here, because we aren't sure if this
 
1835
                        # is a file or not.
 
1836
                        target_exec = bool(
 
1837
                            stat.S_ISREG(path_info[3].st_mode)
 
1838
                            and stat.S_IEXEC & path_info[3].st_mode)
 
1839
                    else:
 
1840
                        target_exec = target_details[3]
1831
1841
                    return ((entry[0][2], (None, path), True,
1832
1842
                            (False, True),
1833
1843
                            (None, parent_id),