From 87b091128bb8b6d2d8b611f7bd455ce3b26fbc57 Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Mon, 8 Jul 2013 20:28:50 +0000 Subject: [PATCH] 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 --- trychange.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trychange.py b/trychange.py index 89920e5bb..f67adef2c 100755 --- a/trychange.py +++ b/trychange.py @@ -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: