changeset 40800:773572e5cba2

narrowcommands: remove an unrequired `repo.narrowpats` call We call that few lines above and do nothing significant in between which can change the narrowpats. So let's use values returned by that call. Differential Revision: https://phab.mercurial-scm.org/D5348
author Pulkit Goyal <pulkit@yandex-team.ru>
date Fri, 30 Nov 2018 17:42:55 +0300
parents 7e6834ade51d
children 33d30fb1e4ae
files hgext/narrow/narrowcommands.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py	Thu Nov 29 16:44:01 2018 -0500
+++ b/hgext/narrow/narrowcommands.py	Fri Nov 30 17:42:55 2018 +0300
@@ -412,15 +412,13 @@
 
     # Only print the current narrowspec.
     if only_show:
-        include, exclude = repo.narrowpats
-
         ui.pager('tracked')
         fm = ui.formatter('narrow', opts)
-        for i in sorted(include):
+        for i in sorted(oldincludes):
             fm.startitem()
             fm.write('status', '%s ', 'I', label='narrow.included')
             fm.write('pat', '%s\n', i, label='narrow.included')
-        for i in sorted(exclude):
+        for i in sorted(oldexcludes):
             fm.startitem()
             fm.write('status', '%s ', 'X', label='narrow.excluded')
             fm.write('pat', '%s\n', i, label='narrow.excluded')