~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Martin Pool
  • Date: 2005-08-01 20:25:24 UTC
  • Revision ID: mbp@sourcefrog.net-20050801202524-cc49f230ffa9c4e3
- correctly exclude root_directory from search for added files
  in compare_trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
                delta.unchanged.append((new_inv.id2path(file_id), file_id, kind))
198
198
        else:
199
199
            kind = old_inv.get_file_kind(file_id)
 
200
            if kind == 'root_directory':
 
201
                continue
200
202
            old_path = old_inv.id2path(file_id)
201
203
            if specific_files:
202
204
                if not is_inside_any(specific_files, old_path):
207
209
    for file_id in new_inv:
208
210
        if file_id in old_inv:
209
211
            continue
 
212
        kind = new_inv.get_file_kind(file_id)
 
213
        if kind == 'root_directory':
 
214
            continue
210
215
        new_path = new_inv.id2path(file_id)
211
216
        if specific_files:
212
217
            if not is_inside_any(specific_files, new_path):
213
218
                continue
214
 
        kind = new_inv.get_file_kind(file_id)
215
219
        delta.added.append((new_path, file_id, kind))
216
220
            
217
221
    delta.removed.sort()