hgext/narrow/narrowcommands.py
changeset 40543 a2c4502e409b
parent 40503 5d8f291405e5
child 40800 773572e5cba2
--- a/hgext/narrow/narrowcommands.py	Tue Oct 16 17:53:26 2018 +0300
+++ b/hgext/narrow/narrowcommands.py	Wed Oct 17 17:24:55 2018 +0300
@@ -141,8 +141,10 @@
     include, exclude = repo.narrowpats
     kwargs['oldincludepats'] = include
     kwargs['oldexcludepats'] = exclude
-    kwargs['includepats'] = include
-    kwargs['excludepats'] = exclude
+    if include:
+        kwargs['includepats'] = include
+    if exclude:
+        kwargs['excludepats'] = exclude
     # calculate known nodes only in ellipses cases because in non-ellipses cases
     # we have all the nodes
     if wireprototypes.ELLIPSESCAP in pullop.remote.capabilities():