--- a/CHANGELOG Wed Apr 24 17:21:21 2019 +0800
+++ b/CHANGELOG Wed Apr 10 18:20:33 2019 +0800
@@ -10,6 +10,7 @@
(use --no-all to evolve only one)
* evolve: drop compatibility with 4.4
* evolve: reinstalled compatibility with narrow repositories,
+ * evolve: use "unstable" instead of "troubled"
8.5.1 -- 2019-04-23
-------------------
--- a/hgext3rd/topic/__init__.py Wed Apr 24 17:21:21 2019 +0800
+++ b/hgext3rd/topic/__init__.py Wed Apr 10 18:20:33 2019 +0800
@@ -154,7 +154,7 @@
cmdtable = {}
command = registrar.command(cmdtable)
colortable = {'topic.active': 'green',
- 'topic.list.troubledcount': 'red',
+ 'topic.list.unstablecount': 'red',
'topic.list.headcount.multiple': 'yellow',
'topic.list.behindcount': 'cyan',
'topic.list.behinderror': 'red',
@@ -1024,11 +1024,11 @@
fm.write('changesetcount', '%d changesets', data.changesetcount,
label='topic.list.changesetcount')
- if data.troubledcount:
+ if data.unstablecount:
fm.plain(', ')
- fm.write('troubledcount', '%d troubled',
- data.troubledcount,
- label='topic.list.troubledcount')
+ fm.write('unstablecount', '%d unstable',
+ data.unstablecount,
+ label='topic.list.unstablecount')
headcount = len(data.heads)
if 1 < headcount:
--- a/hgext3rd/topic/stack.py Wed Apr 24 17:21:21 2019 +0800
+++ b/hgext3rd/topic/stack.py Wed Apr 10 18:20:33 2019 +0800
@@ -175,7 +175,7 @@
return len(self._revs)
@util.propertycache
- def troubledcount(self):
+ def unstablecount(self):
return len([r for r in self._revs if self._repo[r].isunstable()])
@util.propertycache
@@ -381,14 +381,14 @@
"""get various data about a stack
:changesetcount: number of non-obsolete changesets in the stack
- :troubledcount: number on troubled changesets
+ :unstablecount: number of unstable changesets
:headcount: number of heads on the topic
:behindcount: number of changeset on rebase destination
"""
data = {}
current = stack(repo, branch, topic)
data['changesetcount'] = current.changesetcount
- data['troubledcount'] = current.troubledcount
+ data['unstablecount'] = current.unstablecount
data['headcount'] = len(current.heads)
data['behindcount'] = current.behindcount
data['behinderror'] = current.behinderror
--- a/tests/test-evolve-topic.t Wed Apr 24 17:21:21 2019 +0800
+++ b/tests/test-evolve-topic.t Wed Apr 10 18:20:33 2019 +0800
@@ -304,7 +304,7 @@
$ hg topic
- * bar (5 changesets, 4 troubled)
+ * bar (5 changesets, 4 unstable)
foo (3 changesets)
When the current topic, obsoleted changesets topic and successor topic are same
--- a/tests/test-topic-stack-data.t Wed Apr 24 17:21:21 2019 +0800
+++ b/tests/test-topic-stack-data.t Wed Apr 10 18:20:33 2019 +0800
@@ -172,10 +172,10 @@
basic output
$ hg topic
- bar (5 changesets, 1 troubled, 2 heads)
+ bar (5 changesets, 1 unstable, 2 heads)
baz (2 changesets)
* foo (2 changesets)
- fuz (3 changesets, 2 troubled)
+ fuz (3 changesets, 2 unstable)
quiet version
@@ -188,10 +188,10 @@
verbose
$ hg topic --verbose
- bar (on branch: default, 5 changesets, 1 troubled, 2 heads)
+ bar (on branch: default, 5 changesets, 1 unstable, 2 heads)
baz (on branch: default, 2 changesets, 2 behind)
* foo (on branch: lake, 2 changesets, ambiguous destination: branch 'lake' has 2 heads)
- fuz (on branch: default, 3 changesets, 2 troubled, 1 behind)
+ fuz (on branch: default, 3 changesets, 2 unstable, 1 behind)
json
@@ -202,7 +202,7 @@
"changesetcount": 5,
"headcount": 2,
"topic": "bar",
- "troubledcount": 1
+ "unstablecount": 1
},
{
"active": false,
@@ -218,7 +218,7 @@
"active": false,
"changesetcount": 3,
"topic": "fuz",
- "troubledcount": 2
+ "unstablecount": 2
}
]
@@ -232,7 +232,7 @@
"changesetcount": 5,
"headcount": 2,
"topic": "bar",
- "troubledcount": 1
+ "unstablecount": 1
},
{
"active": false,
@@ -254,7 +254,7 @@
"branches+": "default",
"changesetcount": 3,
"topic": "fuz",
- "troubledcount": 2
+ "unstablecount": 2
}
]