From: spog Date: Sun, 19 Feb 2006 11:57:16 +0000 (+0000) Subject: added missing svn python module X-Git-Tag: xonotic-v0.7.0~16^2~12^2~283 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=4ece242d0bc94f8257613d911de60111292d5a5b added missing svn python module git-svn-id: svn://svn.icculus.org/gtkradiant/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