Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: slave/skia_slave_scripts/merge_into_android.py

Issue 317823006: Continue running if the upstream remote exists. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Respond to comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/merge_into_android.py
diff --git a/slave/skia_slave_scripts/merge_into_android.py b/slave/skia_slave_scripts/merge_into_android.py
index f072d86b8d5f599adf29d9c855883d10b92207ec..27ebcd1c8f1d99790d20db63d4ed9f7920c1b795 100644
--- a/slave/skia_slave_scripts/merge_into_android.py
+++ b/slave/skia_slave_scripts/merge_into_android.py
@@ -56,8 +56,18 @@ class MergeIntoAndroid(BuildStep):
with misc.ChDir(EXTERNAL_SKIA):
# Check to see whether there is an upstream yet.
if not UPSTREAM_REMOTE_NAME in shell_utils.run([GIT, 'remote', 'show']):
- shell_utils.run([GIT, 'remote', 'add', UPSTREAM_REMOTE_NAME,
- SKIA_REPO_URL])
+ try:
+ shell_utils.run([GIT, 'remote', 'add', UPSTREAM_REMOTE_NAME,
+ SKIA_REPO_URL])
+ except shell_utils.CommandFailedException as e:
+ if 'remote %s already exists' % UPSTREAM_REMOTE_NAME in e.output:
+ # Accept this error. The upstream remote name should have been in
+ # the output of git remote show, which would have made us skip this
+ # redundant command anyway.
+ print ('%s was already added. Why did it not show in git remote'
+ ' show?' % UPSTREAM_REMOTE_NAME)
+ else:
+ raise e
# Update the upstream remote.
shell_utils.run([GIT, 'fetch', UPSTREAM_REMOTE_NAME])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698