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

Unified Diff: git_common.py

Issue 1527403002: Better error checking in git freeze (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Add a test Created 4 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 | tests/git_common_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_common.py
diff --git a/git_common.py b/git_common.py
index d9ad7ce8608e6e19f93b28e66095169d973334c0..0b27941f0c60ad5e8bfa9364beb2a51d193088fd 100644
--- a/git_common.py
+++ b/git_common.py
@@ -428,15 +428,24 @@ def freeze():
except subprocess2.CalledProcessError:
pass
+ add_errors = False
+ try:
+ run('add', '-A', '--ignore-errors')
+ except subprocess2.CalledProcessError:
+ add_errors = True
+
try:
- run('add', '-A')
run('commit', '--no-verify', '-m', FREEZE + '.unindexed')
took_action = True
except subprocess2.CalledProcessError:
pass
+ ret = []
+ if add_errors:
+ ret.append('Failed to index some unindexed files.')
if not took_action:
- return 'Nothing to freeze.'
+ ret.append('Nothing to freeze.')
+ return ' '.join(ret) or None
def get_branch_tree():
« no previous file with comments | « no previous file | tests/git_common_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698