|
8 | 8 | import logging |
9 | 9 | import os |
10 | 10 | import re |
11 | | -import sys |
12 | 11 | import warnings |
13 | 12 |
|
14 | 13 | from git.cmd import ( |
|
40 | 39 |
|
41 | 40 | log = logging.getLogger(__name__) |
42 | 41 |
|
43 | | -DefaultDBType = GitCmdObjectDB |
44 | | -if sys.version_info[:2] < (2, 5): # python 2.4 compatibility |
45 | | - DefaultDBType = GitCmdObjectDB |
46 | | -# END handle python 2.4 |
47 | | - |
48 | 42 | BlameEntry = namedtuple('BlameEntry', ['commit', 'linenos', 'orig_path', 'orig_linenos']) |
49 | 43 |
|
50 | 44 |
|
@@ -88,7 +82,7 @@ class Repo(object): |
88 | 82 | # Subclasses may easily bring in their own custom types by placing a constructor or type here |
89 | 83 | GitCommandWrapperType = Git |
90 | 84 |
|
91 | | - def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=False, expand_vars=True): |
| 85 | + def __init__(self, path=None, odbt=GitCmdObjectDB, search_parent_directories=False, expand_vars=True): |
92 | 86 | """Create a new Repo instance |
93 | 87 |
|
94 | 88 | :param path: |
@@ -869,7 +863,7 @@ def blame(self, rev, file, incremental=False, **kwargs): |
869 | 863 | return blames |
870 | 864 |
|
871 | 865 | @classmethod |
872 | | - def init(cls, path=None, mkdir=True, odbt=DefaultDBType, expand_vars=True, **kwargs): |
| 866 | + def init(cls, path=None, mkdir=True, odbt=GitCmdObjectDB, expand_vars=True, **kwargs): |
873 | 867 | """Initialize a git repository at the given path if specified |
874 | 868 |
|
875 | 869 | :param path: |
|
0 commit comments