Do not assume that every subproject needs to contain a diff.

This is especially useful when you want to do something like:

git try -s third_party/WebKit

from the chromium root checkout.

R=dpranke@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/17703003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210409 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
iannucci@chromium.org 12 years ago
parent a926a1eb04
commit 87b091128b

@ -787,12 +787,14 @@ def TryChange(argv,
for checkout in checkouts: for checkout in checkouts:
raw_diff = checkout.GenerateDiff() raw_diff = checkout.GenerateDiff()
if not raw_diff: if not raw_diff:
logging.error('Empty or non-existant diff, exiting.') continue
return 1
diff = raw_diff.splitlines(True) diff = raw_diff.splitlines(True)
path_diff = gclient_utils.PathDifference(root, checkout.checkout_root) path_diff = gclient_utils.PathDifference(root, checkout.checkout_root)
# Munge it. # Munge it.
diffs.extend(GetMungedDiff(path_diff, diff)[0]) diffs.extend(GetMungedDiff(path_diff, diff)[0])
if not diffs:
logging.error('Empty or non-existant diff, exiting.')
return 1
options.diff = ''.join(diffs) options.diff = ''.join(diffs)
if not options.name: if not options.name:

Loading…
Cancel
Save