Do some adjustments to the error message generated by the WebIDL hook
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 01 May 2014 16:28:02 -0400
changeset 186 9ff49284a16dd0ec0aeb9fe45795690b0bafbd04
parent 185 723018c7baf1155adf3c940d5869a52044ca32fe
child 187 6a34259d022e4d301b7b962b997dd095ff1eef44
push id114
push usereakhgari@mozilla.com
push dateThu, 01 May 2014 20:28:05 +0000
Do some adjustments to the error message generated by the WebIDL hook
mozhghooks/prevent_webidl_changes.py
--- a/mozhghooks/prevent_webidl_changes.py
+++ b/mozhghooks/prevent_webidl_changes.py
@@ -55,21 +55,21 @@ def hook(ui, repo, hooktype, node, **kwa
                 match = re.search('\Wr\s*=\s*(\w+(?:,\w+)*)', c.description().lower())
                 validReview = False
                 if match:
                     for reviewer in match.group(1).split(','):
                         if reviewer in DOM_peers:
                             validReview = True
                             break
                 if not validReview:
-                        error += "WebIDL file %s altered in changeset %s without DOM peer review" % (file, short(c.node()))
+                        error += "WebIDL file %s altered in changeset %s without DOM peer review\n" % (file, short(c.node()))
     # Check if an error occured in any of the files that were changed
     if error != "":
         print "\n\n************************** ERROR ****************************"
-        ui.warn("\n\r*** " + error + "***\n\r")
+        ui.warn("\n" + error + "\n")
         print "\n\rChanges to WebIDL files in this repo require review from a DOM peer in the form of r=...\n\rThis is to ensure that we behave responsibly with exposing new Web APIs. We appreciate your understanding..\n\r"
         print "*************************************************************\n\n"
         # Reject the changesets
         return 1
     else:
         if webidlReviewed:
             print "You've received proper review from a DOM peer on your WebIDL change(s) in your push, thanks for paying enough attention."
     # Accept the changesets