/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 breezy/delta.py

  • Committer: Jelmer Vernooij
  • Date: 2018-08-08 02:14:32 UTC
  • mfrom: (7063 work)
  • mto: This revision was merged to the branch mainline in revision 7065.
  • Revision ID: jelmer@jelmer.uk-20180808021432-nomib3je4cu2xqkm
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
    #       since we added them in alphabetical order.
171
171
    delta.modified.sort()
172
172
    delta.unchanged.sort()
 
173
    delta.unversioned.sort()
173
174
 
174
175
    return delta
175
176
 
303
304
        self.output("%s%s%s %s%s", rename, self.modified_map[modified], exe,
304
305
                    old_path, path)
305
306
 
 
307
 
306
308
def report_changes(change_iterator, reporter):
307
309
    """Report the changes from a change iterator.
308
310
 
319
321
        (False, True): 'added',
320
322
        (False, False): 'unversioned',
321
323
        }
 
324
    def path_key(change):
 
325
        if change[1][0] is not None:
 
326
            path = change[1][0]
 
327
        else:
 
328
            path = change[1][1]
 
329
        return osutils.splitpath(path)
322
330
    for (file_id, path, content_change, versioned, parent_id, name, kind,
323
 
         executable) in change_iterator:
 
331
         executable) in sorted(change_iterator, key=path_key):
324
332
        exe_change = False
325
333
        # files are "renamed" if they are moved or if name changes, as long
326
334
        # as it had a value