/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: John Arbash Meinel
  • Date: 2008-08-01 17:48:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3600.
  • Revision ID: john@arbash-meinel.com-20080801174830-xyg2tor1j4zjklpj
One code path was using a tuple, another a plain path
we need to support *both*. Relatively simple fix after that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
977
977
        if not isinstance(path2, unicode):
978
978
            raise TypeError("'path2' must be a unicode string, not %s: %r"
979
979
                            % (type(path2), path2))
980
 
        return cmp(MultiWalker._path_key(path1), MultiWalker._path_key(path2))
 
980
        return cmp(MultiWalker._path_to_key(path1),
 
981
                   MultiWalker._path_to_key(path2))
981
982
 
982
983
    @staticmethod
983
 
    def _path_key(path):
 
984
    def _path_to_key(path):
984
985
        dirname, basename = osutils.split(path)
985
986
        return (dirname.split(u'/'), basename)
986
987
 
1120
1121
        #       might ensure better ordering, in case a caller strictly
1121
1122
        #       requires parents before children.
1122
1123
        for idx, other_extra in enumerate(self._others_extra):
1123
 
            others = sorted(other_extra.itervalues(), key=self._path_key)
 
1124
            others = sorted(other_extra.itervalues(),
 
1125
                            key=lambda x: self._path_to_key(x[0]))
1124
1126
            for other_path, other_ie in others:
1125
1127
                file_id = other_ie.file_id
1126
1128
                # We don't need to check out_of_order_processed here, because