diff --git a/svn.py b/svn.py new file mode 100644 index 0000000..4fe8cbc --- /dev/null +++ b/svn.py @@ -0,0 +1,14 @@ +import os +import sys + +def getRevision(path): + cmd = os.popen("svn info " + path) + + while True: + line = cmd.readline() + if line == "": + raise Exception("failed to obtain revision number") + if line.startswith("Revision: "): + revision = int(line[10:]) + return revision + \ No newline at end of file