Reviewed by Kevin Ollivier.
[WebKit-https.git] / WebKitTools / wx / build / build_utils.py
index 85c20c6b6034d52cae083e221cfb8a0ce6af2314..b767d9f8cb60e9c86059b61b11abefa91c09babf 100644 (file)
@@ -174,3 +174,15 @@ def get_config(wk_root):
         config = open(config_file).read()
 
     return config
+
+def svn_revision():
+    if os.system("git info") == 0:
+        info = commands.getoutput("git-svn info ../..")
+    else:
+        info = commands.getoutput("svn info")
+    
+    for line in info.split("\n"):
+        if line.startswith("Revision: "):
+            return line.replace("Revision: ", "").strip()
+    
+    return ""