public virtual void TestLinear()
        {
            RevCommit a  = Commit();
            RevCommit b  = Commit(a);
            RevCommit c  = Commit(b);
            PlotWalk  pw = new PlotWalk(db);

            pw.MarkStart(pw.LookupCommit(c.Id));
            PlotCommitList <PlotLane> pcl = new PlotCommitList <PlotLane>();

            pcl.Source(pw);
            pcl.FillTo(int.MaxValue);
            PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
                                                           (this, pcl);
            test.Commit(c).LanePos(0).Parents(b);
            test.Commit(b).LanePos(0).Parents(a);
            test.Commit(a).LanePos(0).Parents();
            test.NoMoreCommits();
        }
        public virtual void TestBug300282_1()
        {
            RevCommit a  = Commit();
            RevCommit b  = Commit(a);
            RevCommit c  = Commit(a);
            RevCommit d  = Commit(a);
            RevCommit e  = Commit(a);
            RevCommit f  = Commit(a);
            RevCommit g  = Commit(f);
            PlotWalk  pw = new PlotWalk(db);

            // TODO: when we add unnecessary commit's as tips (e.g. a commit which
            // is a parent of another tip) the walk will return those commits twice.
            // Find out why!
            // pw.markStart(pw.lookupCommit(a.getId()));
            pw.MarkStart(pw.LookupCommit(b.Id));
            pw.MarkStart(pw.LookupCommit(c.Id));
            pw.MarkStart(pw.LookupCommit(d.Id));
            pw.MarkStart(pw.LookupCommit(e.Id));
            // pw.markStart(pw.lookupCommit(f.getId()));
            pw.MarkStart(pw.LookupCommit(g.Id));
            PlotCommitList <PlotLane> pcl = new PlotCommitList <PlotLane>();

            pcl.Source(pw);
            pcl.FillTo(int.MaxValue);
            PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
                                                           (this, pcl);
            test.Commit(g).LanePos(0).Parents(f);
            test.Commit(f).LanePos(0).Parents(a);
            test.Commit(e).LanePos(1).Parents(a);
            test.Commit(d).LanePos(1).Parents(a);
            test.Commit(c).LanePos(1).Parents(a);
            test.Commit(b).LanePos(1).Parents(a);
            test.Commit(a).LanePos(0).Parents();
            test.NoMoreCommits();
        }
Пример #3
0
        public virtual void TestDuplicateParents()
        {
            RevCommit m1 = Commit();
            RevCommit m2 = Commit(m1);
            RevCommit m3 = Commit(m2, m2);
            RevCommit s1 = Commit(m2);
            RevCommit s2 = Commit(s1);
            PlotWalk  pw = new PlotWalk(db);

            pw.MarkStart(pw.LookupCommit(m3));
            pw.MarkStart(pw.LookupCommit(s2));
            PlotCommitList <PlotLane> pcl = new PlotCommitList <PlotLane>();

            pcl.Source(pw);
            pcl.FillTo(int.MaxValue);
            PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
                                                           (this, pcl);
            test.Commit(s2).NrOfPassingLanes(0);
            test.Commit(s1).NrOfPassingLanes(0);
            test.Commit(m3).NrOfPassingLanes(1);
            test.Commit(m2).NrOfPassingLanes(0);
            test.Commit(m1).NrOfPassingLanes(0);
            test.NoMoreCommits();
        }
