changeset 8111:4eacfdf08b9a

vcs: tweak some comments - nothing big, but too good to be lost
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 27 Dec 2019 01:55:52 +0100
parents f713a37564c0
children 135bbd1862cf
files kallithea/lib/hooks.py kallithea/lib/vcs/backends/git/repository.py kallithea/lib/vcs/nodes.py
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/hooks.py	Thu Jan 02 20:39:13 2020 +0100
+++ b/kallithea/lib/hooks.py	Fri Dec 27 01:55:52 2019 +0100
@@ -65,7 +65,7 @@
 
 
 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]
--- a/kallithea/lib/vcs/backends/git/repository.py	Thu Jan 02 20:39:13 2020 +0100
+++ b/kallithea/lib/vcs/backends/git/repository.py	Fri Dec 27 01:55:52 2019 +0100
@@ -447,7 +447,9 @@
         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'),
--- a/kallithea/lib/vcs/nodes.py	Thu Jan 02 20:39:13 2020 +0100
+++ b/kallithea/lib/vcs/nodes.py	Fri Dec 27 01:55:52 2019 +0100
@@ -589,6 +589,7 @@
     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