From 28c2a1b7ea1cb5adf2fae0d1c491a1206cb158ce Mon Sep 17 00:00:00 2001 From: spog Date: Sun, 19 Feb 2006 11:57:16 +0000 Subject: [PATCH] added missing svn python module git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@11 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- svn.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 svn.py 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 -- 2.39.2