Constants: Mark kayle-cros-internal as branchable.

Allow us to push branches to the Kayle remotes despite their special
handling.

Also make an assert in git.py more informative in case it ever fires
again.

CQ-DEPEND=CL:*181620
BUG=chromium:428051
TEST=Unittests (not much)

Change-Id: I10f71786e66dbee6948eaf889d038afdd1a322f1
Reviewed-on: https://chromium-review.googlesource.com/226164
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
diff --git a/cbuildbot/constants.py b/cbuildbot/constants.py
index 03904f9..778322f 100644
--- a/cbuildbot/constants.py
+++ b/cbuildbot/constants.py
@@ -160,6 +160,8 @@
 # CrOS remotes specified in the manifests.
 EXTERNAL_REMOTE = 'cros'
 INTERNAL_REMOTE = 'cros-internal'
+# TODO(dgarrett): Reconsider when crbug.com/428215 is fixed.
+KAYLE_INTERNAL_REMOTE = 'kayle-cros-internal'
 CHROMIUM_REMOTE = 'chromium'
 CHROME_REMOTE = 'chrome'
 
@@ -168,9 +170,11 @@
     INTERNAL_REMOTE: INTERNAL_GERRIT_HOST,
 }
 
+# Only remotes listed in CROS_REMOTES are considered branchable.
 CROS_REMOTES = {
     EXTERNAL_REMOTE: EXTERNAL_GOB_URL,
     INTERNAL_REMOTE: INTERNAL_GOB_URL,
+    KAYLE_INTERNAL_REMOTE: INTERNAL_GOB_URL,
 }
 
 GIT_REMOTES = {
diff --git a/lib/git.py b/lib/git.py
index e80d194..1e77c63 100644
--- a/lib/git.py
+++ b/lib/git.py
@@ -362,7 +362,7 @@
       manifest_include_dir: If given, this is where to start looking for
         include targets.
     """
-
+    self.source = source
     self.default = {}
     self.checkouts_by_path = {}
     self.checkouts_by_name = {}
@@ -423,7 +423,8 @@
       attrs.setdefault(key, self.default.get(key))
 
     remote = attrs['remote']
-    assert remote in self.remotes
+    assert remote in self.remotes, ('%s: %s not in %s' %
+        (self.source, remote, self.remotes))
     remote_name = attrs['remote_alias'] = self.remotes[remote]['alias']
 
     # 'repo manifest -r' adds an 'upstream' attribute to the project tag for the