Commit 87b09112 authored by iannucci@chromium.org's avatar iannucci@chromium.org

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
parent a926a1eb
......@@ -787,12 +787,14 @@ def TryChange(argv,
for checkout in checkouts:
raw_diff = checkout.GenerateDiff()
if not raw_diff:
logging.error('Empty or non-existant diff, exiting.')
return 1
continue
diff = raw_diff.splitlines(True)
path_diff = gclient_utils.PathDifference(root, checkout.checkout_root)
# Munge it.
diffs.extend(GetMungedDiff(path_diff, diff)[0])
if not diffs:
logging.error('Empty or non-existant diff, exiting.')
return 1
options.diff = ''.join(diffs)
if not options.name:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment