# HG changeset patch # User Marcin Kuzminski # Date 2019-10-02 09:54:25 # Node ID 77c4e169ea00453eed3fe2af69e1a9290aba13f0 # Parent ba91fe4403a5954394ebc497a6af2d645f1dac7d 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