From: spog Date: Sun, 19 Feb 2006 11:57:16 +0000 (+0000) Subject: added missing svn python module X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=28c2a1b7ea1cb5adf2fae0d1c491a1206cb158ce;p=xonotic%2Fnetradiant.git added missing svn python module git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@11 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/svn.py b/svn.py new file mode 100644 index 00000000..4fe8cbc2 --- /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