def get_modified_filenames():
    """Return a set with the filename of the modified files."""
    vcs, unused_root = gitlint.get_vcs_root()
    if not vcs:
        return None

    return set(vcs.modified_filenames().iterkeys())
예제 #2
0
def get_modified_filenames():
    """Return a set with the filename of the modified files."""
    vcs, unused_root = gitlint.get_vcs_root()
    if not vcs:
        return None

    return set(vcs.modified_filenames().iterkeys())
예제 #3
0
 def test_get_vcs_none(self):
     self.git_repository_root.return_value = None
     self.hg_repository_root.return_value = None
     self.assertEquals((None, None), gitlint.get_vcs_root())
예제 #4
0
 def test_get_vcs_hg(self):
     self.git_repository_root.return_value = None
     self.hg_repository_root.return_value = self.root
     self.assertEquals((gitlint.hg, self.root), gitlint.get_vcs_root())
예제 #5
0
 def test_get_vcs_none(self):
     self.git_repository_root.return_value = None
     self.hg_repository_root.return_value = None
     self.assertEquals((None, None), gitlint.get_vcs_root())
예제 #6
0
 def test_get_vcs_hg(self):
     self.git_repository_root.return_value = None
     self.hg_repository_root.return_value = self.root
     self.assertEquals((gitlint.hg, self.root), gitlint.get_vcs_root())
예제 #7
0
 def test_get_vcs_git(self):
     self.git_repository_root.return_value = self.root
     self.assertEqual((gitlint.git, self.root), gitlint.get_vcs_root())
예제 #8
0
 def test_get_vcs_git(self):
     self.git_repository_root.return_value = self.root
     self.assertEqual((gitlint.git, self.root), gitlint.get_vcs_root())