/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/tree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-01 18:19:44 UTC
  • mfrom: (3514.3.13 multi_walker)
  • Revision ID: pqm@pqm.ubuntu.com-20080801181944-pl10irs3d0p0a5ia
(jam) Add a MultiWalker class to check for changes between >2 trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
1029
1029
        if not isinstance(path2, unicode):
1030
1030
            raise TypeError("'path2' must be a unicode string, not %s: %r"
1031
1031
                            % (type(path2), path2))
1032
 
        return cmp(MultiWalker._path_key(path1), MultiWalker._path_key(path2))
 
1032
        return cmp(MultiWalker._path_to_key(path1),
 
1033
                   MultiWalker._path_to_key(path2))
1033
1034
 
1034
1035
    @staticmethod
1035
 
    def _path_key(other):
1036
 
        path = other[0]
 
1036
    def _path_to_key(path):
1037
1037
        dirname, basename = osutils.split(path)
1038
1038
        return (dirname.split(u'/'), basename)
1039
1039
 
1173
1173
        #       might ensure better ordering, in case a caller strictly
1174
1174
        #       requires parents before children.
1175
1175
        for idx, other_extra in enumerate(self._others_extra):
1176
 
            others = sorted(other_extra.itervalues(), key=self._path_key)
 
1176
            others = sorted(other_extra.itervalues(),
 
1177
                            key=lambda x: self._path_to_key(x[0]))
1177
1178
            for other_path, other_ie in others:
1178
1179
                file_id = other_ie.file_id
1179
1180
                # We don't need to check out_of_order_processed here, because