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

Unified Diff: trychange.py

Issue 17703003: Do not assume that every subproject needs to contain a diff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 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: trychange.py
diff --git a/trychange.py b/trychange.py
index 89920e5bb067c32ae062f6ff4f41961170f53d21..f67adef2c1198081726fdb187ea3bde35d2fa446 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:
« 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