| Index: scm.py
|
| diff --git a/scm.py b/scm.py
|
| index 30bb3d17ea49bd74c0a83af490bbc486d60e3f41..7d324f8ae08752a12be329e0a7ef9e293c2371e3 100644
|
| --- a/scm.py
|
| +++ b/scm.py
|
| @@ -166,8 +166,21 @@ class GIT(object):
|
| return GIT.ShortBranchName(GIT.GetBranchRef(cwd))
|
|
|
| @staticmethod
|
| + def IsGit(cwd):
|
| + """Returns True if this repo looks like it's using git."""
|
| + if os.path.exists(os.path.join(cwd, '.git')):
|
| + return True
|
| + if os.path.isdir(os.path.join(cwd, '.svn')):
|
| + return False
|
| + try:
|
| + GIT.Capture(['config', '--local', '--list'], cwd=cwd)
|
| + return True
|
| + except subprocess2.CalledProcessError:
|
| + return False
|
| +
|
| + @staticmethod
|
| def IsGitSvn(cwd):
|
| - """Returns true if this repo looks like it's using git-svn."""
|
| + """Returns True if this repo looks like it's using git-svn."""
|
| # If you have any "svn-remote.*" config keys, we think you're using svn.
|
| try:
|
| GIT.Capture(['config', '--local', '--get-regexp', r'^svn-remote\.'],
|
|
|