Use revision.h for glslang dirty checks.

This file changes a lot less than git HEAD. And it should guard against
the same changes. Should reduce the instances of developer confusion
regarding run_code_generation being out of data.

Also update the presubmit check to print a more helpful message in the
case where the code does need to be regenerated.

Bug: angleproject:3333
Change-Id: I190dab5be50fc42512bdfc11c2d200f34f3b2092
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1545123
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 8a9d874..501fecd 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -20,6 +20,16 @@
 
 
 def _CheckCodeGeneration(input_api, output_api):
+
+    class Msg(output_api.PresubmitError):
+      """Specialized error message"""
+      def __init__(self, message):
+        super(output_api.PresubmitError, self).__init__(message,
+          long_text='Please ensure your ANGLE repositiory is synced to tip-of-tree\n'
+          'and you have an up-to-date checkout of all ANGLE dependencies.\n'
+          'If you are using ANGLE inside Chromium you may need to bootstrap ANGLE \n'
+          'and run gclient sync. See the DevSetup documentation for details.\n')
+
     code_gen_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
                                            'scripts/run_code_generation.py')
     cmd_name = 'run_code_generation'
@@ -28,7 +38,7 @@
           name=cmd_name,
           cmd=cmd,
           kwargs={},
-          message=output_api.PresubmitError)
+          message=Msg)
     if input_api.verbose:
         print('Running ' + cmd_name)
     return input_api.RunTests([test_cmd])
@@ -90,6 +100,7 @@
 
 def CheckChangeOnCommit(input_api, output_api):
     results = []
+    results.extend(_CheckCodeGeneration(input_api, output_api))
     results.extend(
       input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
     results.extend(input_api.canned_checks.CheckChangeHasBugField(