def test_get_revset(self):
        repo = Repository(self.main_repo)

        self.assertEquals(len(list(
            repo.get_revset(cs_from="branch(integration)"))), 3)
        self.assertEquals(len(list(
            repo.get_revset(cs_from="0", cs_to="tip"))), 5)
Esempio n. 2
0
    def test_get_revset(self):
        repo = Repository(self.main_repo)

        self.assertEquals(
            len(list(repo.get_revset(cs_from="branch(integration)"))), 3)
        self.assertEquals(len(list(repo.get_revset(cs_from="0", cs_to="tip"))),
                          5)
    def test_get_branch_no_name(self):
        repo = Repository(self.main_repo)

        hgrepo = hglib.open(self.main_repo)
        hgrepo.close()
        branch = repo.get_branch()

        self.assertEquals(branch.name, "test_branch")
        changesets_list = [x for x in repo.get_revset(branch=branch.name)]
        self.assertEquals(len(changesets_list), 2)
        self.assertEquals(
            changesets_list[0].desc, "#TICKET-2 yet another commit")
        self.assertEquals(changesets_list[1].desc, "TICKET-1 one commit")
Esempio n. 4
0
    def test_get_branch_no_name(self):
        repo = Repository(self.main_repo)

        hgrepo = hglib.open(self.main_repo)
        hgrepo.close()
        branch = repo.get_branch()

        self.assertEquals(branch.name, "test_branch")
        changesets_list = [x for x in repo.get_revset(branch=branch.name)]
        self.assertEquals(len(changesets_list), 2)
        self.assertEquals(changesets_list[0].desc,
                          "#TICKET-2 yet another commit")
        self.assertEquals(changesets_list[1].desc, "TICKET-1 one commit")