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
--- 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')