示例#1
0
 def test_empty_diff(self):
     branch = GitBranch(self.repo.path, "master")
     revid = self.repo.do_commit("message", committer="Jelmer Vernooij")
     entry, diff = list(branch.diff(revid))
     self.assertEquals("message", entry.message)
     self.assertEquals("", diff)
示例#2
0
 def test_log_empty(self):
     branch = GitBranch(self.repo.path, "master")
     self.assertEquals([], list(branch.log()))
示例#3
0
 def test_log_commits(self):
     branch = GitBranch(self.repo.path, "master")
     self.repo.do_commit("message", committer="Jelmer Vernooij")
     log = list(branch.log())
     self.assertEquals(1, len(log))
     self.assertEquals("message", log[0].message)
示例#4
0
 def get_branch(self):
     if self.scm == "git":
         return GitBranch(os.path.join(GIT_ROOT, self.repo), self.branch)
     else:
         raise NotImplementedError(self.scm)