summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bpgit.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bpgit.py b/lib/bpgit.py
index f4af314a..02f6d8a7 100644
--- a/lib/bpgit.py
+++ b/lib/bpgit.py
@@ -107,6 +107,18 @@ def describe(rev='HEAD', tree=None, extra_args=[]):
return stdout.strip()
+def verify(git_tree):
+ tag = describe(rev=None, tree=git_tree, extra_args=['--dirty'])
+ cmd = ['git', 'tag', '-v', tag]
+
+ process = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ close_fds=True, universal_newlines=True, cwd=git_tree)
+ stdout = process.communicate()[0]
+ process.wait()
+
+ return dict(r=process.returncode, output=stdout)
+
def init(tree=None):
process = subprocess.Popen(['git', 'init'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,