disabled
 ñ    ‹      ­”_oÓ0Åß÷)Œxknÿ2´9F#©DE×V] „�;‰YjG¶»n|ú9M§e¨&öÛ99÷ü|“Wñ<J¾.ÆèCr9E‹Oï§“áÀçA'qóbt{ ãF¸p®:Øn·Ávh“C²„Â­Ë!Xgdêî8¦'¤^£'ˆ‚qÿDÄIW
:Q\Ü"�!Ðg%C¨ŒNÁŠ2£µƒ�5`f(ÍÅ�µæ›RX(5g¶*Æ	4VÞöîd¥ù]]´÷2¼Ï.2[íêÔCC‰+Ð+e®Bìt…)‘ëY“†dª•…UÉÔu�Ë#Vº›Dóï^®¨¿¦„¡Âˆ,Äï¢pv>cLgl-°ÃšK¯¹ÀtÊ¬C>¦Ì¤àGÅW�øJþ:n7šXØÔÈÊI­¥àÛ¨©.mÅ<ëÈ¦­j$üo»ÁÒ'›±¸XŽgI<Y6[Âk‹ÇtÏm¦¿¦Š¥©Óæn�Òø¾V+[�?LÑ>¨‘yá0E¨ƒ*ŸAçÄ­kÓ%_’ƒ\²>�ÁO‹éÃ¨�ó·`ýnÿM§{ÚéQpÖë!tŒ ÷öãÿlÔµÒ[Õ†ðí?QùV²\øðZaÚž½Ìètô‡vüã‘„ýÏJ`wh. {�ˆ–7ã       over_scan(self):
        commits = self.make_linear_commits(11, times=[9, 0, 1, 2, 3, 4, 5, 8, 6, 7, 9])
        c8, _, c10, c11 = commits[-4:]
        del self.store[commits[0].id]
        # c9 is older than we want to walk, but is out of order with its
        # parent, so we need to walk past it to get to c8.
        # c1 would also match, but we've deleted it, and it should get pruned
        # even with over-scanning.
        self.assertWalkYields([c11, c10, c8], [c11.id], since=7)

    def assertTopoOrderEqual(self, expected_commits, commits):
        entries = [TestWalkEntry(c, None) for c in commits]
        actual_ids = [e.commit.id for e in list(_topo_reorder(entries))]
        self.assertEqual([c.id for c in expected_commits], actual_ids)

    def test_topo_reorder_linear(self):
        commits = self.make_linear_commits(5)
        commits.reverse()
        for perm in permutations(commits):
            self.assertTopoOrderEqual(commits, perm)

    def test_topo_reorder_multiple_parents(self):
        c1, c2, c3 = self.make_commits([[1], [2], [3, 1, 2]])
        # Already sorted, so totally FIFO.
        self.assertTopoOrderEqual([c3, c2, c1], [c3, c2, c1])
        self.assertTopoOrderEqual([c3, c1, c2], [c3, c1, c2])

        # c3 causes one parent to be yielded.
        self.assertTopoOrderEqual([c3, c2, c1], [c2, c3, c1])
        self.assertTopoOrderEqual([c3, c1, c2], [c1, c3, c2])

        # c3 causes both parents to be yielded.
        self.assertTopoOrderEqual([c3, c2, c1], [c1, c2, c3])
        self.assertTopoOrderEqual([c3, c2, c1], [c2, c1, c3])

    def test_topo_reorder_multiple_children(self):
        c1, c2, c3 = self.make_commits([[1], [2, 1], [3, 1]])

        # c2 and c3 are FIFO but c1 moves to the end.
        self.assertTopoOrderEqual([c3, c2, c1], [c3, c2, c1])
        self.assertTopoOrderEqual([c3, c2, c1], [c3, c1, c2])
        self.assertTopoOrderEqual([c3, c2, c1], [c1, c3, c2])

        self.assertTopoOrderEqual([c2, c3, c1], [c2, c3, c1])
        self.assertTopoOrderEqual([c2, c3, c1], [c2, c1, c3])
        self.assertTopoOrderEqual([c2, c3, c1], [c1, c2, c3])

    def test_out_of_order_children(self):
        c1, c2, c3, c4, c5 = self.make_commits(
            [[1], [2, 1], [3, 2], [4, 1], [5, 3, 4]], times=[2, 1, 3, 4, 5]
        )
        self.assertWalkYields([c5, c4, c3, c1, c2], [c5.id])
        self.assertWalkYields([c5, c4, c3, c2, c1], [c5.id], order=ORDER_TOPO)

    def test_out_of_order_with_exclude(self):
        # Create the following graph:
        # c1-------x2---m6
        #   \          /
        #    \-y3--y4-/--y5
        # Due to skew, y5 is the oldest commit.
        c1, x2, y3, y4, y5, m6 = self.make_commits(
            [[1], [2, 1], [3, 1], [4, 3], [5, 4], [6, 2, 4]],
            times=[2, 3, 4, 5, 1, 6],
        )
        self.assertWalkYields([m6, y4, y3, x2, c1], [m6.id])
        # Ensure that c1..y4 get excluded even though they're popped from the
        # priority queue long before y5.
        self.assertWalkYields([m6, x2], [m6.id], exclude=[y5.id])

    def test_empty_walk(self):
        c1, c2, c3 = self.make_linear_commits(3)
        self.assertWalkYields([], [c3.id], exclude=[c3.id])


class WalkEntryTest(TestCase):
    def setUp(self):
        super().setUp()
        self.store = MemoryObjectStore()

    def make_commits(self, commit_spec, **kwargs):
        times = kwargs.pop("times", [])
        attrs = kwargs.pop("attrs", {})
        for i, t in enumerate(times):
            attrs.setdefault(i + 1, {})["commit_time"] = t
        re