##// END OF EJS Templates
fix(server-info): removed dulwich from update-server-info logic, and added force-flag feature
super-admin -
r1197:bad64234 default
parent child Browse files
Show More
@@ -37,7 +37,6 b' from dulwich.errors import ('
37 37 MissingCommitError, ObjectMissing, HangupException,
38 38 UnexpectedCommandError)
39 39 from dulwich.repo import Repo as DulwichRepo
40 from dulwich.server import update_server_info
41 40
42 41 import rhodecode
43 42 from vcsserver import exceptions, settings, subprocessio
@@ -200,7 +199,6 b' class GitRemote(RemoteBase):'
200 199 def is_empty(self, wire):
201 200 repo_init = self._factory.repo_libgit2(wire)
202 201 with repo_init as repo:
203
204 202 try:
205 203 has_head = repo.head.name
206 204 if has_head:
@@ -1359,9 +1357,12 b' class GitRemote(RemoteBase):'
1359 1357 return BinaryEnvelope(result_libgit)
1360 1358
1361 1359 @reraise_safe_exceptions
1362 def update_server_info(self, wire):
1363 repo = self._factory.repo(wire)
1364 update_server_info(repo)
1360 def update_server_info(self, wire, force=False):
1361 cmd = ['update-server-info']
1362 if force:
1363 cmd += ['--force']
1364 output, __ = self.run_git_command(wire, cmd)
1365 return output.splitlines()
1365 1366
1366 1367 @reraise_safe_exceptions
1367 1368 def get_all_commit_ids(self, wire):
General Comments 0
You need to be logged in to leave comments. Login now