~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Andrew Bennetts
  • Date: 2010-08-30 03:03:46 UTC
  • mto: This revision was merged to the branch mainline in revision 5401.
  • Revision ID: andrew.bennetts@canonical.com-20100830030346-m52w3qkikhdmym0q
Simpler and faster fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1125
1125
                (None, to_kind),
1126
1126
                (None, to_executable))
1127
1127
        # Yield all remaining source paths
1128
 
        all_file_ids_target = None
1129
1128
        for path, from_entry in from_entries_by_dir:
1130
1129
            file_id = from_entry.file_id
1131
1130
            if file_id in to_paths:
1132
1131
                # already returned
1133
1132
                continue
1134
 
            if all_file_ids_target is None:
1135
 
                # Calculate all_file_ids() for target just once, it doesn't
1136
 
                # change during this loop.
1137
 
                all_file_ids_target = self.target.all_file_ids()
1138
 
            if file_id not in all_file_ids_target:
 
1133
            if file_id not in self.target:
1139
1134
                # common case - paths we have not emitted are not present in
1140
1135
                # target.
1141
1136
                to_path = None
1156
1151
            changed_file_ids.append(file_id)
1157
1152
            yield(file_id, (path, to_path), changed_content, versioned, parent,
1158
1153
                  name, kind, executable)
1159
 
        del all_file_ids_target
1160
1154
        changed_file_ids = set(changed_file_ids)
1161
1155
        if specific_file_ids is not None:
1162
1156
            for result in self._handle_precise_ids(precise_file_ids,