~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Martin Pool
  • Date: 2011-03-28 01:28:09 UTC
  • mto: (5425.4.19 220464-stale-locks)
  • mto: This revision was merged to the branch mainline in revision 5970.
  • Revision ID: mbp@canonical.com-20110328012809-frw003r09tcrxkiz
Represent lock held info as an object, not just a dict

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