Пример #4
0
		public virtual void TestEgitHistory()
		{
			RevCommit merge_fix = Commit();
			RevCommit add_simple = Commit(merge_fix);
			RevCommit remove_unused = Commit(merge_fix);
			RevCommit merge_remove = Commit(add_simple, remove_unused);
			RevCommit resolve_handler = Commit(merge_fix);
			RevCommit clear_repositorycache = Commit(merge_remove);
			RevCommit add_Maven = Commit(clear_repositorycache);
			RevCommit use_remote = Commit(clear_repositorycache);
			RevCommit findToolBar_layout = Commit(clear_repositorycache);
			RevCommit merge_add_Maven = Commit(findToolBar_layout, add_Maven);
			RevCommit update_eclipse_iplog = Commit(merge_add_Maven);
			RevCommit changeset_implementation = Commit(clear_repositorycache);
			RevCommit merge_use_remote = Commit(update_eclipse_iplog, use_remote);
			RevCommit disable_source = Commit(merge_use_remote);
			RevCommit update_eclipse_iplog2 = Commit(merge_use_remote);
			RevCommit merge_disable_source = Commit(update_eclipse_iplog2, disable_source);
			RevCommit merge_changeset_implementation = Commit(merge_disable_source, changeset_implementation
				);
			RevCommit clone_operation = Commit(merge_disable_source, merge_changeset_implementation
				);
			RevCommit update_eclipse = Commit(add_Maven);
			RevCommit merge_resolve_handler = Commit(clone_operation, resolve_handler);
			RevCommit disable_comment = Commit(clone_operation);
			RevCommit merge_disable_comment = Commit(merge_resolve_handler, disable_comment);
			RevCommit fix_broken = Commit(merge_disable_comment);
			RevCommit add_a_clear = Commit(fix_broken);
			RevCommit merge_update_eclipse = Commit(add_a_clear, update_eclipse);
			RevCommit sort_roots = Commit(merge_update_eclipse);
			RevCommit fix_logged_npe = Commit(merge_changeset_implementation);
			RevCommit merge_fixed_logged_npe = Commit(sort_roots, fix_logged_npe);
			PlotWalk pw = new PlotWalk(db);
			pw.MarkStart(pw.LookupCommit(merge_fixed_logged_npe.Id));
			PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>();
			pcl.Source(pw);
			pcl.FillTo(int.MaxValue);
			PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
				(this, pcl);
			test.Commit(merge_fixed_logged_npe).Parents(sort_roots, fix_logged_npe).LanePos(0
				);
			test.Commit(fix_logged_npe).Parents(merge_changeset_implementation).LanePos(0);
			test.Commit(sort_roots).Parents(merge_update_eclipse).LanePos(1);
			test.Commit(merge_update_eclipse).Parents(add_a_clear, update_eclipse).LanePos(1);
			test.Commit(add_a_clear).Parents(fix_broken).LanePos(1);
			test.Commit(fix_broken).Parents(merge_disable_comment).LanePos(1);
			test.Commit(merge_disable_comment).Parents(merge_resolve_handler, disable_comment
				).LanePos(1);
			test.Commit(disable_comment).Parents(clone_operation).LanePos(1);
			test.Commit(merge_resolve_handler).Parents(clone_operation, resolve_handler).LanePos
				(2);
			test.Commit(update_eclipse).Parents(add_Maven).LanePos(3);
			test.Commit(clone_operation).Parents(merge_disable_source, merge_changeset_implementation
				).LanePos(1);
			test.Commit(merge_changeset_implementation).Parents(merge_disable_source, changeset_implementation
				).LanePos(0);
			test.Commit(merge_disable_source).Parents(update_eclipse_iplog2, disable_source).
				LanePos(1);
			test.Commit(update_eclipse_iplog2).Parents(merge_use_remote).LanePos(0);
			test.Commit(disable_source).Parents(merge_use_remote).LanePos(1);
			test.Commit(merge_use_remote).Parents(update_eclipse_iplog, use_remote).LanePos(0
				);
			test.Commit(changeset_implementation).Parents(clear_repositorycache).LanePos(2);
			test.Commit(update_eclipse_iplog).Parents(merge_add_Maven).LanePos(0);
			test.Commit(merge_add_Maven).Parents(findToolBar_layout, add_Maven).LanePos(0);
			test.Commit(findToolBar_layout).Parents(clear_repositorycache).LanePos(0);
			test.Commit(use_remote).Parents(clear_repositorycache).LanePos(1);
			test.Commit(add_Maven).Parents(clear_repositorycache).LanePos(3);
			test.Commit(clear_repositorycache).Parents(merge_remove).LanePos(2);
			test.Commit(resolve_handler).Parents(merge_fix).LanePos(4);
			test.Commit(merge_remove).Parents(add_simple, remove_unused).LanePos(2);
			test.Commit(remove_unused).Parents(merge_fix).LanePos(0);
			test.Commit(add_simple).Parents(merge_fix).LanePos(1);
			test.Commit(merge_fix).Parents().LanePos(3);
			test.NoMoreCommits();
		}
