##// END OF EJS Templates
mercurial: fix new 4.4.X code change that does strict requirement checks....
marcink -
r2518:3b67d94e stable
parent child Browse files
Show More
@@ -203,6 +203,14 b' class BaseRepository(object):'
203 203 def __ne__(self, other):
204 204 return not self.__eq__(other)
205 205
206 @classmethod
207 def get_default_config(cls, default=None):
208 config = Config()
209 if default and isinstance(default, list):
210 for section, key, val in default:
211 config.set(section, key, val)
212 return config
213
206 214 @LazyProperty
207 215 def EMPTY_COMMIT(self):
208 216 return EmptyCommit(self.EMPTY_COMMIT_ID)
@@ -62,7 +62,7 b' class GitRepository(BaseRepository):'
62 62 update_after_clone=False, with_wire=None, bare=False):
63 63
64 64 self.path = safe_str(os.path.abspath(repo_path))
65 self.config = config if config else Config()
65 self.config = config if config else self.get_default_config()
66 66 self._remote = connection.Git(
67 67 self.path, self.config, with_wire=with_wire)
68 68
@@ -72,8 +72,14 b' class MercurialRepository(BaseRepository'
72 72 :param update_after_clone=False: sets update of working copy after
73 73 making a clone
74 74 """
75
75 76 self.path = safe_str(os.path.abspath(repo_path))
76 self.config = config if config else Config()
77 # mercurial since 4.4.X requires certain configuration to be present
78 # because sometimes we init the repos with config we need to meet
79 # special requirements
80 self.config = config if config else self.get_default_config(
81 default=[('extensions', 'largefiles', '1')])
82
77 83 self._remote = connection.Hg(
78 84 self.path, self.config, with_wire=with_wire)
79 85
@@ -71,7 +71,7 b' class SubversionRepository(base.BaseRepo'
71 71 def __init__(self, repo_path, config=None, create=False, src_url=None,
72 72 **kwargs):
73 73 self.path = safe_str(os.path.abspath(repo_path))
74 self.config = config if config else base.Config()
74 self.config = config if config else self.get_default_config()
75 75 self._remote = connection.Svn(
76 76 self.path, self.config)
77 77
General Comments 0
You need to be logged in to leave comments. Login now