# HG changeset patch # User RhodeCode Admin # Date 2023-11-06 12:52:02 # Node ID 19ccbbc7bb78ed773af1015f65c29cbc45ab3b7d # Parent e15a13193837dcdd6622d106a232a15ed2ff3a4e fix(mercurial): fixed issue with rebase logic after bump to mercurial 6.3 the previous spec expected just a single base. Now this needs to be a list of items fixes #5704 diff --git a/vcsserver/remote/hg_remote.py b/vcsserver/remote/hg_remote.py --- a/vcsserver/remote/hg_remote.py +++ b/vcsserver/remote/hg_remote.py @@ -1125,6 +1125,7 @@ class HgRemote(RemoteBase): @reraise_safe_exceptions def rebase(self, wire, source='', dest='', abort=False): + repo = self._factory.repo(wire) baseui = self._factory._create_config(wire['config']) repo.ui.setconfig(b'ui', b'merge', b'internal:dump') @@ -1134,8 +1135,19 @@ class HgRemote(RemoteBase): # used but instead uses a default value. repo.ui.setconfig(b'ui', b'interactive', False) - rebase.rebase(baseui, repo, base=safe_bytes(source or ''), dest=safe_bytes(dest or ''), - abort=abort, keep=not abort) + rebase_kws = dict( + keep=not abort, + abort=abort + ) + + if source: + source = repo[source] + rebase_kws['base'] = [source.hex()] + if dest: + dest = repo[dest] + rebase_kws['dest'] = dest.hex() + + rebase.rebase(baseui, repo, **rebase_kws) @reraise_safe_exceptions def tag(self, wire, name, revision, message, local, user, tag_time, tag_timezone):