# HG changeset patch # User domruf # Date 2017-11-20 23:18:38 # Node ID a8d8100f14e516a7b6b43ac4bc8973c8d9f06cd5 # Parent eb118291989043b4d88c3a7ca730c8a7b74e1e2e git: remove support for submodules without a URL - No more url default None - submodules are now always given a URL - Remove unnecessary _extract_submodule_url diff --git a/kallithea/lib/vcs/nodes.py b/kallithea/lib/vcs/nodes.py --- a/kallithea/lib/vcs/nodes.py +++ b/kallithea/lib/vcs/nodes.py @@ -594,27 +594,19 @@ class SubModuleNode(Node): is_binary = False size = 0 - def __init__(self, name, url=None, changeset=None, alias=None): + def __init__(self, name, url, changeset=None, alias=None): self.path = name self.kind = NodeKind.SUBMODULE self.alias = alias # we have to use emptyChangeset here since this can point to svn/git/hg # submodules we cannot get from repository self.changeset = EmptyChangeset(str(changeset), alias=alias) - self.url = url or self._extract_submodule_url() + self.url = url def __repr__(self): return '<%s %r @ %s>' % (self.__class__.__name__, self.path, getattr(self.changeset, 'short_id', '')) - def _extract_submodule_url(self): - if self.alias == 'git': - # TODO: find a way to parse gits submodule file and extract the - # linking URL - return self.path - if self.alias == 'hg': - return self.path - @LazyProperty def name(self): """