summaryrefslogtreecommitdiff
path: root/lib/git/repo/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-07-09 12:18:38 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-07-09 12:18:38 +0200
commit08457a7a6b6ad4f518fad0d5bca094a2b5b38fbe (patch)
treeff129ad199b7e069cb3cef0fcf34353717befa60 /lib/git/repo/base.py
parent3288a244428751208394d8137437878277ceb71f (diff)
downloadgitpython-08457a7a6b6ad4f518fad0d5bca094a2b5b38fbe.tar.gz
Added python 2.4 support: Repo will now use the original GitCmdObjectDB in python 2.4, as the pure python implementation cannot work without memory maps
Diffstat (limited to 'lib/git/repo/base.py')
-rw-r--r--lib/git/repo/base.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/repo/base.py b/lib/git/repo/base.py
index d45dd713..4456b1e9 100644
--- a/lib/git/repo/base.py
+++ b/lib/git/repo/base.py
@@ -34,6 +34,11 @@ import os
import sys
import re
+DefaultDBType = GitDB
+if sys.version_info[1] < 5: # python 2.4 compatiblity
+ DefaultDBType = GitCmdObjectDB
+# END handle python 2.4
+
__all__ = ('Repo', )
@@ -66,7 +71,7 @@ class Repo(object):
# represents the configuration level of a configuration file
config_level = ("system", "global", "repository")
- def __init__(self, path=None, odbt = GitDB):
+ def __init__(self, path=None, odbt = DefaultDBType):
"""Create a new Repo instance
:param path: is the path to either the root git directory or the bare git repo::