# HG changeset patch # User Pulkit Goyal # Date 1543588975 -10800 # Node ID 773572e5cba2f085b6b968dfa67e23afa0b62e17 # Parent 7e6834ade51d98da575cfbeef651fc8a465c38b8 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 diff -r 7e6834ade51d -r 773572e5cba2 hgext/narrow/narrowcommands.py --- 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')