/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Martin Pool
  • Date: 2011-05-20 14:46:02 UTC
  • mto: This revision was merged to the branch mainline in revision 5923.
  • Revision ID: mbp@canonical.com-20110520144602-bqli0t6dj01gl0pv
Various pyflakes import fixes.

Some modules were used for subclassing or at module load time, so there is no
point loading them lazily.

Some were not imported when they should be.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        self.modified = []
62
62
        self.unchanged = []
63
63
        self.unversioned = []
 
64
        self.missing = []
64
65
 
65
66
    def __eq__(self, other):
66
67
        if not isinstance(other, TreeDelta):
137
138
            else:
138
139
                delta.removed.append((path[0], file_id, kind[0]))
139
140
        elif fully_present[0] is False:
140
 
            continue
 
141
            delta.missing.append((path[1], file_id, kind[1]))
141
142
        elif name[0] != name[1] or parent_id[0] != parent_id[1]:
142
143
            # If the name changes, or the parent_id changes, we have a rename
143
144
            # (if we move a parent, that doesn't count as a rename for the
160
161
    delta.removed.sort()
161
162
    delta.added.sort()
162
163
    delta.renamed.sort()
 
164
    delta.missing.sort()
163
165
    # TODO: jam 20060529 These lists shouldn't need to be sorted
164
166
    #       since we added them in alphabetical order.
165
167
    delta.modified.sort()
202
204
                             'unchanged': ' ',
203
205
                             'created': 'N',
204
206
                             'modified': 'M',
205
 
                             'deleted': 'D'}
 
207
                             'deleted': 'D',
 
208
                             'missing': '!',
 
209
                             }
206
210
        self.versioned_map = {'added': '+', # versioned target
207
211
                              'unchanged': ' ', # versioned in both
208
212
                              'removed': '-', # versioned in source
325
329
        else:
326
330
            if content_change:
327
331
                modified = "modified"
 
332
            elif kind[0] is None:
 
333
                modified = "missing"
328
334
            else:
329
335
                modified = "unchanged"
330
336
            if kind[1] == "file":
417
423
 
418
424
    show_list(delta.removed, 'removed', 'D')
419
425
    show_list(delta.added, 'added', 'A')
 
426
    show_list(delta.missing, 'missing', '!')
420
427
    extra_modified = []
421
428
    # Reorder delta.renamed tuples so that all lists share the same
422
429
    # order for their 3 first fields and that they also begin like