# HG changeset patch # User Mads Kiilerich # Date 2019-12-27 01:55:52 # Node ID 4eacfdf08b9a48b053a830ec5d8cda2aaa68fbfa # Parent f713a37564c0660cfb8e99c903f2f8926e5b9dd4 vcs: tweak some comments - nothing big, but too good to be lost diff --git a/kallithea/lib/hooks.py b/kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py +++ b/kallithea/lib/hooks.py @@ -65,7 +65,7 @@ def _get_scm_size(alias, root_path): def repo_size(ui, repo, hooktype=None, **kwargs): - """Presents size of repository after push""" + """Show size of Mercurial repository, to be called after push.""" size_hg_f, size_root_f, size_total_f = _get_scm_size('.hg', repo.root) last_cs = repo[len(repo) - 1] diff --git a/kallithea/lib/vcs/backends/git/repository.py b/kallithea/lib/vcs/backends/git/repository.py --- a/kallithea/lib/vcs/backends/git/repository.py +++ b/kallithea/lib/vcs/backends/git/repository.py @@ -447,7 +447,9 @@ class GitRepository(BaseRepository): return self._get_parsed_refs() def _get_parsed_refs(self): - # cache the property + """Return refs as a dict, like: + { b'v0.2.0': [b'599ba911aa24d2981225f3966eb659dfae9e9f30', b'T'] } + """ _repo = self._repo refs = _repo.get_refs() keys = [(b'refs/heads/', b'H'), 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 @@ -589,6 +589,7 @@ class SubModuleNode(Node): size = 0 def __init__(self, name, url, changeset=None, alias=None): + # Note: Doesn't call Node.__init__! self.path = name self.kind = NodeKind.SUBMODULE self.alias = alias