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

Unified Diff: scm.py

Issue 6792060: Make more tests pass on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 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 | « git_cl.py ('k') | subprocess2.py » ('j') | tests/presubmit_unittest.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index 67dd747d4d47938c823c58314b1697a87664ee9e..31b18f67796c0cc5659e12339067d6eaa97ffd5f 100644
--- a/scm.py
+++ b/scm.py
@@ -74,14 +74,16 @@ def determine_scm(root):
"""
if os.path.isdir(os.path.join(root, '.svn')):
return 'svn'
- elif os.path.isdir(os.path.join(root, '.svn')):
+ elif os.path.isdir(os.path.join(root, '.git')):
return 'git'
else:
- if (0 == subprocess.call(
+ try:
+ subprocess2.check_output(
Dirk Pranke 2011/04/05 21:01:29 I wonder if it makes sense to have another method
['git', 'rev-parse', '--show-cdup'],
- stdout=subprocess.PIPE, cwd=root)):
+ stdout=subprocess2.VOID,
+ cwd=root)
return 'git'
- else:
+ except (OSError, subprocess2.CalledProcessError):
return None
« no previous file with comments | « git_cl.py ('k') | subprocess2.py » ('j') | tests/presubmit_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698