~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

merge some of dirstate, update comparison tests to keep tree roots the same unless they're meant to differ

Show diffs side-by-side

added added

removed removed

Lines of Context:
864
864
        :return: Nothing.
865
865
        """
866
866
        assert new_entries[0][0][0:2] == ('', ''), \
867
 
            "Missing root row %r" % new_entries[0][0]
 
867
            "Missing root row %r" % (new_entries[0][0],)
868
868
        # The two blocks here are deliberate: the root block and the 
869
869
        # contents-of-root block.
870
870
        self._dirblocks = [('', []), ('', [])]
1709
1709
        # --- end generation of full tree mappings
1710
1710
 
1711
1711
        # sort and output all the entries
1712
 
        new_entries = sorted(by_path.items())
 
1712
        new_entries = sorted(by_path.items(),
 
1713
                        key=lambda entry:(entry[0][0].split('/'), entry[0][1]))
1713
1714
        self._entries_to_current_state(new_entries)
1714
1715
        self._parents = [rev_id for rev_id, tree in trees]
1715
1716
        self._ghosts = list(ghosts)