Skip to content
Snippets Groups Projects
Commit f402bc51 authored by Georges Racinet's avatar Georges Racinet
Browse files

RepositoryService.WriteRef: leveraging primitive in py-heptapod

It has long been moved to `hgext3rd.heptapod`, exactly for the
reasons of that old TODO we're resolving here.
parent c75bb9ac
No related branches found
No related tags found
1 merge request!46RepositoryService: refactoring to put on par with current code base
......@@ -15,6 +15,7 @@
# TODO move that to the heptapod package
from hgext3rd.heptapod.git import git_branch_from_ref
from hgext3rd.heptapod.branch import set_default_gitlab_branch
from ..errors import (
invalid_argument,
......@@ -146,11 +147,7 @@
context, WriteRefResponse,
"The default GitLab branch can only be set "
"to a branch ref, got %r" % target)
# TODO that part and the constant should go to hgext3rd.heptapod, since
# the default branch will have to be set by push reception.
with repo.wlock():
repo.vfs.write(DEFAULT_BRANCH_FILE_NAME, target_branch)
set_default_gitlab_branch(repo, target_branch)
return WriteRefResponse()
def ApplyGitattributes(self, request: ApplyGitattributesRequest,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment