# HG changeset patch # User Marcin Kuzminski # Date 2019-10-02 09:54:25 # Node ID 14da8ce9345084fb5f74d6790262d8962962c970 # Parent 3684b47348eca0fbc1e904d009b169b69402a2ea pull-requests: fixed subrepo case for pull-requests for new mercurial. diff --git a/vcsserver/hgcompat.py b/vcsserver/hgcompat.py --- a/vcsserver/hgcompat.py +++ b/vcsserver/hgcompat.py @@ -36,6 +36,7 @@ from mercurial import unionrepo from mercurial import localrepo from mercurial import merge as hg_merge from mercurial import subrepo +from mercurial import subrepoutil from mercurial import tags as hg_tag from mercurial.commands import clone, nullid, pull diff --git a/vcsserver/hgpatches.py b/vcsserver/hgpatches.py --- a/vcsserver/hgpatches.py +++ b/vcsserver/hgpatches.py @@ -62,7 +62,7 @@ def _dynamic_capabilities_wrapper(lfprot def patch_subrepo_type_mapping(): from collections import defaultdict - from hgcompat import subrepo + from hgcompat import subrepo, subrepoutil from vcsserver.exceptions import SubrepoMergeException class NoOpSubrepo(subrepo.abstractsubrepo): @@ -97,7 +97,7 @@ def patch_subrepo_type_mapping(): def basestate(self): """current working directory base state, disregarding .hgsubstate state and working directory modifications""" - substate = subrepo.state(self._ctx, self.ui) + substate = subrepoutil.state(self._ctx, self.ui) file_system_path, rev, repotype = substate.get(self._path) return rev