# HG changeset patch # User Sushil khanchi # Date 1541499798 -19800 # Node ID 3eb78bdcdd7cd8be466d44ff489347a5432c44d3 # Parent e796835fe6b3ea8bbc3094aa8337095accffae86 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 diff -r e796835fe6b3 -r 3eb78bdcdd7c CHANGELOG --- a/CHANGELOG Tue Nov 06 10:43:35 2018 +0530 +++ b/CHANGELOG Tue Nov 06 15:53:18 2018 +0530 @@ -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 ------------------- diff -r e796835fe6b3 -r 3eb78bdcdd7c hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Tue Nov 06 10:43:35 2018 +0530 +++ b/hgext3rd/topic/__init__.py Tue Nov 06 15:53:18 2018 +0530 @@ -652,9 +652,8 @@ " '_' and '.' characters") raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt) - ui.pager('topics') - 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: