Complete docstring of parse_branches
@@ -46,7 +46,16 @@ class Backend(BaseVCS):
return self.parse_branches(stdout)
def parse_branches(self, data):
- """Stable / default"""
+ """
+ Parses output of `hg branches --quiet`, eg:
+
+ default
+ 0.2
+ 0.1
+
+ Into VCSVersion objects with branch name as verbose_name and
+ identifier.
+ """
names = [name.lstrip() for name in data.splitlines()]
return [VCSVersion(self, name, name) for name in names if name]
