| Index: scm.py
|
| diff --git a/scm.py b/scm.py
|
| index 58f11b3de1b713e88cf833022c451ca5c4cec1c2..2156b293ded4fb3a6a1085299b78151a56a95b04 100644
|
| --- a/scm.py
|
| +++ b/scm.py
|
| @@ -65,6 +65,24 @@ def GenFakeDiff(filename):
|
| return result
|
|
|
|
|
| +def determine_scm(root):
|
| + """Similar to upload.py's version but much simpler.
|
| +
|
| + Returns 'svn', 'git' or None.
|
| + """
|
| + if os.path.isdir(os.path.join(root, '.svn')):
|
| + return 'svn'
|
| + elif os.path.isdir(os.path.join(root, '.svn')):
|
| + return 'git'
|
| + else:
|
| + if (0 == subprocess.call(
|
| + ['git', 'rev-parse', '--show-cdup'],
|
| + stdout=subprocess.PIPE, cwd=root)):
|
| + return 'git'
|
| + else:
|
| + return None
|
| +
|
| +
|
| class GIT(object):
|
| @staticmethod
|
| def Capture(args, **kwargs):
|
|
|