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

WIP minimal adaptation for hg-git 1.0b1

The only true adaptation is `_filter_for_bookmarks`
(but see comment in the `NoGitStateMaintainer`, we should
refactor)

This is enough to pass the test suites of py-heptapod and HGitaly.
parent 7e9aa038
No related branches found
No related tags found
No related merge requests found
Pipeline #30630 failed
......@@ -108,7 +108,7 @@
def gitlab_sha_from_hg_sha(self, sha):
return sha
def _filter_for_bookmarks(self, bms):
def get_filtered_bookmarks(self):
# A simple compatibily with GitHandler, but truly, since we
# don't use the branch_bookmark_suffix, we would be better off
# not calling this method from the base class
......@@ -112,7 +112,8 @@
# A simple compatibily with GitHandler, but truly, since we
# don't use the branch_bookmark_suffix, we would be better off
# not calling this method from the base class
return [(bm, bm) for bm in bms]
bms = self.repo._bookmarks
return [(bm, bm, n) for bm, n in bms.items()]
def extract_bookmarks(self, git_refs):
"""Update git_refs with current bookmarks."""
......
......@@ -174,7 +174,7 @@
# hgshas of all bookmarks, but that may change in future hg-git
hgshas_with_bookmark_gitlab_ref = {
hex(all_bookmarks[bm])
for _, bm in self._filter_for_bookmarks(all_bookmarks)}
for _, bm, _name in self.get_filtered_bookmarks()}
for branch, hg_nodes in repo.branchmap().iteritems():
gb = self.git_branch_for_branchmap_branch(branch)
revs = [repo[n].rev() for n in hg_nodes]
......
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