Ejemplo n.º 1
0
    def test_add_revision_one_head(self):
        map_ = RevisionMap(lambda: [
            Revision('a', ()),
            Revision('b', ('a', )),
            Revision('c', ('b', )),
        ])
        eq_(map_.heads, ('c', ))

        map_.add_revision(Revision('d', ('c', )))
        eq_(map_.heads, ('d', ))
Ejemplo n.º 2
0
    def test_add_revision_one_head(self):
        map_ = RevisionMap(lambda: [
            Revision("a", ()),
            Revision("b", ("a", )),
            Revision("c", ("b", )),
        ])
        eq_(map_.heads, ("c", ))

        map_.add_revision(Revision("d", ("c", )))
        eq_(map_.heads, ("d", ))
Ejemplo n.º 3
0
    def test_add_revision_two_head(self):
        map_ = RevisionMap(lambda: [
            Revision("a", ()),
            Revision("b", ("a", )),
            Revision("c1", ("b", )),
            Revision("c2", ("b", )),
        ])
        eq_(map_.heads, ("c1", "c2"))

        map_.add_revision(Revision("d1", ("c1", )))
        eq_(map_.heads, ("c2", "d1"))
Ejemplo n.º 4
0
    def test_add_revision_two_head(self):
        map_ = RevisionMap(lambda: [
            Revision('a', ()),
            Revision('b', ('a', )),
            Revision('c1', ('b', )),
            Revision('c2', ('b', )),
        ])
        eq_(map_.heads, ('c1', 'c2'))

        map_.add_revision(Revision('d1', ('c1', )))
        eq_(map_.heads, ('c2', 'd1'))
Ejemplo n.º 5
0
    def test_add_revision_one_head(self):
        map_ = RevisionMap(
            lambda: [
                Revision('a', ()),
                Revision('b', ('a',)),
                Revision('c', ('b',)),
            ]
        )
        eq_(map_.heads, ('c', ))

        map_.add_revision(Revision('d', ('c', )))
        eq_(map_.heads, ('d', ))
Ejemplo n.º 6
0
    def test_add_revision_one_head(self):
        map_ = RevisionMap(
            lambda: [
                Revision("a", ()),
                Revision("b", ("a",)),
                Revision("c", ("b",)),
            ]
        )
        eq_(map_.heads, ("c",))

        map_.add_revision(Revision("d", ("c",)))
        eq_(map_.heads, ("d",))
Ejemplo n.º 7
0
    def test_add_revision_two_head(self):
        map_ = RevisionMap(
            lambda: [
                Revision('a', ()),
                Revision('b', ('a',)),
                Revision('c1', ('b',)),
                Revision('c2', ('b',)),
            ]
        )
        eq_(map_.heads, ('c1', 'c2'))

        map_.add_revision(Revision('d1', ('c1', )))
        eq_(map_.heads, ('c2', 'd1'))
Ejemplo n.º 8
0
    def test_add_revision_two_head(self):
        map_ = RevisionMap(
            lambda: [
                Revision("a", ()),
                Revision("b", ("a",)),
                Revision("c1", ("b",)),
                Revision("c2", ("b",)),
            ]
        )
        eq_(map_.heads, ("c1", "c2"))

        map_.add_revision(Revision("d1", ("c1",)))
        eq_(map_.heads, ("c2", "d1"))