Title: [128493] trunk/Tools
Revision
128493
Author
[email protected]
Date
2012-09-13 12:46:07 -0700 (Thu, 13 Sep 2012)

Log Message

Unreviewed trivial fix after r128399.

* BuildSlaveSupport/wait-for-SVN-server.py: Renamed from Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py.
(getLatestSVNRevision):
(waitForSVNRevision):

Modified Paths

Added Paths

Removed Paths

Diff

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py (128492 => 128493)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py	2012-09-13 19:26:35 UTC (rev 128492)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py	2012-09-13 19:46:07 UTC (rev 128493)
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2006 John Pye
-# Copyright (C) 2012 University of Szeged
-#
-# This script is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-from optparse import OptionParser
-import exceptions
-import sys
-import time
-import xml.dom.minidom
-import os
-import subprocess
-
-
-def getLatestSVNRevision(SVNServer):
-    try:
-        p = subprocess.Popen(["svn", "log", "--non-interactive", "--verbose", "--xml", "--limit=1", SVNServer], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-        response = p.communicate()[0]
-        doc = xml.dom.minidom.parseString(response)
-        el = doc.getElementsByTagName("logentry")[0]
-        return el.getAttribute("revision")
-    except xml.parsers.expat.ExpatError, e:
-        print "FAILED TO PARSE 'svn log' XML:"
-        print str(e)
-        print "----"
-        print "RECEIVED TEXT:"
-        print response
-        sys.exit(1)
-
-
-def waitForSVNRevision(SVNServer, revision):
-    if not revision:
-        latestRevision = int(getLatestSVNRevision(SVNServer))
-        print "Latest SVN revision on %s is r%d. Don't wait, because revision argument is empty." % (SVNServer, latestRevision)
-        return
-
-    while True:
-        latestRevision = int(getLatestSVNRevision(SVNServer))
-        if latestRevision < revision:
-            print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)
-            time.sleep(5)
-        else:
-            print "Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)
-            break
-
-
-if __name__ == '__main__':
-    parser = OptionParser()
-    parser.add_option("-r", "--revision", dest="revision", type="int", help="SVN revision number")
-    parser.add_option("-s", "--svn-server", dest="SVNServer", help="SVN server")
-    options, args = parser.parse_args()
-    waitForSVNRevision(options.SVNServer, options.revision)

Copied: trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py (from rev 128492, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py) (0 => 128493)


--- trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py	2012-09-13 19:46:07 UTC (rev 128493)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2006 John Pye
+# Copyright (C) 2012 University of Szeged
+#
+# This script is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+from optparse import OptionParser
+import exceptions
+import sys
+import time
+import xml.dom.minidom
+import os
+import subprocess
+
+
+def getLatestSVNRevision(SVNServer):
+    try:
+        p = subprocess.Popen(["svn", "log", "--non-interactive", "--verbose", "--xml", "--limit=1", SVNServer], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        response = p.communicate()[0]
+        doc = xml.dom.minidom.parseString(response)
+        el = doc.getElementsByTagName("logentry")[0]
+        return el.getAttribute("revision")
+    except xml.parsers.expat.ExpatError, e:
+        print "FAILED TO PARSE 'svn log' XML:"
+        print str(e)
+        print "----"
+        print "RECEIVED TEXT:"
+        print response
+        sys.exit(1)
+
+
+def waitForSVNRevision(SVNServer, revision):
+    if not revision:
+        latestRevision = int(getLatestSVNRevision(SVNServer))
+        print "Latest SVN revision on %s is r%d. Don't wait, because revision argument is empty." % (SVNServer, latestRevision)
+        return
+
+    while True:
+        latestRevision = int(getLatestSVNRevision(SVNServer))
+        if latestRevision < revision:
+            print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)
+            time.sleep(5)
+        else:
+            print "Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)
+            break
+
+
+if __name__ == '__main__':
+    parser = OptionParser()
+    parser.add_option("-r", "--revision", dest="revision", type="int", help="SVN revision number")
+    parser.add_option("-s", "--svn-server", dest="SVNServer", help="SVN server")
+    options, args = parser.parse_args()
+    waitForSVNRevision(options.SVNServer, options.revision)

Modified: trunk/Tools/ChangeLog (128492 => 128493)


--- trunk/Tools/ChangeLog	2012-09-13 19:26:35 UTC (rev 128492)
+++ trunk/Tools/ChangeLog	2012-09-13 19:46:07 UTC (rev 128493)
@@ -1,3 +1,11 @@
+2012-09-13  Csaba Osztrogonác  <[email protected]>
+
+        Unreviewed trivial fix after r128399.
+
+        * BuildSlaveSupport/wait-for-SVN-server.py: Renamed from Tools/BuildSlaveSupport/build.webkit.org-config/wait-for-SVN-server.py.
+        (getLatestSVNRevision):
+        (waitForSVNRevision):
+
 2012-09-13  Sudarsana Nagineni  <[email protected]>
 
         [WK2][WTR] WebKitTestRunner needs testRunner.callShouldCloseOnWebView
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to