Ejemplo n.º 1
0
 def git_rev(self, ctx):
     return git.rev_if_git(ctx, self.real_path)
Ejemplo n.º 2
0
def test_rev_if_git():
    with io.temp_directory() as t:
        rev = git.rev_if_git(None, t)
        assert rev is None
Ejemplo n.º 3
0
def test_rev_dirty_if_git():
    with _git_directory() as t:
        io.write_file(os.path.join(t, "README"), "Hello World!")
        rev = git.rev_if_git(None, t)
        assert rev == EXPECTED_HELLO_REV + "-dirty", rev
Ejemplo n.º 4
0
 def git_rev(self, ctx):
     return git.rev_if_git(ctx, self.real_path)