We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d72972b + c1a76b7 commit c3af2ecCopy full SHA for c3af2ec
readthedocs/vcs_support/backends/hg.py
@@ -38,14 +38,24 @@ def clone(self):
38
39
@property
40
def branches(self):
41
- retcode, stdout = self.run('hg', 'branches', record_as_success=True)[:2]
+ retcode, stdout = self.run(
42
+ 'hg', 'branches', '--quiet', record_as_success=True)[:2]
43
# error (or no tags found)
44
if retcode != 0:
45
return []
46
return self.parse_branches(stdout)
47
48
def parse_branches(self, data):
- """Stable / default"""
49
+ """
50
+ Parses output of `hg branches --quiet`, eg:
51
+
52
+ default
53
+ 0.2
54
+ 0.1
55
56
+ Into VCSVersion objects with branch name as verbose_name and
57
+ identifier.
58
59
names = [name.lstrip() for name in data.splitlines()]
60
return [VCSVersion(self, name, name) for name in names if name]
61
0 commit comments