[sync-from-stem] More helpful message if fuchsia rev not found

In the window between where the Fuchsia rev lands, and it's rolled
through GI, sync-from-stem will fail to find the appropriate integration
revision (because there isn't one until it's in an integration
manifest). Previously this would result in a stack dump like:

    sync-from-stem: updating in /work/fuchsia/integration
    sync-from-stem: integration now at af5412e642229c4782ae1832ba5389600eb2ab90
    Traceback (most recent call last):
      File "/work/fuchsia/scripts/sync-from-stem.py", line 266, in <module>
        sys.exit(main())
      File "/work/fuchsia/scripts/sync-from-stem.py", line 258, in main
        to_revision(env, fuchsia_rev, f_to_i[fuchsia_rev])
    KeyError: '2b556a202ced24f7e4f797f1eddeae6036653c45'

Instead print a somewhat more informative error:

    sync-from-stem: updating in /work/fuchsia/integration
    sync-from-stem: integration now at 0087f658280f5828edf4e06efa540b6f453c3686
    sync-from-stem: fuchsia rev 2b556a202ced24f7e4f797f1eddeae6036653c45 not found in integration, not rolled yet?

Change-Id: I1200da02b5aa0e60ceb6ac9a7720716ae70e227c
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/405453
Reviewed-by: David Greenaway <dgreenaway@google.com>
Testability-Review: David Greenaway <dgreenaway@google.com>
Commit-Queue: Scott Graham <scottmg@google.com>
diff --git a/scripts/sync-from-stem.py b/scripts/sync-from-stem.py
index d449733..cedab05 100755
--- a/scripts/sync-from-stem.py
+++ b/scripts/sync-from-stem.py
@@ -255,6 +255,11 @@
     f_to_i = update_stem_history(env)
 
     fuchsia_rev = find_first_non_local_commit(env)
+    if fuchsia_rev not in f_to_i:
+        message(
+            'fuchsia rev %s not found in integration, not rolled yet?' %
+            fuchsia_rev)
+        return 1
     to_revision(env, fuchsia_rev, f_to_i[fuchsia_rev])
     message(
         'synced integration to %s, which matches fuchsia rev %s' %