# HG changeset patch # User Marcin Kuzminski # Date 2017-02-07 23:16:14 # Node ID 41539c12fa48f1ad15cc6e6da5cd68b2a5d64991 # Parent d2f1e285a275d23c2c245054cf82c7705e07127f mercurial: replace ancestor to pure python version for hg 4.1 compatability problems. this was moved now to debugcommands, but we don't need to run it via commands as the code is very simple. diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -674,12 +674,10 @@ class HgRemote(object): @reraise_safe_exceptions def ancestor(self, wire, revision1, revision2): repo = self._factory.repo(wire) - baseui = self._factory._create_config(wire['config']) - output = io.BytesIO() - baseui.write = output.write - commands.debugancestor(baseui, repo, revision1, revision2) - - return output.getvalue() + changelog = repo.changelog + lookup = repo.lookup + a = changelog.ancestor(lookup(revision1), lookup(revision2)) + return hex(a) @reraise_safe_exceptions def push(self, wire, revisions, dest_path, hooks=True,