repo_diff: sync tip of branches of no tag is given

Not all Android source trees support build IDs and tags.
When no build tag is requested, rather than try to match
the build IDs just sync the branch tips of the upstream
and downstream source trees.

Also select two Android Oreo release candidates
as the default branches. The fact that there are frozen
branches and that the diff is small serve as a good showcase
of the tool.

Change-Id: Ifdefd79fb6b32c6b83e0aee390dd5a435b6a61fc
diff --git a/tools/repo_diff/repo_diff_android.py b/tools/repo_diff/repo_diff_android.py
index 5074ff5..7868df2 100644
--- a/tools/repo_diff/repo_diff_android.py
+++ b/tools/repo_diff/repo_diff_android.py
@@ -20,9 +20,9 @@
 UPSTREAM_WORKSPACE = "upstream"
 
 DEFAULT_MANIFEST_URL = "https://android.googlesource.com/platform/manifest"
-DEFAULT_MANIFEST_BRANCH = "oreo-dev"
+DEFAULT_MANIFEST_BRANCH = "android-8.0.0_r10"
 DEFAULT_UPSTREAM_MANIFEST_URL = "https://android.googlesource.com/platform/manifest"
-DEFAULT_UPSTREAM_MANIFEST_BRANCH = "master"
+DEFAULT_UPSTREAM_MANIFEST_BRANCH = "android-8.0.0_r1"
 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
 DEFAULT_EXCLUSIONS_FILE = os.path.join(SCRIPT_DIR, "exclusions.txt")
 
@@ -118,6 +118,8 @@
   repo_init(url, branch, workspace)
   if tag:
     rev = get_commit_with_keyword(manifest_path, tag)
+    if not rev:
+      raise(ValueError("could not find a manifest revision for tag " + tag))
     repo_init(url, rev, workspace)
   repo_sync(workspace)
 
@@ -135,8 +137,12 @@
       tag,
       workspace)
 
-  # get the build_id so that we know which rev of upstream we need
-  build_id = get_build_id(workspace)
+  build_id = None
+  if tag:
+    # get the build_id so that we know which rev of upstream we need
+    build_id = get_build_id(workspace)
+    if not build_id:
+      raise(ValueError("Error: could not find the Build ID of " + workspace))
 
   # repo sync upstream source tree
   repo_sync_specific_release(