netradiant-custom/svn.py
rpolzer 107765f0e4 initial
git-svn-id: svn://svn.icculus.org/netradiant/trunk@1 61c419a2-8eb2-4b30-bcec-8cead039b335
2008-09-13 18:28:57 +00:00

17 lines
294 B
Python

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")
for word in line.split():
try:
return int(word)
except:
pass