Пример #5
0
		public virtual void TestBug300282_1()
		{
			RevCommit a = Commit();
			RevCommit b = Commit(a);
			RevCommit c = Commit(a);
			RevCommit d = Commit(a);
			RevCommit e = Commit(a);
			RevCommit f = Commit(a);
			RevCommit g = Commit(f);
			PlotWalk pw = new PlotWalk(db);
			// TODO: when we add unnecessary commit's as tips (e.g. a commit which
			// is a parent of another tip) the walk will return those commits twice.
			// Find out why!
			// pw.markStart(pw.lookupCommit(a.getId()));
			pw.MarkStart(pw.LookupCommit(b.Id));
			pw.MarkStart(pw.LookupCommit(c.Id));
			pw.MarkStart(pw.LookupCommit(d.Id));
			pw.MarkStart(pw.LookupCommit(e.Id));
			// pw.markStart(pw.lookupCommit(f.getId()));
			pw.MarkStart(pw.LookupCommit(g.Id));
			PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>();
			pcl.Source(pw);
			pcl.FillTo(int.MaxValue);
			PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
				(this, pcl);
			test.Commit(g).LanePos(0).Parents(f);
			test.Commit(f).LanePos(0).Parents(a);
			test.Commit(e).LanePos(1).Parents(a);
			test.Commit(d).LanePos(1).Parents(a);
			test.Commit(c).LanePos(1).Parents(a);
			test.Commit(b).LanePos(1).Parents(a);
			test.Commit(a).LanePos(0).Parents();
			test.NoMoreCommits();
		}
Пример #6
0
		public virtual void Test2SideBranches()
		{
			RevCommit a = Commit();
			RevCommit b = Commit(a);
			RevCommit c = Commit(a);
			RevCommit d = Commit(a);
			PlotWalk pw = new PlotWalk(db);
			pw.MarkStart(pw.LookupCommit(b.Id));
			pw.MarkStart(pw.LookupCommit(c.Id));
			pw.MarkStart(pw.LookupCommit(d.Id));
			PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>();
			pcl.Source(pw);
			pcl.FillTo(int.MaxValue);
			PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
				(this, pcl);
			test.Commit(d).LanePos(0).Parents(a);
			test.Commit(c).LanePos(1).Parents(a);
			test.Commit(b).LanePos(1).Parents(a);
			test.Commit(a).LanePos(0).Parents();
			test.NoMoreCommits();
		}
