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

Unified Diff: git_auto_svn.py

Issue 1150353003: Make git auto-svn fail if git svn fetch fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: + Tests. Created 5 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 | git_common.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_auto_svn.py
diff --git a/git_auto_svn.py b/git_auto_svn.py
index 0e8f341c7ca616c50cd7e3a75a1f0b3af0981640..46dce4493ed581ccbab603b2718ee5b3ff747ea2 100755
--- a/git_auto_svn.py
+++ b/git_auto_svn.py
@@ -21,7 +21,7 @@ import urlparse
import subprocess2
from git_common import run as run_git
-from git_common import run_stream as run_git_stream
+from git_common import run_stream_with_retcode as run_git_stream_with_retcode
from git_common import set_config, root, ROOT
from git_footers import parse_footers, get_unique, GIT_SVN_ID_PATTERN
@@ -93,8 +93,9 @@ def main(argv):
set_config('svn-remote.svn.fetch',
'%s:refs/remotes/%s' % (svn_path, upstream))
print 'Configured metadata, running "git svn fetch". This may take some time.'
- for line in run_git_stream('svn', 'fetch').xreadlines():
- print line.strip()
+ with run_git_stream_with_retcode('svn', 'fetch') as stdout:
+ for line in stdout.xreadlines():
+ print line.strip()
return 0
« no previous file with comments | « no previous file | git_common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698