Skip to content
Snippets Groups Projects

GitLab default branch: new logs to investigate problems

Merged Georges Racinet requested to merge topic/stable/debug-default-branch into branch/stable
3 files
+ 39
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -17,7 +17,10 @@
import pytest
import re
from dulwich.protocol import ZERO_SHA
from heptapod.gitlab.change import (
ZERO_SHA,
GitLabRefChange,
)
from heptapod.testhelpers import (
RepoWrapper,
)
@@ -57,6 +60,30 @@
assert re.search(br'prune.*default branch', exc_info.value.args[0])
def test_log_None_in_ref_keys(tmpdir, monkeypatch):
notifs = []
patch_gitlab_hooks(monkeypatch, notifs)
config = common_config()
config['heptapod'] = dict(native=True)
wrapper = RepoWrapper.init(tmpdir.join('repo'), config=config)
wrapper.write_commit('foo')
wrapper.command('gitlab-mirror')
handler = NoGitStateMaintainer(wrapper.repo.ui,
wrapper.repo)
def compare_exportable(existing, exportable):
return None, {None: GitLabRefChange(ref=b'some-bookmark',
before=ZERO_SHA,
after=b'1234f678' * 5)}
handler.compare_exportable = compare_exportable
# just checking that the log works.
handler.update_gitlab_references()
def test_refs_by_type():
head_refs = {b'refs/heads/gl-branch'}
tag_refs = {b'refs/tags/gl-tag'}
Loading