Mercurial > kallithea
changeset 7201:a8d8100f14e5
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
author | domruf <dominikruf@gmail.com> |
---|---|
date | Mon, 20 Nov 2017 23:18:38 +0100 |
parents | eb1182919890 |
children | 48f7c2aed3b7 |
files | kallithea/lib/vcs/nodes.py |
diffstat | 1 files changed, 2 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/nodes.py Mon Nov 20 23:18:38 2017 +0100 +++ b/kallithea/lib/vcs/nodes.py Mon Nov 20 23:18:38 2017 +0100 @@ -594,27 +594,19 @@ 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): """