Пример #7
0
		public virtual void TestDuplicateParents()
		{
			RevCommit m1 = Commit();
			RevCommit m2 = Commit(m1);
			RevCommit m3 = Commit(m2, m2);
			RevCommit s1 = Commit(m2);
			RevCommit s2 = Commit(s1);
			PlotWalk pw = new PlotWalk(db);
			pw.MarkStart(pw.LookupCommit(m3));
			pw.MarkStart(pw.LookupCommit(s2));
			PlotCommitList<PlotLane> pcl = new PlotCommitList<PlotLane>();
			pcl.Source(pw);
			pcl.FillTo(int.MaxValue);
			PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
				(this, pcl);
			test.Commit(s2).NrOfPassingLanes(0);
			test.Commit(s1).NrOfPassingLanes(0);
			test.Commit(m3).NrOfPassingLanes(1);
			test.Commit(m2).NrOfPassingLanes(0);
			test.Commit(m1).NrOfPassingLanes(0);
			test.NoMoreCommits();
		}
        public virtual void TestEgitHistory()
        {
            RevCommit merge_fix                      = Commit();
            RevCommit add_simple                     = Commit(merge_fix);
            RevCommit remove_unused                  = Commit(merge_fix);
            RevCommit merge_remove                   = Commit(add_simple, remove_unused);
            RevCommit resolve_handler                = Commit(merge_fix);
            RevCommit clear_repositorycache          = Commit(merge_remove);
            RevCommit add_Maven                      = Commit(clear_repositorycache);
            RevCommit use_remote                     = Commit(clear_repositorycache);
            RevCommit findToolBar_layout             = Commit(clear_repositorycache);
            RevCommit merge_add_Maven                = Commit(findToolBar_layout, add_Maven);
            RevCommit update_eclipse_iplog           = Commit(merge_add_Maven);
            RevCommit changeset_implementation       = Commit(clear_repositorycache);
            RevCommit merge_use_remote               = Commit(update_eclipse_iplog, use_remote);
            RevCommit disable_source                 = Commit(merge_use_remote);
            RevCommit update_eclipse_iplog2          = Commit(merge_use_remote);
            RevCommit merge_disable_source           = Commit(update_eclipse_iplog2, disable_source);
            RevCommit merge_changeset_implementation = Commit(merge_disable_source, changeset_implementation
                                                              );
            RevCommit clone_operation = Commit(merge_disable_source, merge_changeset_implementation
                                               );
            RevCommit update_eclipse         = Commit(add_Maven);
            RevCommit merge_resolve_handler  = Commit(clone_operation, resolve_handler);
            RevCommit disable_comment        = Commit(clone_operation);
            RevCommit merge_disable_comment  = Commit(merge_resolve_handler, disable_comment);
            RevCommit fix_broken             = Commit(merge_disable_comment);
            RevCommit add_a_clear            = Commit(fix_broken);
            RevCommit merge_update_eclipse   = Commit(add_a_clear, update_eclipse);
            RevCommit sort_roots             = Commit(merge_update_eclipse);
            RevCommit fix_logged_npe         = Commit(merge_changeset_implementation);
            RevCommit merge_fixed_logged_npe = Commit(sort_roots, fix_logged_npe);
            PlotWalk  pw = new PlotWalk(db);

            pw.MarkStart(pw.LookupCommit(merge_fixed_logged_npe.Id));
            PlotCommitList <PlotLane> pcl = new PlotCommitList <PlotLane>();

            pcl.Source(pw);
            pcl.FillTo(int.MaxValue);
            PlotCommitListTest.CommitListAssert test = new PlotCommitListTest.CommitListAssert
                                                           (this, pcl);
            test.Commit(merge_fixed_logged_npe).Parents(sort_roots, fix_logged_npe).LanePos(0
                                                                                            );
            test.Commit(fix_logged_npe).Parents(merge_changeset_implementation).LanePos(0);
            test.Commit(sort_roots).Parents(merge_update_eclipse).LanePos(1);
            test.Commit(merge_update_eclipse).Parents(add_a_clear, update_eclipse).LanePos(1);
            test.Commit(add_a_clear).Parents(fix_broken).LanePos(1);
            test.Commit(fix_broken).Parents(merge_disable_comment).LanePos(1);
            test.Commit(merge_disable_comment).Parents(merge_resolve_handler, disable_comment
                                                       ).LanePos(1);
            test.Commit(disable_comment).Parents(clone_operation).LanePos(1);
            test.Commit(merge_resolve_handler).Parents(clone_operation, resolve_handler).LanePos
                (2);
            test.Commit(update_eclipse).Parents(add_Maven).LanePos(3);
            test.Commit(clone_operation).Parents(merge_disable_source, merge_changeset_implementation
                                                 ).LanePos(1);
            test.Commit(merge_changeset_implementation).Parents(merge_disable_source, changeset_implementation
                                                                ).LanePos(0);
            test.Commit(merge_disable_source).Parents(update_eclipse_iplog2, disable_source).
            LanePos(1);
            test.Commit(update_eclipse_iplog2).Parents(merge_use_remote).LanePos(0);
            test.Commit(disable_source).Parents(merge_use_remote).LanePos(1);
            test.Commit(merge_use_remote).Parents(update_eclipse_iplog, use_remote).LanePos(0
                                                                                            );
            test.Commit(changeset_implementation).Parents(clear_repositorycache).LanePos(2);
            test.Commit(update_eclipse_iplog).Parents(merge_add_Maven).LanePos(0);
            test.Commit(merge_add_Maven).Parents(findToolBar_layout, add_Maven).LanePos(0);
            test.Commit(findToolBar_layout).Parents(clear_repositorycache).LanePos(0);
            test.Commit(use_remote).Parents(clear_repositorycache).LanePos(1);
            test.Commit(add_Maven).Parents(clear_repositorycache).LanePos(3);
            test.Commit(clear_repositorycache).Parents(merge_remove).LanePos(2);
            test.Commit(resolve_handler).Parents(merge_fix).LanePos(4);
            test.Commit(merge_remove).Parents(add_simple, remove_unused).LanePos(2);
            test.Commit(remove_unused).Parents(merge_fix).LanePos(0);
            test.Commit(add_simple).Parents(merge_fix).LanePos(1);
            test.Commit(merge_fix).Parents().LanePos(3);
            test.NoMoreCommits();
        }