Skip to content
Snippets Groups Projects
Commit 3eb78bdcdd7c authored by Sushil Khanchi's avatar Sushil Khanchi :koala:
Browse files

topic: improve UX by using pager only when we should

Before this patch we were using pager in every case of topic command,
either it is setting up a new topic or clearing the active topic.

After this patch it will not use pager in following commands:
$ hg topic [TOPIC] -r [rev]
$ hg topic --clear
parent e796835fe6b3
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
* evolve: not longer attempt to translate revision's descriptions (issue6016)
* evolve: fix compatibility with mercurial 4.8's narrow extension.
* pick: fix summary help text
* topic: only use pager when it make senses
8.3.1 -- 2018-10-25
-------------------
......
......@@ -652,6 +652,4 @@
" '_' and '.' characters")
raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt)
ui.pager('topics')
if list:
......@@ -657,4 +655,5 @@
if list:
ui.pager('topics')
if clear or rev:
raise error.Abort(_("cannot use --clear or --rev with --list"))
if not topic:
......@@ -700,6 +699,7 @@
ui.status(_('marked working directory as topic: %s\n') % topic)
return _changecurrenttopic(repo, topic)
ui.pager('topics')
# `hg topic --current`
ret = 0
if current and not ct:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment