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

Unified Diff: git_cl.py

Issue 344013005: Allow git cl also in repos with read-only git-svn. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Git cl: Modified comment as well Created 6 years, 5 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_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 72770a145e4194197b910b7c0eb7db5cb2469e08..3c51377f61d722d46091d2ea40030b479534eef3 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -327,9 +327,13 @@ class Settings(object):
def GetIsGitSvn(self):
"""Return true if this repo looks like it's using git-svn."""
if self.is_git_svn is None:
- # If you have any "svn-remote.*" config keys, we think you're using svn.
- self.is_git_svn = RunGitWithCode(
- ['config', '--local', '--get-regexp', r'^svn-remote\.'])[0] == 0
+ # The presence of a svn-remote using the svn:// (or file://)
+ # protocol suggests that you're using svn. Remotes with the
+ # http* protocols suggest read-only svn access and are ignored.
+ code, result = RunGitWithCode(
+ ['config', '--local', '--get-regexp', r'^svn-remote\..*\.url'])
+ self.is_git_svn = (code == 0 and ("svn://" in result or
+ "file://" in result))
return self.is_git_svn
def GetSVNBranch(self):
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698