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

Side by Side Diff: git-crup

Issue 12040027: Print an error message if git crup doesn't run hooks because of an error (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: updates Created 7 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # A convenience script to largely replicate the behavior of `gclient sync` in a 6 # A convenience script to largely replicate the behavior of `gclient sync` in a
7 # submodule-based checkout. Fetches latest commits for top-level solutions; 7 # submodule-based checkout. Fetches latest commits for top-level solutions;
8 # updates submodules; and runs post-sync hooks. 8 # updates submodules; and runs post-sync hooks.
9 9
10 # Auto-update depot_tools 10 # Auto-update depot_tools
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 xargs $max_lines -P "$j" "$crup_runner" ) 132 xargs $max_lines -P "$j" "$crup_runner" )
133 else 133 else
134 ls -d */.git | 134 ls -d */.git |
135 while read gitdir; do 135 while read gitdir; do
136 serial_update "${gitdir%%/.git}" 136 serial_update "${gitdir%%/.git}"
137 done 137 done
138 fi 138 fi
139 139
140 status=$? 140 status=$?
141 141
142 if [ "$hooks" = "yes" -a "$status" -eq 0 ]; then 142 if [ "$status" -ne 0 ]; then
143 cat 1>&2 <<EOF
144 Please check the preceding terminal output for error messages.
145 Run 'git submodule status' to see the current state of submodule checkouts.
146 EOF
147 exit $status
148 fi
149
150 if [ "$hooks" = "yes" ]; then
143 "$runhooks" 151 "$runhooks"
144 status=$? 152 status=$?
145 fi 153 fi
146 154
147 echo 155 echo
148 exit $status 156 exit $status
OLDNEW
« 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