# HG changeset patch # User Marcin Lulek # Date 2019-02-12 09:40:50 # Node ID 95e71a57e8ce13b78f7c89f3f668e49f684ac1e9 # Parent 5fd6f6788da8c0e5b9fdfb1c14c7bb69ed654394 mercurial-submodules: only show submodule in the path that it belongs too. - before even submodules from root node were shown in subdirectories, and other way arround. diff --git a/rhodecode/lib/vcs/backends/hg/commit.py b/rhodecode/lib/vcs/backends/hg/commit.py --- a/rhodecode/lib/vcs/backends/hg/commit.py +++ b/rhodecode/lib/vcs/backends/hg/commit.py @@ -303,10 +303,10 @@ class MercurialCommit(base.BaseCommit): alias = self.repository.alias for k, vals in self._submodules.iteritems(): - loc = vals[0] - commit = vals[1] - dirnodes.append( - SubModuleNode(k, url=loc, commit=commit, alias=alias)) + if vcspath.dirname(k) == path: + loc = vals[0] + commit = vals[1] + dirnodes.append(SubModuleNode(k, url=loc, commit=commit, alias=alias)) nodes = dirnodes + filenodes # cache nodes for node in nodes: