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())
Exemple #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())
Exemple #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())
Exemple #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())
Exemple #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())
Exemple #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())
Exemple #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())
Exemple #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())